/** * Set the record version. * * @param ver the new record version, must be > 0 */ protected void setVersion(final long ver) { version = Constraint.isGreaterThan(0, ver, "Version must be greater than zero"); }
/** * Set the attribute context lookup strategy. * * @param strategy the attribute context lookup strategy */ public void setAttributeContextLookupStrategy(Function<ProfileRequestContext, AttributeContext> strategy) { attributeContextLookupStrategy = Constraint.isNotNull(strategy, "Attribute context lookup strategy cannot be null"); }
/** * Set DuoIntegration details to use directly. * * @param duo Duo integration details */ public void setDuoIntegration(@Nonnull final DuoIntegration duo) { ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this); Constraint.isNotNull(duo, "DuoIntegration cannot be null"); duoIntegrationLookupStrategy = FunctionSupport.constant(duo); }
/** * Set the maximum failed attempts within window. * * <p>Defaults to 5.</p> * * @param attempts maximum failed attempts */ public void setMaxAttempts(@Positive final int attempts) { ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this); maxAttemptsLookupStrategy = FunctionSupport.constant( (int) Constraint.isGreaterThan(0, attempts, "Attempts must be greater than zero")); }
/** * Sets the service ticket prefix. Default is ST. * * @param prefix Service ticket prefix. */ public void setServiceTicketPrefix(final String prefix) { serviceTicketPrefix = Constraint.isNotEmpty(prefix, "Prefix cannot be null or empty"); }
/** * Set the attribute context lookup strategy. * * @param strategy the attribute context lookup strategy */ public void setAttributeContextLookupStrategy(final Function<ProfileRequestContext, AttributeContext> strategy) { attributeContextLookupStrategy = Constraint.isNotNull(strategy, "Attribute context lookup strategy cannot be null"); }
/** * Set DuoIntegration details to use directly. * * @param duo Duo integration details */ public void setDuoIntegration(@Nonnull final DuoIntegration duo) { ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this); Constraint.isNotNull(duo, "DuoIntegration cannot be null"); duoIntegrationLookupStrategy = FunctionSupport.constant(duo); }
/** * Sets the proxy ticket prefix. Default is PGT. * * @param prefix Proxy ticket prefix. */ public void setProxyTicketPrefix(final String prefix) { proxyTicketPrefix = Constraint.isNotEmpty(prefix, "Prefix cannot be null or empty"); }
/** {@inheritDoc} */ public void setApplicationContext(final ApplicationContext context) { applicationContext = Constraint.isNotNull(context, "ApplicationContext cannot be null"); }
/** * Constructor. * * @param entityRole the entity */ public EvaluableEntityRoleEntityDescriptorCriterion(QName entityRole) { role = Constraint.isNotNull(entityRole, "Entity Role QName was null"); }
/** {@inheritDoc} */ public void setDateTimeFormatter(DateTimeFormatter newFormatter) { formatter = Constraint.isNotNull(newFormatter, "The formatter cannot be null"); }
/** * Constructor. * * @param serviceableClaz what to look for. */ public ClassBasedServiceStrategy(final Class<? extends ServiceableComponent> serviceableClaz) { serviceClaz = Constraint.isNotNull(serviceableClaz, "Serviceable Class cannot be null"); }
/** {@inheritDoc} */ public void setDateTimeFormatter(DateTimeFormatter newFormatter) { formatter = Constraint.isNotNull(newFormatter, "The formatter cannot be null"); }
/** * Set the strategy for locating {@link SAMLConsentContext}. * * @param strategy lookup strategy */ public void setConsentContextLookupStrategy(@Nonnull final Function<MessageContext,SAMLConsentContext> strategy) { consentContextStrategy = Constraint.isNotNull(strategy, "SAMLConsentContext lookup strategy cannot be null"); }
/** * Constructor. * * @param endpointPredicate the predicate which selects which endpoints to index */ public EndpointMetadataIndex(@Nonnull final Predicate<Endpoint> endpointPredicate) { endpointSelectionPredicate = Constraint.isNotNull(endpointPredicate, "Endpoint selection predicate may not be null"); }
/** * Set lookup strategy for {@link EventContext} to check. * * @param strategy lookup strategy */ public void setEventContextLookupStrategy( @Nonnull final Function<ProfileRequestContext,EventContext> strategy) { eventContextLookupStrategy = Constraint.isNotNull(strategy, "EventContext lookup strategy cannot be null"); }
/** * Set the EntityDescriptor backing store currently in use by the metadata resolver. * * @param newBackingStore the new entity backing store */ protected void setBackingStore(@Nonnull final EntityBackingStore newBackingStore) { entityBackingStore = Constraint.isNotNull(newBackingStore, "EntityBackingStore may not be null"); }
/** * Constructor. * * @param newArtifact the artifact value */ public ArtifactCriterion(@Nonnull final SAMLArtifact newArtifact) { artifact = Constraint.isNotNull(newArtifact, "SAMLArtifact cannot be null"); }
/** * Get the issuer name to use if an assertion must be created. * * @return the issuer name */ @Nonnull public String getIssuerId() { Constraint.isNotNull(issuerId, "Issuer name has not been initialized yet"); return issuerId; }