Refine search
/** * Create an instance with a matching pattern. * @param matchingPattern the matching pattern, possibly not the same as the * input pattern, e.g. inputPattern="/foo" and matchingPattern="/foo/". * @param lookupPath the lookup path extracted from the request * @param pathMatcher the PathMatcher used */ public RequestMatchResult(String matchingPattern, String lookupPath, PathMatcher pathMatcher) { Assert.hasText(matchingPattern, "'matchingPattern' is required"); Assert.hasText(lookupPath, "'lookupPath' is required"); Assert.notNull(pathMatcher, "'pathMatcher' is required"); this.matchingPattern = matchingPattern; this.lookupPath = lookupPath; this.pathMatcher = pathMatcher; }
/** * Constructor with a path and an {@code javax.websocket.Endpoint}. * @param path the endpoint path * @param endpoint the endpoint instance */ public DefaultServerEndpointConfig(String path, Endpoint endpoint) { Assert.hasText(path, "path must not be empty"); Assert.notNull(endpoint, "endpoint must not be null"); this.path = path; this.endpoint = endpoint; }
/** * Create a new {@code PropertySource} with the given name and source object. */ public PropertySource(String name, T source) { Assert.hasText(name, "Property source name must contain at least one character"); Assert.notNull(source, "Property source must not be null"); this.name = name; this.source = source; }
/** * Creates a new instance of the {@link DefaultScopedObject} class. * @param beanFactory the {@link ConfigurableBeanFactory} that holds the scoped target object * @param targetBeanName the name of the target bean */ public DefaultScopedObject(ConfigurableBeanFactory beanFactory, String targetBeanName) { Assert.notNull(beanFactory, "BeanFactory must not be null"); Assert.hasText(targetBeanName, "'targetBeanName' must not be empty"); this.beanFactory = beanFactory; this.targetBeanName = targetBeanName; }
/** * Create a new {@link ServerEndpointRegistration} instance from an * {@code javax.websocket.Endpoint} instance. * @param path the endpoint path * @param endpoint the endpoint instance */ public ServerEndpointRegistration(String path, Endpoint endpoint) { Assert.hasText(path, "Path must not be empty"); Assert.notNull(endpoint, "Endpoint must not be null"); this.path = path; this.endpoint = endpoint; this.endpointProvider = null; }
@Override public void registerBeanDefinition(String beanName, BeanDefinition beanDefinition) throws BeanDefinitionStoreException { Assert.hasText(beanName, "'beanName' must not be empty"); Assert.notNull(beanDefinition, "BeanDefinition must not be null"); this.beanDefinitionMap.put(beanName, beanDefinition); }
public LocalSimpSubscription(String id, String destination, LocalSimpSession session) { Assert.notNull(id, "Id must not be null"); Assert.hasText(destination, "Destination must not be empty"); Assert.notNull(session, "Session must not be null"); this.id = id; this.destination = destination; this.session = session; }
/** * Constructor. * @param userRegistry the registry with local and remote user registry information * @param brokerTemplate template for broadcasting local registry information * @param broadcastDestination the destination to broadcast to * @param scheduler the task scheduler to use */ public UserRegistryMessageHandler(MultiServerUserRegistry userRegistry, SimpMessagingTemplate brokerTemplate, String broadcastDestination, TaskScheduler scheduler) { Assert.notNull(userRegistry, "'userRegistry' is required"); Assert.notNull(brokerTemplate, "'brokerTemplate' is required"); Assert.hasText(broadcastDestination, "'broadcastDestination' is required"); Assert.notNull(scheduler, "'scheduler' is required"); this.userRegistry = userRegistry; this.brokerTemplate = brokerTemplate; this.broadcastDestination = broadcastDestination; this.scheduler = scheduler; }
/** * Create a new {@code PropertySource} with the given name and source object. */ public PropertySource(String name, T source) { Assert.hasText(name, "Property source name must contain at least one character"); Assert.notNull(source, "Property source must not be null"); this.name = name; this.source = source; }
protected InstanceEvent(InstanceId instance, long version, String type, Instant timestamp) { Assert.notNull(instance, "'instance' must not be null"); Assert.notNull(timestamp, "'timestamp' must not be null"); Assert.hasText(type, "'type' must not be empty"); this.instance = instance; this.version = version; this.timestamp = timestamp; this.type = type; } }
public DefaultToken(String key, long keyCreationTime, String extendedInformation) { Assert.hasText(key, "Key required"); Assert.notNull(extendedInformation, "Extended information cannot be null"); this.key = key; this.keyCreationTime = keyCreationTime; this.extendedInformation = extendedInformation; }
/** * Create a new {@link ServerEndpointRegistration} instance from an * {@code javax.websocket.Endpoint} class. * @param path the endpoint path * @param endpointClass the endpoint class */ public ServerEndpointRegistration(String path, Class<? extends Endpoint> endpointClass) { Assert.hasText(path, "Path must not be empty"); Assert.notNull(endpointClass, "Endpoint Class must not be null"); this.path = path; this.endpoint = null; this.endpointProvider = new BeanCreatingHandlerProvider<>(endpointClass); }
@Override public void registerBeanDefinition(String beanName, BeanDefinition beanDefinition) throws BeanDefinitionStoreException { Assert.hasText(beanName, "'beanName' must not be empty"); Assert.notNull(beanDefinition, "BeanDefinition must not be null"); this.beanDefinitionMap.put(beanName, beanDefinition); }
public SessionInformation(Object principal, String sessionId, Date lastRequest) { Assert.notNull(principal, "Principal required"); Assert.hasText(sessionId, "SessionId required"); Assert.notNull(lastRequest, "LastRequest required"); this.principal = principal; this.sessionId = sessionId; this.lastRequest = lastRequest; }
private void validateAuthorities(Collection<? extends GrantedAuthority> authorities) { Assert.notNull(authorities, "Authorities list must not be null"); for (GrantedAuthority authority : authorities) { Assert.notNull(authority, "Authorities list contains a null entry"); Assert.hasText(authority.getAuthority(), "getAuthority() method must return a non-empty string"); } } }
public AbstractAclProvider(AclService aclService, String processConfigAttribute, List<Permission> requirePermission) { Assert.hasText(processConfigAttribute, "A processConfigAttribute is mandatory"); Assert.notNull(aclService, "An AclService is mandatory"); if (requirePermission == null || requirePermission.isEmpty()) { throw new IllegalArgumentException( "One or more requirePermission entries is mandatory"); } this.aclService = aclService; this.processConfigAttribute = processConfigAttribute; this.requirePermission = requirePermission; }
public void afterPropertiesSet() throws Exception { Assert.notNull(this.authenticationUserDetailsService, "An authenticationUserDetailsService must be set"); Assert.notNull(this.ticketValidator, "A ticketValidator must be set"); Assert.notNull(this.statelessTicketCache, "A statelessTicketCache must be set"); Assert.hasText( this.key, "A Key is required so CasAuthenticationProvider can identify tokens it previously authenticated"); Assert.notNull(this.messages, "A message source must be set"); }