List of usage examples for org.springframework.util Assert hasText
public static void hasText(@Nullable String text, Supplier<String> messageSupplier)
From source file:org.juiser.spring.boot.config.ForwardedHeaderConfig.java
public ForwardedHeaderConfig<T> setName(String name) { Assert.hasText(name, "jwt header name cannot be null or empty."); this.name = name; return this; }
From source file:fr.mby.opa.web.servlet.request.OsgiPortalAppRequest.java
/** * @param response//from www .j a va 2 s .c o m */ public OsgiPortalAppRequest(final HttpServletRequest request, final String opaSignature) { super(request); Assert.hasText(opaSignature, "No OPA signature supplied !"); this.request = request; this.opaSignature = opaSignature; final IPortalService portalService = OsgiPortalServiceLocator.retrievePortalService(); this.opaApp = portalService.getTargetedApp(request); }
From source file:org.cleverbus.core.common.directcall.DirectCallRegistryMemoryImpl.java
@Override public void addParams(String callId, DirectCallParams params) { Assert.hasText(callId, "the callId must not be empty"); Assert.notNull(params, "the params must not be null"); if (registry.get(callId) != null) { throw new IllegalStateException("there are already call params with call ID = " + callId); }/*w ww . j av a2 s. c o m*/ registry.put(callId, params); Log.debug("Call params with callId=" + callId + " added to registry: " + params); removeOldParams(); }
From source file:fr.acxio.tools.agia.alfresco.configuration.QueryAssociationDefinitionFactoryBean.java
@Override public void afterPropertiesSet() { super.afterPropertiesSet(); Assert.hasText(query, "'query' must not be empty."); if ((queryLanguage == null) || (queryLanguage.isEmpty())) { queryLanguage = "lucene"; }// w w w. ja v a 2 s . c o m }
From source file:org.cleverbus.api.route.AbstractExtRoute.java
/** * Gets route ID for asynchronous incoming routes, specific for extension routes. * * @param service the service name * @param operationName the operation name * @return route ID// w w w . j av a2 s .c o m * @see #getInRouteId(ServiceExtEnum, String) */ public static String getExtInRouteId(ServiceExtEnum service, String operationName) { Assert.notNull(service, "the service must not be null"); Assert.hasText(operationName, "the operationName must not be empty"); return service.getServiceName() + "_" + operationName + EXT_IN_ROUTE_SUFFIX; }
From source file:org.esco.portlet.changeetab.dao.impl.EtablissementAttributesMapper.java
/** * @param idAttrKey//from w ww .j a v a 2 s . c o m * @param nameAttrKey * @param descriptionAttrKey */ public EtablissementAttributesMapper(final String idAttrKey, final String nameAttrKey, final String descriptionAttrKey) { super(); Assert.hasText(idAttrKey, "Etab Id LDAP attr key not supplied !"); Assert.hasText(nameAttrKey, "Etab Name LDAP attr key not supplied !"); Assert.hasText(descriptionAttrKey, "Etab Description LDAP attr key not supplied !"); this.idAttrKey = idAttrKey; this.nameAttrKey = nameAttrKey; this.descriptionAttrKey = descriptionAttrKey; }
From source file:org.cleverbus.core.common.contextcall.ContextCallParams.java
public ContextCallParams(Class<?> targetType, String methodName, Object... methodArgs) { Assert.notNull(targetType, "the targetType must not be null"); Assert.hasText(methodName, "the methodName must be defined"); this.targetType = targetType; this.methodName = methodName; this.methodArgs = new ArrayList<Object>(Arrays.asList(methodArgs)); this.creationTimestamp = DateTime.now(); }
From source file:com.carfinance.core.filter.HiddenHttpMethodFilter.java
/** * Set the parameter name to look for HTTP methods. * /*from w ww.java 2 s . com*/ * @see #DEFAULT_METHOD_PARAM */ public void setMethodParam(String methodParam) { Assert.hasText(methodParam, "'methodParam' must not be empty"); this.methodParam = methodParam; }