Class AsDomainNameStringValidator
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.metadata.validate.BaseValidator
net.shibboleth.metadata.validate.BaseAsValidator<String,InternetDomainName>
net.shibboleth.metadata.validate.string.AsDomainNameStringValidator
- All Implemented Interfaces:
Validator<String>,net.shibboleth.shared.component.Component,net.shibboleth.shared.component.DestructableComponent,net.shibboleth.shared.component.IdentifiableComponent,net.shibboleth.shared.component.IdentifiedComponent,net.shibboleth.shared.component.InitializableComponent
public class AsDomainNameStringValidator
extends BaseAsValidator<String,InternetDomainName>
implements Validator<String>
A
Validator that checks String values as domain names by converting the
value to an InternetDomainName and applying a sequence of validators to that value.
This validator fails (and returns Validator.Action.DONE) if the
value can not be converted to an InternetDomainName.
Otherwise, the validator applies the sequence of validators to the InternetDomainName and returns
the value of that sequence.
- Since:
- 0.10.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.shibboleth.metadata.validate.Validator
Validator.Action -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected InternetDomainNameConvert from the old value type to the new.Methods inherited from class net.shibboleth.metadata.validate.BaseAsValidator
doDestroy, doInitialize, getValidators, isConversionRequired, setConversionRequired, setValidators, validateMethods inherited from class net.shibboleth.metadata.validate.BaseValidator
addError, addErrorMessage, addErrorMessage, addErrorMessage, addStatus, addWarning, getMessage, makeComponentId, setMessageMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.DestructableComponent
destroy, isDestroyedMethods inherited from interface net.shibboleth.shared.component.IdentifiableComponent
setIdMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getIdMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitialized
-
Constructor Details
-
AsDomainNameStringValidator
public AsDomainNameStringValidator()
-
-
Method Details
-
convert
@Nonnull protected InternetDomainName convert(@Nonnull String domain) throws IllegalArgumentException Description copied from class:BaseAsValidatorConvert from the old value type to the new.- Specified by:
convertin classBaseAsValidator<String,InternetDomainName> - Parameters:
domain- a value of the old type- Returns:
- a value of the new type
- Throws:
IllegalArgumentException- if a conversion can not be performed
-