public ConfigurationKey(final String name, final E defaultValue) { CommonUtils.assertNotNull(name, "name must not be null."); this.name = name; this.defaultValue = defaultValue; }
/** * Creates a new principal with the given name. * @param name Principal name. */ public SimplePrincipal(final String name) { this.name = name; CommonUtils.assertNotNull(this.name, "name cannot be null."); }
/** * Creates a new principal with the given name. * @param name Principal name. */ public SimplePrincipal(final String name) { this.name = name; CommonUtils.assertNotNull(this.name, "name cannot be null."); }
/** * Constructs a new TicketValidator with the casServerUrlPrefix. * * @param casServerUrlPrefix the location of the CAS server. */ protected AbstractUrlBasedTicketValidator(final String casServerUrlPrefix) { this.casServerUrlPrefix = casServerUrlPrefix; CommonUtils.assertNotNull(this.casServerUrlPrefix, "casServerUrlPrefix cannot be null."); }
/** * Initializes the component for use. */ public void init() { CommonUtils.assertNotNull(this.logoutUriRegex, "A logout URI regular expression is required."); this.logoutUriPattern = Pattern.compile(this.logoutUriRegex); }
/** * Initializes the component for use. */ public void init() { CommonUtils.assertNotNull(this.logoutUriRegex, "A logout URI regular expression is required."); this.logoutUriPattern = Pattern.compile(this.logoutUriRegex); }
/** * Initializes the component for use. */ public void init() { CommonUtils.assertNotNull(this.logoutUri, "logoutUri cannot be null."); CommonUtils.assertTrue(this.logoutUri.startsWith("/"), "logoutUri must start with \"/\""); }
/** * Constructs a new TicketValidator with the casServerUrlPrefix. * * @param casServerUrlPrefix the location of the CAS server. */ protected AbstractUrlBasedTicketValidator(final String casServerUrlPrefix) { CommonUtils.assertNotNull(casServerUrlPrefix, "casServerUrlPrefix cannot be null."); this.casServerUrlPrefix = CommonUtils.addTrailingSlash(casServerUrlPrefix); }
/** * Creates a new instance from a CAS assertion containing principal information. * * @param assertion CAS assertion resulting from successful ticket validation. * @param roleAttribute Principal attribute containing role data. */ public CasUserIdentity(final Assertion assertion, final String roleAttribute) { CommonUtils.assertNotNull(assertion, "Assertion cannot be null"); this.principal = assertion.getPrincipal(); this.roleAttribute = roleAttribute; }
public DelegatingFilter(final String requestParameterName, final Map<String, Filter> delegators, final boolean exactMatch, final Filter defaultFilter) { CommonUtils.assertNotNull(requestParameterName, "requestParameterName cannot be null."); CommonUtils.assertTrue(!delegators.isEmpty(), "delegators cannot be empty."); this.requestParameterName = requestParameterName; this.delegators = delegators; this.defaultFilter = defaultFilter; this.exactMatch = exactMatch; }
public void init() { super.init(); CommonUtils.assertNotNull(this.ticketValidator, "ticketValidator cannot be null."); }
public void init() { super.init(); CommonUtils.assertNotNull(this.ticketValidator, "ticketValidator cannot be null."); }
/** * Initialization method. Called by Filter's init method or by Spring. Similar in concept to the InitializingBean interface's * afterPropertiesSet(); */ public void init() { CommonUtils.assertNotNull(this.artifactParameterName, "artifactParameterName cannot be null."); CommonUtils.assertNotNull(this.serviceParameterName, "serviceParameterName cannot be null."); CommonUtils.assertTrue(CommonUtils.isNotEmpty(this.serverName) || CommonUtils.isNotEmpty(this.service), "serverName or service must be set."); }
public void init() { super.init(); CommonUtils.assertNotNull(this.proxyGrantingTicketStorage, "proxyGrantingTicketStorage cannot be null."); if (this.timer == null) { this.timer = new Timer(true); } if (this.timerTask == null) { this.timerTask = new CleanUpTimerTask(this.proxyGrantingTicketStorage); } this.timer.schedule(this.timerTask, this.millisBetweenCleanUps, this.millisBetweenCleanUps); }
public void init() { super.init(); String message = String.format( "one of %s and %s must not be null.", ConfigurationKeys.CAS_SERVER_LOGIN_URL.getName(), ConfigurationKeys.CAS_SERVER_URL_PREFIX.getName()); CommonUtils.assertNotNull(this.casServerLoginUrl, message); }
public void testAssertNotNull() { final String CONST_MESSAGE = "test"; CommonUtils.assertNotNull(new Object(), CONST_MESSAGE); try { CommonUtils.assertNotNull(null, CONST_MESSAGE); } catch (IllegalArgumentException e) { assertEquals(CONST_MESSAGE, e.getMessage()); } }
public void start() throws LifecycleException { super.start(); try { CommonUtils.assertNotNull(this.proxyCallbackUrl, "the proxy callback url cannot be null"); CommonUtils.assertTrue(this.proxyCallbackUrl.startsWith("/"), "proxy callback url must start with \"/\""); PROXY_GRANTING_TICKET_STORAGE = ReflectUtils.newInstance(proxyGrantingTicketStorageClass); } catch (final Exception e) { throw new LifecycleException(e); } logger.info("Startup completed."); }
protected void startInternal() throws LifecycleException { super.startInternal(); try { CommonUtils.assertNotNull(this.proxyCallbackUrl, "the proxy callback url cannot be null"); CommonUtils.assertTrue(this.proxyCallbackUrl.startsWith("/"), "proxy callback url must start with \"/\""); PROXY_GRANTING_TICKET_STORAGE = ReflectUtils.newInstance(proxyGrantingTicketStorageClass); } catch (final Exception e) { throw new LifecycleException(e); } logger.info("Startup completed."); }
protected void startInternal() throws LifecycleException { super.startInternal(); try { CommonUtils.assertNotNull(this.proxyCallbackUrl, "the proxy callback url cannot be null"); CommonUtils.assertTrue(this.proxyCallbackUrl.startsWith("/"), "proxy callback url must start with \"/\""); PROXY_GRANTING_TICKET_STORAGE = ReflectUtils.newInstance(proxyGrantingTicketStorageClass); } catch (final Exception e) { throw new LifecycleException(e); } logger.info("Startup completed."); }
protected void startInternal() throws LifecycleException { super.startInternal(); try { CommonUtils.assertNotNull(this.proxyCallbackUrl, "the proxy callback url cannot be null"); CommonUtils.assertTrue(this.proxyCallbackUrl.startsWith("/"), "proxy callback url must start with \"/\""); PROXY_GRANTING_TICKET_STORAGE = ReflectUtils.newInstance(proxyGrantingTicketStorageClass); } catch (final Exception e) { throw new LifecycleException(e); } logger.info("Startup completed."); }