List of usage examples for org.springframework.util Assert hasLength
public static void hasLength(@Nullable String text, Supplier<String> messageSupplier)
From source file:org.uhp.portlets.news.web.AudienceViewController.java
/** * @throws Exception//from ww w. j a va 2 s. c om * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet() */ public void afterPropertiesSet() throws Exception { Assert.notNull(this.getSubService(), "A SubscribeService is required."); Assert.notNull(this.getCm(), "A CategoryManager is required."); Assert.notNull(this.getTm(), "A TopicManager is required."); Assert.notNull(this.getUm(), "A UserManager is required."); Assert.notNull(this.getEm(), "A EntityManager is required."); Assert.hasLength(this.getCtx(), "ctx property should be defined..."); }
From source file:org.uhp.portlets.news.web.PermissionViewController.java
/** * @throws Exception//from w w w . ja v a2s . c o m */ public void afterPropertiesSet() throws Exception { Assert.notNull(this.getUm(), "The property UserManager um in class " + getClass().getSimpleName() + " must not be null."); Assert.hasLength(this.ctx, "ctx property should be defined..."); Assert.notNull(this.getCm(), "The property CategoryManager cm in class " + getClass().getSimpleName() + " must not be null."); Assert.notNull(this.getTm(), "The property TopicManager tm in class " + getClass().getSimpleName() + " must not be null."); Assert.notNull(this.getEm(), "The property EntityManager em in class " + getClass().getSimpleName() + " must not be null."); }
From source file:ro.nextreports.server.web.integration.IntegrationAuthenticationFilter.java
@Override public void afterPropertiesSet() { Assert.hasLength(filterProcessesUrl, "filterProcessesUrl must be specified"); Assert.notNull(userDetailsService, "userDetailsService must be specified"); Assert.isTrue(UrlUtils.isValidRedirectUrl(filterProcessesUrl), filterProcessesUrl + " isn't a valid redirect URL"); }