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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringATTR_CALLBACK_URL_TYPEstatic StringATTR_CALLBACK_UUIDstatic StringATTR_CONFIG_STATEstatic StringATTR_TYPEprotected Map<String,String>attributesstatic StringCOL_CALLBACK_URL_TYPEstatic StringCOL_UUIDprotected Map<String,T>fileMap-
Fields inherited from class de.xima.fc.entities.AbstractLockableEntity
COL_LOCKINGVERSION, lockingVersion
-
Fields inherited from class de.xima.fc.entities.AbstractEntity
COL_ID, id
-
Fields inherited from interface de.xima.fc.entities.interfaces.IDescriptionProviding
ATTR_BESCHREIBUNG, ATTR_DESCRIPTION, COL_DESCRIPTION
-
Fields inherited from interface de.xima.fc.entities.interfaces.INameProviding
ATTR_NAME, COL_NAME
-
Fields inherited from interface de.xima.fc.entities.interfaces.ITransferableEntity
IMPORT_ID, INVALID_ID
-
Fields inherited from interface de.xima.fc.entities.interfaces.IUUIDEntity
ATTR_UUID, INVALID_UUID, INVALID_UUID_OBJECT, NULL_SAFE_UUID_TYPE, NULLABLE_UUID_TYPE, TYPE_NAME_UUID
-
-
Constructor Summary
Constructors Constructor Description AAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAttributeValue(String key)Get theStringvalue of the attribute with the given keyList<String>getAttributeValueList(String key)Get theListvalue of the attribute with the given keyMap<String,String>getAttributeValueMap(String key)Get theMapvalue of the attribute with the given keyStringgetBeschreibung()EAuthCallbackUrlTypegetCallbackUrlType()UUIDgetCallbackUUID()StringgetCallbackUUIDString()EAuthConfigStategetConfigState()StringgetDescription()StringgetLoginButtonTitle()StringgetName()EAuthClientTypegetType()StringgetUUID()Gets the UUID (universal unique identifier) that uniquely identifies this type of entity.UUIDgetUUIDObject()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 authenticatorTputFile(String key, T file)StringremoveAttribute(String key)Removes the attributes for the given keyTremoveFile(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! Hibernate is managing this collection, so if it is overridden, Hibernate can't keep track of it anymore.voidsetLoginButtonTitle(String loginButtonTitle)voidsetName(String name)voidsetType(EAuthClientType type)voidsetUUID(String uuid)Sets the UUID (universal unique identifier) that uniquely identifies this type of entity.voidsetUUIDObject(UUID uuid)StringtoString()-
Methods inherited from class de.xima.fc.entities.AbstractLockableEntity
entityHasChanged, getLockingVersion, setLockingVersion
-
Methods inherited from class de.xima.fc.entities.AbstractEntity
asIntValue, isPersisted, setId, setId
-
Methods inherited from class de.xima.cmn.dao.model.AEntity
compareTo, equals, getDBTableName, hashCode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface de.xima.fc.entities.interfaces.IAuthenticator
getAttributes, getFileMap, getIdentifier
-
-
-
-
Field Detail
-
COL_UUID
public static final String COL_UUID
- See Also:
- Constant Field Values
-
COL_CALLBACK_URL_TYPE
public static final String COL_CALLBACK_URL_TYPE
- See Also:
- Constant Field Values
-
ATTR_TYPE
public static final String ATTR_TYPE
- See Also:
- Constant Field Values
-
ATTR_CALLBACK_UUID
public static final String ATTR_CALLBACK_UUID
- See Also:
- Constant Field Values
-
ATTR_CALLBACK_URL_TYPE
public static final String ATTR_CALLBACK_URL_TYPE
- See Also:
- Constant Field Values
-
ATTR_CONFIG_STATE
public static final String ATTR_CONFIG_STATE
- See Also:
- Constant Field Values
-
fileMap
protected Map<String,T extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>,? extends IFileDataEntity<?>>> fileMap
-
-
Method Detail
-
getUUID
public String 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
public void setUUID(String uuid)
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
public UUID 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
public void setUUIDObject(UUID uuid)
-
getName
public String getName()
- Specified by:
getNamein interfaceINameProviding- Returns:
- The name of this object.
-
setName
public void setName(String name)
-
getBeschreibung
public String getBeschreibung()
- Specified by:
getBeschreibungin interfaceIDescriptionProviding
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceIDescriptionProviding- Returns:
- A human-readable description for this object.
-
setDescription
public void setDescription(String description)
-
getType
public EAuthClientType 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
public void setType(EAuthClientType type)
-
getCallbackUUID
public UUID 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
public void setCallbackUUID(UUID callbackUUID)
-
getCallbackUrlType
public EAuthCallbackUrlType 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
public void setCallbackUrlType(EAuthCallbackUrlType callbackUrlType)
-
getCallbackUUIDString
public String getCallbackUUIDString()
-
setCallbackUUIDString
public void setCallbackUUIDString(String uuidString)
-
getLoginButtonTitle
public String 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
public void setLoginButtonTitle(String loginButtonTitle)
-
getConfigState
public EAuthConfigState 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
public void setConfigState(EAuthConfigState configState)
-
setAttributes
public void setAttributes(Map<String,String> attributes)
- Specified by:
setAttributesin interfaceIAuthenticator<T extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>,? extends IFileDataEntity<?>>>
-
getAttributeValue
public String getAttributeValue(String key)
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:
IAuthenticator.getAttributes()
-
getAttributeValueList
public List<String> getAttributeValueList(String key)
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
public Map<String,String> getAttributeValueMap(String key)
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
public void putAttribute(String key, String value)
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
public void putAttributes(String key, List<String> values)
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
public void putAttributes(String key, Map<String,String> valueMap)
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
public String removeAttribute(String key)
Removes the attributes for the given key- Parameters:
key-Stringkey in the attribute map- Returns:
trueif the attribute was removed
-
setFileMap
public void setFileMap(Map<String,T> fileMap)
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
public T putFile(String key, T file)
- 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
public T removeFile(String key)
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
public String toString()
- Overrides:
toStringin classAbstractLockableEntity
-
-