List of usage examples for org.springframework.util Assert hasText
public static void hasText(@Nullable String text, Supplier<String> messageSupplier)
From source file:fr.mby.portal.coreimpl.action.BasicUserAction.java
@Override public String[] getParameterValues(final String name) throws IllegalArgumentException { Assert.hasText(name, "No property name provided !"); final String[] values = this.parameters.get(name); return values; }
From source file:com.autentia.wuija.security.impl.hibernate.HibernateGroupManager.java
/** * @see GroupManager#deleteGroup(String) *//*from w ww .j ava2s . com*/ @Transactional public void deleteGroup(String groupname) { Assert.hasText(groupname, GROUPNAME_EMPTY_ERROR); final SecurityGroup group = userDetailsServiceHelper.loadGroupByGroupName(groupname); dao.delete(group); }
From source file:org.opencredo.couchdb.core.CouchDbChangesTemplate.java
private void setUrlAndSequence(String defaultDatabaseUrl, long sinceLocalSequence) { Assert.hasText(defaultDatabaseUrl, "defaultDatabaseUrl must not be empty"); this.databaseUrl = defaultDatabaseUrl; this.currentSequence = sinceLocalSequence; databaseChangesUrl = CouchDbUtils.addChangesSince(defaultDatabaseUrl); }
From source file:cz.cvut.zuul.support.spring.provider.RemoteResourceTokenServices.java
public void afterPropertiesSet() { Assert.notNull(restTemplate, "restTemplate must not be null"); Assert.hasText(tokenInfoEndpointUrl, "tokenInfoEndpointUrl must not be blank"); if (decorateErrorHandler) { restTemplate.setErrorHandler(new TokenValidationErrorHandler(restTemplate.getErrorHandler())); }// w w w .ja v a 2s . c o m //add query parameter with placeholder for token value tokenInfoEndpointUrl = UriComponentsBuilder.fromUriString(tokenInfoEndpointUrl) .queryParam(tokenParameterName, "{value}").build().toUriString(); }
From source file:de.itsvs.cwtrpc.security.AbstractRpcProcessingFilter.java
public void setMethodName(String methodName) { Assert.hasText(methodName, "'methodName' must not be empty"); this.methodName = methodName; }
From source file:org.openwms.core.configuration.file.UserPreference.java
/** * Create a new UserPreference.//w w w . j a va 2 s . c om * * @param owner The User's username is set as owner of this preference * @param key The key of this preference * @throws IllegalArgumentException when owner or key is {@literal null} or empty */ public UserPreference(String owner, String key) { // Called from the client-side only. super(); Assert.hasText(owner, "Not allowed to create an UserPreference with an empty owner"); Assert.hasText(key, "Not allowed to create an UserPreference with an empty key"); this.owner = owner; this.key = key; }
From source file:fr.mby.saml2.sp.impl.BasicSaml20SpFacade.java
@Override public IOutgoingSaml getSamlSingleLogoutRequest(final HttpServletRequest request, final SamlBindingEnum binding, final String idpConfigId) throws SamlBuildingException { IOutgoingSaml samlRequest = null;//from ww w . j a va2 s . co m if (StringUtils.hasText(idpConfigId)) { final IIdpConfig idpConfig = this.wayfConfig.findIdpConfigById(idpConfigId); if (idpConfig != null) { final String sessionIndex = this.sessionIndexProvider.retrieveSessionIndexFromRequest(request); Assert.hasText(sessionIndex, "Session Index is needed to build a SLO request !"); samlRequest = idpConfig.getSaml20IdpConnector().buildSaml20SingleLogoutRequest(sessionIndex, binding); } } Assert.notNull(samlRequest, "SAML 2.0 Authn Request wasn't generated !"); return samlRequest; }
From source file:com.baidu.cc.patch.struts2.ReloadableParametersInterceptor.java
/** * do property load here./*from w ww . jav a 2 s .co m*/ */ @Override public void init() { super.init(); ccServerUrl = Constants.getServerUrl(ccServerUrl); ccUser = Constants.getUser(ccUser); ccPassword = Constants.getPassword(ccPassword); Assert.hasLength(ccServerUrl, "property 'ccServerUrl' can not blank"); Assert.hasLength(ccUser, "property 'ccUser' can not blank"); Assert.hasText(ccVersionName, "property 'ccVersionName' can not blank"); configLoader = ConfigLoader.createConfigLoader(this); }
From source file:com.azaptree.services.command.http.handler.WebXmlRequestCommandServiceHandler.java
/** * /* w w w . ja v a 2 s.co m*/ * @param executor * @param continuationTimeoutMillis * @param applicationHttpUrlBase * used when generating the WADL to specify the base HTTP url for <code>/application/resources/@base</code>, e.g. * http://localhost:8080/command-service/ */ public WebXmlRequestCommandServiceHandler(final Executor executor, final long continuationTimeoutMillis, final String applicationHttpUrlBase) { super(executor, continuationTimeoutMillis); Assert.hasText(applicationHttpUrlBase, "applicationHttpUrlBase is required"); this.applicationHttpUrlBase = applicationHttpUrlBase; }
From source file:tomekkup.helenos.dao.ClusterConfigDao.java
@Override public void afterPropertiesSet() throws Exception { Assert.hasText(defaultHost, String.format(HASTEXT_ERROR_MSG, "default.host")); Assert.hasText(defaultClusterName, String.format(HASTEXT_ERROR_MSG, "default.cluster.name")); }