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:info.magnolia.cms.gui.control.Button.java
public void setHtmlInter() { if (super.getHtmlInter(null) == null) { if (this.getButtonType() == BUTTONTYPE_PUSHBUTTON) { this.setHtmlInter(StringUtils.EMPTY); } else {/* w ww .j av a 2s. c o m*/ this.setHtmlInter("</td><td>"); //$NON-NLS-1$ } } }
From source file:ips1ap101.lib.core.app.ListaParametros.java
@Override public String toString() { String lista = StringUtils.EMPTY; String parametro;// w w w. j a v a 2 s. c o m Iterator iterator = parametros.iterator(); while (iterator.hasNext()) { parametro = ((ParametroPeticion) iterator.next()).toString(); if (parametro != null) { lista += "&" + parametro; } } if (lista.startsWith("&")) { lista = "?" + lista.substring(1); } return lista; }
From source file:fr.paris.lutece.plugins.crmclient.util.http.WebServiceCaller.java
/** * {@inheritDoc}/*from w w w. j a v a 2 s. c om*/ */ @Override public String callWebService(String strUrl, Map<String, String> mapParameters, RequestAuthenticator authenticator, List<String> listElements, HttpMethodEnum httpMethod) throws CRMException { String strResponse = StringUtils.EMPTY; if (AppLogService.isDebugEnabled()) { AppLogService.debug(trace(strUrl, mapParameters, authenticator, listElements)); } try { HttpAccess httpAccess = new HttpAccess(); if (httpMethod == HttpMethodEnum.POST) { strResponse = httpAccess.doPost(strUrl, mapParameters, authenticator, listElements); } else { strResponse = httpAccess.doGet(strUrl, authenticator, listElements); } } catch (HttpAccessException e) { String strError = "Error connecting to '" + strUrl + "' : "; AppLogService.error(strError + e.getMessage(), e); throw new CRMException(strError, e); } return strResponse; }
From source file:com.microsoft.alm.plugin.idea.starters.ApplicationStarterBaseTest.java
@Before public void setupLocalTests() { MockitoAnnotations.initMocks(this); PowerMockito.mockStatic(FileDocumentManager.class); PowerMockito.mockStatic(ApplicationManager.class); when(FileDocumentManager.getInstance()).thenReturn(mockFileDocumentManager); when(ApplicationManager.getApplication()).thenReturn(mockApplication); processCommandArgs = Collections.emptyList(); processUriArgs = StringUtils.EMPTY; }
From source file:fr.paris.lutece.plugins.workflow.modules.alert.business.retrieval.AbstractRetrievalType.java
/** * {@inheritDoc}//from w ww. j av a 2 s. c om */ @Override public String getTitle(Locale locale) { if (StringUtils.isNotBlank(_strTitleKey) && (locale != null)) { return I18nService.getLocalizedString(_strTitleKey, locale); } return StringUtils.EMPTY; }
From source file:info.magnolia.cms.gui.control.ButtonSet.java
public String getButtonHtmlPre() { if (this.buttonHtmlPre == null) { if (this.getButtonType() == BUTTONTYPE_PUSHBUTTON) { return StringUtils.EMPTY; }//w w w . j a va 2 s .co m return BUTTONHTML_PRE_DIVIDED; } return this.buttonHtmlPre; }
From source file:edu.northwestern.bioinformatics.studycalendar.web.NewSiteCommandTest.java
public void testValidateWhenSiteNameExists() throws Exception { site.setName("Northwestern Uni"); expect(siteService.getByName(site.getName())).andReturn(site); replayMocks();/*from w w w .jav a 2s . co m*/ BindException errors = new BindException(command, StringUtils.EMPTY); command.validate(errors); verifyMocks(); assertEquals("Wrong error code", "error.site.name.already.exists", errors.getFieldError().getCode()); }
From source file:fr.paris.lutece.plugins.workflow.web.task.AbstractTaskComponent.java
/** * {@inheritDoc}/* w ww.j av a 2 s .c o m*/ */ @Override public String validateConfig(ITaskConfig config, HttpServletRequest request) { // Check mandatory fields Set<ConstraintViolation<ITaskConfig>> constraintViolations = BeanValidationUtil.validate(config); if (constraintViolations.size() > 0) { return AdminMessageService.getMessageUrl(request, Messages.MANDATORY_FIELDS, AdminMessage.TYPE_STOP); } return StringUtils.EMPTY; }
From source file:com.mmj.app.common.component.ComponentController.java
@ExceptionHandler(Throwable.class) public ModelAndView handleIOException(Throwable e) throws Throwable { if (AnnotationUtils.findAnnotation(e.getClass(), ResponseStatus.class) != null) { throw e;//from w w w . j a v a 2s. co m } if (request == null && response == null) { throw e; } if (request == null && response != null) { response.setCharacterEncoding("utf-8"); response.setContentType("text/html;charset=UTF-8"); OutputStream out = response.getOutputStream(); PrintWriter pw = new PrintWriter(new OutputStreamWriter(out, "utf-8")); pw.println("{\"code\":-1,\"message\":\",?!\",\"data\":\"\"}"); pw.flush(); pw.close(); } ModelAndView mav = new ModelAndView(); if (InvokeTypeTools.isAjax(request)) { return createJsonMav(",?!", ResultCode.ERROR, e.getMessage()); } mav.addObject("exception", e.getCause() == null ? StringUtils.EMPTY : e.getCause().toString()); mav.addObject("msg", e.getMessage()); mav.addObject("stackTrace", e.getStackTrace().toString()); if (request.getRequestURI() != null) { mav.addObject("url", request.getRequestURI().toString()); } mav.getModel().put(CustomVelocityLayoutView.USE_LAYOUT, "false"); mav.setViewName("error"); return mav; }
From source file:fr.paris.lutece.plugins.workflow.modules.notifymylutece.business.notification.AbstractNotificationType.java
/** * {@inheritDoc}/*from www. j av a 2 s .co m*/ */ public String getTitle(Locale locale) { if (StringUtils.isNotBlank(_strTitleKey) && (locale != null)) { return I18nService.getLocalizedString(_strTitleKey, locale); } return StringUtils.EMPTY; }