Package de.xima.fc.entities
Class AAuthenticator<T 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<T>
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>,de.xima.cmn.dao.interfaces.ILockableEntity<Long>,IAuthenticator<T>,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<T extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>,? extends IFileDataEntity<?>>>
extends ALockableEntity
implements IAuthenticator<T>
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 de.xima.fc.entities.AbstractLockableEntity
COL_LOCKINGVERSION, lockingVersionFields inherited from class de.xima.fc.entities.AbstractEntity
COL_ID, idFields inherited from interface de.xima.fc.entities.interfaces.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 de.xima.fc.entities.interfaces.INameProviding
ATTR_NAME, COL_NAMEFields inherited from interface de.xima.fc.entities.interfaces.ITransferableEntity
IMPORT_ID, INVALID_IDFields inherited from interface de.xima.fc.entities.interfaces.IUUIDEntity
ATTR_UUID, INVALID_UUID, INVALID_UUID_OBJECT, NULL_SAFE_UUID_TYPE, TYPE_NAME_UUID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttributeValue(String key) 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()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, T> fileMap) DON'T USE!voidsetLoginButtonTitle(String loginButtonTitle) voidvoidsetType(EAuthClientType type) voidvoidsetUUIDObject(UUID uuid) toString()Methods inherited from class de.xima.fc.entities.AbstractLockableEntity
entityHasChanged, getLockingVersion, setLockingVersionMethods inherited from class de.xima.fc.entities.AbstractEntity
asIntValue, isPersisted, setId, setIdMethods inherited from class de.xima.cmn.dao.model.AEntity
compareTo, equals, getDBTableName, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface de.xima.fc.entities.interfaces.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,T extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>, fileMap? extends IFileDataEntity<?>>>
-
-
Constructor Details
-
AAuthenticator
public AAuthenticator()
-
-
Method Details
-
getUUID
- Specified by:
getUUIDin interfaceIUUIDEntity- Returns:
- UUID (Universal Unique Identifier) that identifies this type of entity. Usually is unique within a
context, e.g.
Mandant,Projekt, ...
-
setUUID
- Specified by:
setUUIDin interfaceIUUIDEntity
-
getUUIDObject
- Specified by:
getUUIDObjectin interfaceIUUIDEntity
-
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<T 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<T 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<T 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<T 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<T 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<T 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<T extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>,? extends IFileDataEntity<?>>> - Parameters:
key-Stringattribute name- Returns:
Stringvalue of the requested attribute- See Also:
-
getAttributeValueList
Get theListvalue of the attribute with the given key- Specified by:
getAttributeValueListin interfaceIAuthenticator<T 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<T 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<T 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<T 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<T extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>,? extends IFileDataEntity<?>>> - Parameters:
key-Stringattribute namevalueMap-Mapvalue of the attribute
-
removeAttribute
Removes the attributes for the given key- Parameters:
key-Stringkey in the attribute map- Returns:
trueif the attribute was removed
-
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<T extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>,? extends IFileDataEntity<?>>>
-
putFile
- Specified by:
putFilein interfaceIAuthenticator<T 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<T 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
-