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 String
static final String
static final String
static final String
static final String
static final String
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.cmn.dao.interfaces.IEntity
ATTR_ID
Fields inherited from interface de.xima.cmn.dao.interfaces.ILockableEntity
ATTR_LOCKINGVERSION
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, TYPE_NAME_UUID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttributeValue
(String key) Get theString
value of the attribute with the given keyGet theList
value of the attribute with the given keyGet theMap
value of the attribute with the given keygetName()
getType()
getUUID()
void
putAttribute
(String key, String value) Puts the givenString
value for the given key in the attribute map of this authenticatorvoid
putAttributes
(String key, List<String> values) Puts the givenList
value for the given key in the attribute map of this authenticatorvoid
putAttributes
(String key, Map<String, String> valueMap) Puts the givenMap
value 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.void
setAttributes
(Map<String, String> attributes) void
setCallbackUrlType
(EAuthCallbackUrlType callbackUrlType) void
setCallbackUUID
(UUID callbackUUID) void
setCallbackUUIDString
(String uuidString) void
setConfigState
(EAuthConfigState configState) void
setDescription
(String description) void
setFileMap
(Map<String, T> fileMap) DON'T USE!void
setLoginButtonTitle
(String loginButtonTitle) void
void
setType
(EAuthClientType type) void
void
setUUIDObject
(UUID uuid) toString()
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
Methods 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:
getUUID
in 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:
setUUID
in interfaceIUUIDEntity
-
getUUIDObject
- Specified by:
getUUIDObject
in interfaceIUUIDEntity
-
setUUIDObject
-
getName
- Specified by:
getName
in interfaceINameProviding
- Returns:
- The name of this object.
-
setName
-
getBeschreibung
- Specified by:
getBeschreibung
in interfaceIDescriptionProviding
-
getDescription
- Specified by:
getDescription
in interfaceIDescriptionProviding
- Returns:
- A human-readable description for this object.
-
setDescription
-
getType
- Specified by:
getType
in 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:
getCallbackUUID
in 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:
getCallbackUrlType
in 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:
getLoginButtonTitle
in 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:
getConfigState
in 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:
setAttributes
in interfaceIAuthenticator<T extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>,
? extends IFileDataEntity<?>>>
-
getAttributeValue
Get theString
value of the attribute with the given key- Specified by:
getAttributeValue
in interfaceIAuthenticator<T extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>,
? extends IFileDataEntity<?>>> - Parameters:
key
-String
attribute name- Returns:
String
value of the requested attribute- See Also:
-
getAttributeValueList
Get theList
value of the attribute with the given key- Specified by:
getAttributeValueList
in interfaceIAuthenticator<T extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>,
? extends IFileDataEntity<?>>> - Parameters:
key
-String
attribute name- Returns:
List
value of the requested attribute ornull
if the attribute does not exist or can't be parsed to a list.
-
getAttributeValueMap
Get theMap
value of the attribute with the given key- Specified by:
getAttributeValueMap
in interfaceIAuthenticator<T extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>,
? extends IFileDataEntity<?>>> - Parameters:
key
-String
attribute name- Returns:
Map
value of the requested attribute ornull
if the attribute does not exist or can't be parsed to a map.
-
putAttribute
Puts the givenString
value for the given key in the attribute map of this authenticator- Specified by:
putAttribute
in interfaceIAuthenticator<T extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>,
? extends IFileDataEntity<?>>> - Parameters:
key
-String
attribute namevalue
-String
value of the attribute
-
putAttributes
Puts the givenList
value for the given key in the attribute map of this authenticator- Specified by:
putAttributes
in interfaceIAuthenticator<T extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>,
? extends IFileDataEntity<?>>> - Parameters:
key
-String
attribute namevalues
-List
value of the attribute
-
putAttributes
Puts the givenMap
value for the given key in the attribute map of this authenticator- Specified by:
putAttributes
in interfaceIAuthenticator<T extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>,
? extends IFileDataEntity<?>>> - Parameters:
key
-String
attribute namevalueMap
-Map
value of the attribute
-
removeAttribute
Removes the attributes for the given key- Parameters:
key
-String
key in the attribute map- Returns:
true
if 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:
setFileMap
in interfaceIAuthenticator<T extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>,
? extends IFileDataEntity<?>>>
-
putFile
- Specified by:
putFile
in interfaceIAuthenticator<T extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>,
? extends IFileDataEntity<?>>> - Parameters:
key
-String
to store file underfile
- the file to put into file map- Returns:
- the file previously stored for the given key or
null
if there wasn't any
-
removeFile
Removes the file mapping for the given key. SeeMap.remove(Object)
.- Specified by:
removeFile
in interfaceIAuthenticator<T extends IFileEntity<? extends de.xima.cmn.dao.interfaces.IEntity<Long>,
? extends IFileDataEntity<?>>> - Parameters:
key
-String
key in the file map- Returns:
- the removed file or
null
if there wasn't any
-
toString
- Overrides:
toString
in classAbstractLockableEntity
-