Class AAuthenticator<TFile extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>, ? extends IFileDataEntity<?>>>
java.lang.Object
de.xima.cmn.dao.model.AEntity<Long>
de.xima.fc.entities.AbstractEntity
de.xima.fc.entities.AbstractLockableEntity
de.xima.fc.entities.ALockableEntity
de.xima.fc.entities.AAuthenticator<TFile>
- Type Parameters:
TFile- The type of the authenticator, i.e. eitherClientAuthenticatororSystemAuthenticator.
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>, de.xima.cmn.dao.interfaces.ILockableEntity<Long>, IAuthenticator<TFile>, IDescriptionProviding, ILockingVersionProviding, INameProviding, ITransferable, ITransferableEntity, ITransferableLockableEntity, IUUIDEntity, Serializable, Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>
- Direct Known Subclasses:
ClientAuthenticator, SystemAuthenticator
@MappedSuperclass
public abstract class AAuthenticator<TFile extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>, ? extends IFileDataEntity<?>>>
extends ALockableEntity
implements IAuthenticator<TFile>
Abstract base class for user authenticators
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class AbstractLockableEntity
COL_LOCKINGVERSION, lockingVersionFields inherited from class AbstractEntity
COL_ID, idFields inherited from interface IDescriptionProviding
ATTR_BESCHREIBUNG, ATTR_DESCRIPTION, COL_DESCRIPTIONFields inherited from interface de.xima.cmn.dao.interfaces.IEntity
ATTR_IDFields inherited from interface de.xima.cmn.dao.interfaces.ILockableEntity
ATTR_LOCKINGVERSIONFields inherited from interface INameProviding
ATTR_NAME, COL_NAMEFields inherited from interface ITransferableEntity
IMPORT_ID, INVALID_IDFields inherited from interface IUUIDEntity
ATTR_UUID, INVALID_UUID, INVALID_UUID_OBJECT, NULL_SAFE_UUID_TYPE, NULLABLE_UUID_TYPE, TYPE_NAME_UUID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttributeValue(String key) Get theStringvalue of the attribute with the given keygetAttributeValue(String key, String defaultValue) Get theStringvalue of the attribute with the given keyGet theListvalue of the attribute with the given keyGet theMapvalue of the attribute with the given keygetName()getType()getUUID()Gets the UUID (universal unique identifier) that uniquely identifies this type of entity.Gets the UUID (universal unique identifier) that uniquely identifies this type of entity.voidputAttribute(String key, String value) Puts the givenStringvalue for the given key in the attribute map of this authenticatorvoidputAttributes(String key, List<String> values) Puts the givenListvalue for the given key in the attribute map of this authenticatorvoidputAttributes(String key, Map<String, String> valueMap) Puts the givenMapvalue for the given key in the attribute map of this authenticatorremoveAttribute(String key) Removes the attributes for the given keyremoveFile(String key) Removes the file mapping for the given key.voidsetAttributes(Map<String, String> attributes) voidsetCallbackUrlType(EAuthCallbackUrlType callbackUrlType) voidsetCallbackUUID(UUID callbackUUID) voidsetCallbackUUIDString(String uuidString) voidsetConfigState(EAuthConfigState configState) voidsetDescription(String description) voidsetFileMap(Map<String, TFile> fileMap) DON'T USE!voidsetLoginButtonTitle(String loginButtonTitle) voidvoidsetType(EAuthClientType type) voidSets the UUID (universal unique identifier) that uniquely identifies this type of entity.voidsetUUIDObject(UUID uuid) toString()Methods inherited from class AbstractLockableEntity
entityHasChanged, getLockingVersion, setLockingVersionMethods inherited from class AbstractEntity
asIntValue, isPersisted, setId, setIdMethods inherited from class de.xima.cmn.dao.model.AEntity
compareTo, equals, getDBTableName, hashCodeMethods inherited from interface Comparable
compareToMethods inherited from interface IAuthenticator
getAttributes, getFileMap, getIdentifierMethods inherited from interface de.xima.cmn.dao.interfaces.IEntity
getId, isPersisted, setId
-
Field Details
-
COL_UUID
- See Also:
-
COL_CALLBACK_URL_TYPE
- See Also:
-
ATTR_TYPE
- See Also:
-
ATTR_CALLBACK_UUID
- See Also:
-
ATTR_CALLBACK_URL_TYPE
- See Also:
-
ATTR_CONFIG_STATE
- See Also:
-
attributes
-
fileMap
protected Map<String, TFile extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>, ? extends IFileDataEntity<?>>> fileMap
-
-
Constructor Details
-
AAuthenticator
public AAuthenticator()
-
-
Method Details
-
getUUID
Description copied from interface:IUUIDEntityGets the UUID (universal unique identifier) that uniquely identifies this type of entity. Whether the UUID must be globally unique or only with within a context depends on the type of entity. Common contexts are for exampleclient scopesorproject scope.- Specified by:
getUUIDin interfaceIUUIDEntity- Returns:
- The UUID of the entity.
-
setUUID
Description copied from interface:IUUIDEntitySets the UUID (universal unique identifier) that uniquely identifies this type of entity. Whether the UUID must be globally unique or only with within a context depends on the type of entity. Common contexts are for exampleclient scopesorproject scope.- Specified by:
setUUIDin interfaceIUUIDEntity- Parameters:
uuid- The UUID of the entity.
-
getUUIDObject
Description copied from interface:IUUIDEntityGets the UUID (universal unique identifier) that uniquely identifies this type of entity. Whether the UUID must be globally unique or only with within a context depends on the type of entity. Common contexts are for exampleclient scopesorproject scope.- Specified by:
getUUIDObjectin interfaceIUUIDEntity- Returns:
- The UUID of the entity.
-
setUUIDObject
-
getName
- Specified by:
getNamein interfaceINameProviding- Returns:
- The name of this object.
-
setName
-
getBeschreibung
- Specified by:
getBeschreibungin interfaceIDescriptionProviding
-
getDescription
- Specified by:
getDescriptionin interfaceIDescriptionProviding- Returns:
- A human-readable description for this object.
-
setDescription
-
getType
- Specified by:
getTypein interfaceIAuthenticator<TFile extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>, ? extends IFileDataEntity<?>>>- Returns:
- The authenticator type as selected by the user, such as Google, Facebook or NTLM.
-
setType
-
getCallbackUUID
- Specified by:
getCallbackUUIDin interfaceIAuthenticator<TFile extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>, ? extends IFileDataEntity<?>>>- Returns:
- The UUID that uniquely identifies this client. It is added to the callback URL (the URL to which the identity provider redirects upon success or failure).
-
setCallbackUUID
-
getCallbackUrlType
- Specified by:
getCallbackUrlTypein interfaceIAuthenticator<TFile extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>, ? extends IFileDataEntity<?>>>- Returns:
- the type of callback URL to be used by this authenticator.
-
setCallbackUrlType
-
getCallbackUUIDString
-
setCallbackUUIDString
-
getLoginButtonTitle
- Specified by:
getLoginButtonTitlein interfaceIAuthenticator<TFile extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>, ? extends IFileDataEntity<?>>>- Returns:
- The name displayed on the login button that appears on the login page.
-
setLoginButtonTitle
-
getConfigState
- Specified by:
getConfigStatein interfaceIAuthenticator<TFile extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>, ? extends IFileDataEntity<?>>>- Returns:
- The current state of this configuration, i.e. whether it still misses some configuration or was configured completely and is ready to be used.
-
setConfigState
-
setAttributes
- Specified by:
setAttributesin interfaceIAuthenticator<TFile extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>, ? extends IFileDataEntity<?>>>
-
getAttributeValue
Get theStringvalue of the attribute with the given key- Specified by:
getAttributeValuein interfaceIAuthenticator<TFile extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>, ? extends IFileDataEntity<?>>>- Parameters:
key-Stringattribute name- Returns:
Stringvalue of the requested attribute- See Also:
-
getAttributeValue
Get theStringvalue of the attribute with the given key- Specified by:
getAttributeValuein interfaceIAuthenticator<TFile extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>, ? extends IFileDataEntity<?>>>- Parameters:
key-Stringattribute namedefaultValue-Stringdefault value- Returns:
Stringvalue of the requested attribute or the default value if the attribute does not exist- See Also:
-
getAttributeValueList
Get theListvalue of the attribute with the given key- Specified by:
getAttributeValueListin interfaceIAuthenticator<TFile extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>, ? extends IFileDataEntity<?>>>- Parameters:
key-Stringattribute name- Returns:
Listvalue of the requested attribute ornullif the attribute does not exist or can't be parsed to a list.
-
getAttributeValueMap
Get theMapvalue of the attribute with the given key- Specified by:
getAttributeValueMapin interfaceIAuthenticator<TFile extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>, ? extends IFileDataEntity<?>>>- Parameters:
key-Stringattribute name- Returns:
Mapvalue of the requested attribute ornullif the attribute does not exist or can't be parsed to a map.
-
putAttribute
Puts the givenStringvalue for the given key in the attribute map of this authenticator- Specified by:
putAttributein interfaceIAuthenticator<TFile extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>, ? extends IFileDataEntity<?>>>- Parameters:
key-Stringattribute namevalue-Stringvalue of the attribute
-
putAttributes
Puts the givenListvalue for the given key in the attribute map of this authenticator- Specified by:
putAttributesin interfaceIAuthenticator<TFile extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>, ? extends IFileDataEntity<?>>>- Parameters:
key-Stringattribute namevalues-Listvalue of the attribute
-
putAttributes
Puts the givenMapvalue for the given key in the attribute map of this authenticator- Specified by:
putAttributesin interfaceIAuthenticator<TFile extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>, ? extends IFileDataEntity<?>>>- Parameters:
key-Stringattribute namevalueMap-Mapvalue of the attribute
-
removeAttribute
-
setFileMap
DON'T USE! Hibernate is managing this collection, so if it is overridden, Hibernate can't keep track of it anymore. UseputFile(String, IFileEntity),removeFile(String)orIAuthenticator.getFileMap()instead to modify the map.- Specified by:
setFileMapin interfaceIAuthenticator<TFile extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>, ? extends IFileDataEntity<?>>>
-
putFile
- Specified by:
putFilein interfaceIAuthenticator<TFile extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>, ? extends IFileDataEntity<?>>>- Parameters:
key-Stringto store file underfile- the file to put into file map- Returns:
- the file previously stored for the given key or
nullif there wasn't any
-
removeFile
Removes the file mapping for the given key. SeeMap.remove(Object).- Specified by:
removeFilein interfaceIAuthenticator<TFile extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>, ? extends IFileDataEntity<?>>>- Parameters:
key-Stringkey in the file map- Returns:
- the removed file or
nullif there wasn't any
-
toString
- Overrides:
toStringin classAbstractLockableEntity
-