List of usage examples for org.apache.commons.lang ArrayUtils EMPTY_STRING_ARRAY
String[] EMPTY_STRING_ARRAY
To view the source code for org.apache.commons.lang ArrayUtils EMPTY_STRING_ARRAY.
Click Source Link
String
array. From source file:edu.cornell.med.icb.learning.ClassificationModel.java
public static String[] splitModelParameters(final String parameterToken) { final String[] result = parameterToken.split("[,]"); if (result.length == 1 && result[0].length() == 0) { return ArrayUtils.EMPTY_STRING_ARRAY; } else {/*from w w w .j a v a 2 s .c o m*/ return result; } }
From source file:de.iteratec.iteraplan.businesslogic.reports.query.postprocessing.AbstractPostprocessingStrategy.java
/** * Returns the supported export formats. Some post-processing strategies may modify the result set * in a way that is only useful to certain exports. For example, a post-processing strategy may * modify the results in order to create a certain graphical export. An excel export of this data * may not be meaningful and is thus not supported. * /*w w w . j a va 2 s . com*/ * @return A string array of supported export formats. */ public String[] getSupportedReportTypes() { if (reportTypes != null) { return reportTypes.clone(); } else { return ArrayUtils.EMPTY_STRING_ARRAY; } }
From source file:com.cyclopsgroup.waterview.core.DefaultLookAndFeelService.java
/** * Overwrite or implement method getStylesheetNames() * * @see com.cyclopsgroup.waterview.spi.LookAndFeelService#getStyleNames() *///from w w w. j a va 2s. c om public String[] getStyleNames() { return (String[]) styleSheets.keySet().toArray(ArrayUtils.EMPTY_STRING_ARRAY); }
From source file:gov.nih.nci.caarray.dao.AuditLogDaoImpl.java
@SuppressWarnings("unchecked") private String[] getGroupNames() { User user = CaArrayUsernameHolder.getCsmUser(); try {/* ww w .jav a 2 s . c o m*/ Set<Group> groups = SecurityUtils.getAuthorizationManager().getGroups(user.getUserId().toString()); String[] groupNames = new String[groups.size()]; int i = 0; for (Group g : groups) { groupNames[i++] = String.valueOf(g.getGroupId()); } return groupNames; } catch (CSObjectNotFoundException e) { return ArrayUtils.EMPTY_STRING_ARRAY; } }
From source file:cppsensor.sonar.CppProjectAnalysisHandler.java
private String[] getStringArrayBySeparator(String value, String separator) { if (value != null) { String[] strings = StringUtils.splitByWholeSeparator(value, separator); String[] result = new String[strings.length]; for (int index = 0; index < strings.length; index++) { result[index] = StringUtils.trim(strings[index]); }/* ww w. j av a 2 s.com*/ return result; } return ArrayUtils.EMPTY_STRING_ARRAY; }
From source file:io.fabric8.elasticsearch.plugin.auth.OpenShiftTokenAuthenticationTest.java
@Test public void testExtractCredentials() throws Exception { when(contextFactory.create(any(RestRequest.class))).thenReturn(context); when(apiService.localSubjectAccessReview(anyString(), anyString(), anyString(), anyString(), anyString(), eq(ArrayUtils.EMPTY_STRING_ARRAY))).thenReturn(true); AuthCredentials creds = backend.extractCredentials(request, threadContext); assertEquals(username, creds.getUsername()); assertEquals(context, threadContext.getTransient(ConfigurationSettings.OPENSHIFT_REQUEST_CONTEXT)); assertTrue(creds.isComplete());//ww w .j a va 2 s . c o m }
From source file:edu.cornell.med.icb.geo.tools.GEOPlatform.java
/** * Return all Genbank IDs associated to this probeset. * * @param probesetID/* w w w . j a va2 s . c om*/ * @return Genbank IDs associated to this probeset. */ public String[] getGenbankList(final String probesetID) { final String gbList = (String) probesetId2GenbankList.get(probesetID); if (gbList == null) { return ArrayUtils.EMPTY_STRING_ARRAY; } else { return gbList.split("[ ]"); } }
From source file:com.cyclopsgroup.waterview.core.DefaultLookAndFeelService.java
/** * Overwrite or implement method getThemeNames() * * @see com.cyclopsgroup.waterview.spi.LookAndFeelService#getThemeNames() */// w ww . ja v a2 s.c o m public String[] getThemeNames() { return (String[]) themes.keySet().toArray(ArrayUtils.EMPTY_STRING_ARRAY); }
From source file:io.fabric8.elasticsearch.plugin.auth.OpenShiftTokenAuthentication.java
private Collection<String> retrieveBackendRoles(OpenshiftRequestContext context) { List<String> roles = new ArrayList<>(); if (PluginServiceFactory.isReady()) { final SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new SpecialPermission()); }//from www . j a v a2 s .c o m OpenshiftAPIService apiService = PluginServiceFactory.getApiService(); for (Map.Entry<String, Settings> sar : sars.entrySet()) { boolean allowed = AccessController.doPrivileged(new PrivilegedAction<Boolean>() { @Override public Boolean run() { try { Settings params = sar.getValue(); return apiService.localSubjectAccessReview(context.getToken(), params.get("namespace"), params.get("verb"), params.get("resource"), params.get("resourceAPIGroup"), ArrayUtils.EMPTY_STRING_ARRAY); } catch (Exception e) { LOGGER.error("Exception executing LSAR", e); } return false; } }); if (allowed) { roles.add(sar.getKey()); } } } return roles; }
From source file:de.iteratec.iteraplan.persistence.dao.CheckBuildingBlocksWithNoAssociationsHelper.java
/** * Retrieves the set of association names for the corresponding building block * /*from w ww . j a va 2 s . co m*/ * @param type * The type of building block * @return its association names */ public static String[] getAssociations(TypeOfBuildingBlock type) { if (type == null || !BBT_TO_ASSOCIATIONS.containsKey(type)) { return ArrayUtils.EMPTY_STRING_ARRAY; } else { return BBT_TO_ASSOCIATIONS.get(type); } }