List of usage examples for org.apache.commons.lang StringUtils EMPTY
String EMPTY
To view the source code for org.apache.commons.lang StringUtils EMPTY.
Click Source Link
""
. From source file:ch.puzzle.itc.mobiliar.presentation.resourcesedit.DataProviderHelperTest.java
@Test public void shouldReturnNullIfResourceEditRelationListIsEmpty() { // given//from ww w .j a v a 2 s. com List<ResourceEditRelation> relations = Collections.<ResourceEditRelation>emptyList(); // when String actual = helper.nextFreeIdentifierForResourceEditRelations(relations, null, StringUtils.EMPTY); // then assertEquals(StringUtils.EMPTY, actual); }
From source file:fr.paris.lutece.plugins.workflow.service.security.WorkflowUserAttributesManager.java
/** * {@inheritDoc}//w w w . ja v a2 s . c om */ @Override public String getAttribute(String strUserId, String strAttribute) { return isEnabled() ? _userAttributesService.getAttribute(strUserId, strAttribute) : StringUtils.EMPTY; }
From source file:cn.cuizuoli.appranking.service.GooglePlayService.java
/** * getUrl//from ww w.j a v a2 s. co m * @param feedType * @param category * @return */ public String getUrl(FeedType feedType, Category category) { if (feedType.getMediaType() == MediaType.GOOGLE) { return String.format(GOOGLE_PLAY_URL, category.getCode(), feedType.getCode()); } return StringUtils.EMPTY; }
From source file:com.mmj.app.common.authority.AuthorityHelper.java
/** * ??/* w w w . j a va 2 s.co m*/ * * @param akeys ??, 1,3,6,11,20 * @return ??, 0101001001000000000 */ public static String makeAuthority(String akeys) { if (StringUtils.isEmpty(akeys)) { return StringUtils.EMPTY; } StringBuilder sb = new StringBuilder(_RAW); String[] akeys_s = akeys.split(","); for (String akey : akeys_s) { if (null == akey || StringUtils.EMPTY.equals(akey)) { continue; } int ak = Integer.parseInt(akey); sb.setCharAt(ak, '1'); } return sb.toString(); }
From source file:com.alibaba.otter.manager.biz.monitor.impl.ProcessTimeoutRuleMonitor.java
@Override public void explore(List<AlarmRule> rules) { if (CollectionUtils.isEmpty(rules)) { return;// w ww.ja v a 2 s . c o m } Long pipelineId = rules.get(0).getPipelineId(); List<ProcessStat> processStats = processStatService.listRealtimeProcessStat(pipelineId); if (CollectionUtils.isEmpty(processStats)) { return; } long now = System.currentTimeMillis(); Map<Long, Long> processTime = new HashMap<Long, Long>(); for (ProcessStat processStat : processStats) { Long timeout = 0L; if (!CollectionUtils.isEmpty(processStat.getStageStats())) { timeout = now - processStat.getStageStats().get(0).getStartTime(); } processTime.put(processStat.getProcessId(), timeout); } String message = StringUtils.EMPTY; for (AlarmRule rule : rules) { if (message.isEmpty()) { message = checkTimeout(rule, processTime); } else { checkTimeout(rule, processTime); } } if (!message.isEmpty()) { logRecordAlarm(pipelineId, MonitorName.PROCESSTIMEOUT, message); } }
From source file:com.envision.envservice.rest.CommentTopResource.java
/** * ?/* ww w .ja v a 2s.com*/ * @Title: cancelCommentTop * @param commentId * @return Response * @throws ServiceException * @Date 201646 */ @GET @Produces(MediaType.APPLICATION_JSON) @Path("/cancel/{comment_id}") public Response cancelCommentTop(@PathParam("comment_id") int commentId) throws ServiceException { HttpStatus status = HttpStatus.OK; String response = StringUtils.EMPTY; commentTopService.cancelCommentTop(commentId); return Response.status(status.value()).entity(response).build(); }
From source file:com.tera.common.vcontext.model.elements.AbstractContext.java
/** * @param name/*from www. j av a2 s . c o m*/ * @return */ private String[] extractNames(String name) { String[] nodes = name.split("/"); nodes = (String[]) ArrayUtils.removeElement(nodes, StringUtils.EMPTY); return nodes; }
From source file:io.gravitee.management.rest.resource.ApiMembersResource.java
@POST public Response save(@NotNull @QueryParam("user") String username, @NotNull @QueryParam("type") MembershipTypeParam membershipType) { // Check that the API exists apiService.findById(api);/*w w w. j av a2 s .c o m*/ if (membershipType.getValue() == null) { return Response.status(Response.Status.BAD_REQUEST).build(); } try { userService.findByName(username); } catch (UserNotFoundException unfe) { // Create user with only user name data // The others information will be updated during its first connection NewUserEntity user = new NewUserEntity(); user.setUsername(username); user.setPassword(StringUtils.EMPTY); user.setRoles(new HashSet<String>(Arrays.asList(new String[] { "ROLE_USER" }))); userService.create(user); } apiService.addOrUpdateMember(api, username, membershipType.getValue()); return Response.created(URI.create("/apis/" + api + "/members/" + username)).build(); }
From source file:eu.europa.ec.markt.dss.manager.ProxyPreferenceManager.java
/** * Get the password of HTTPS proxy/* www.j av a 2 s .co m*/ * * @return the password */ public String getHttpPassword() { ProxyPreference preference = getProxyDao().get(ProxyKey.HTTP_PASSWORD); return preference != null ? preference.getValue() : StringUtils.EMPTY; }
From source file:fr.paris.lutece.plugins.crm.business.demand.DemandTypeFilter.java
/** * Constructor//from ww w . j a v a 2 s .c o m */ public DemandTypeFilter() { _bIsWideSearch = false; _strLabel = StringUtils.EMPTY; _strUrlResource = StringUtils.EMPTY; _nIdCategory = ALL_INT; _strWorkgroupKey = StringUtils.EMPTY; _nOrder = ALL_INT; _operatorOrder = OperatorEnum.EQUAL; _operatorDateBegin = OperatorEnum.EQUAL; _operatorDateEnd = OperatorEnum.EQUAL; _strUrlDelete = StringUtils.EMPTY; }