Package de.xima.fc.entities
Class SystemAuthenticator
- 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<SystemAuthenticatorFile>
-
- de.xima.fc.entities.SystemAuthenticator
-
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>,de.xima.cmn.dao.interfaces.ILockableEntity<Long>,ILocalizationProviding<SystemAuthenticator,SystemAuthenticatorLocalization>,IAuthenticator<SystemAuthenticatorFile>,IDescriptionProviding,ILockingVersionProviding,INameProviding,ITransferable,ITransferableEntity,ITransferableLockableEntity,IUUIDEntity,Serializable,Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>
@Entity public class SystemAuthenticator extends AAuthenticator<SystemAuthenticatorFile> implements ILocalizationProviding<SystemAuthenticator,SystemAuthenticatorLocalization>
Entity model for user authenticators in system scope- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringATTR_ALLOW_ALL_CLIENTSstatic StringATTR_ALLOWED_CLIENTSstatic StringATTR_DEFAULT_LOCALEstatic StringATTR_LOCALIZATIONSstatic StringATTR_OMIT_WELCOME_MAILstatic StringATTR_VERIFY_USER_AUTOMATICALLYstatic StringCOL_DEFAULT_LOCALEstatic StringCOL_FLAG_ALLOW_ALL_CLIENTSstatic StringCOL_OMIT_WELCOME_MAILstatic StringCOL_VERIFY_USER_AUTOMATICALLY-
Fields inherited from class de.xima.fc.entities.AAuthenticator
ATTR_CALLBACK_URL_TYPE, ATTR_CALLBACK_UUID, ATTR_CONFIG_STATE, ATTR_TYPE, attributes, COL_CALLBACK_URL_TYPE, COL_UUID, 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 SystemAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Mandant>getAllowedClients()Map<String,String>getAttributes()LocalegetDefaultLocale()StringgetDisplayName(Locale locale)Get the display name of the authenticator for the given locale.Map<String,SystemAuthenticatorFile>getFileMap()LonggetId()StringgetIdentifier()List<SystemAuthenticatorLocalization>getLocalizations()Gets all localization associated with this authenticator.LocalegetLocalizationsDefaultLocale()Gets the default locale for this providing object.booleanisAllowAllClients()booleanisAllowedForTenant(UUID tenantUuid)Checks if the authenticator is allowed for tenant with the given UUID.booleanisOmitWelcomeMail()booleanisVerifyUserAutomatically()SystemAuthenticatorLocalizationnewLocalization()Creates a new localization object.voidonLoad()SystemAuthenticatorFileputFile(String key, SystemAuthenticatorFile file)voidsetAllowAllClients(boolean allowAllClients)voidsetAllowedClients(List<Mandant> allowedClients)voidsetDefaultLocale(Locale defaultLocale)voidsetLocalizations(List<SystemAuthenticatorLocalization> localizations)Sets all localization associated with this authenticator.voidsetOmitWelcomeMail(boolean omitWelcomeMail)voidsetVerifyUserAutomatically(boolean verifyUserAutomatically)-
Methods inherited from class de.xima.fc.entities.AAuthenticator
getAttributeValue, getAttributeValue, getAttributeValueList, getAttributeValueMap, getBeschreibung, getCallbackUrlType, getCallbackUUID, getCallbackUUIDString, getConfigState, getDescription, getLoginButtonTitle, getName, getType, getUUID, getUUIDObject, putAttribute, putAttributes, putAttributes, removeAttribute, removeFile, setAttributes, setCallbackUrlType, setCallbackUUID, setCallbackUUIDString, setConfigState, setDescription, setFileMap, setLoginButtonTitle, setName, setType, setUUID, setUUIDObject, 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.i18n.ILocalizationProviding
getKeys, getLocales, getLocalization, getLocalizationData, setLocalization
-
-
-
-
Field Detail
-
COL_FLAG_ALLOW_ALL_CLIENTS
public static final String COL_FLAG_ALLOW_ALL_CLIENTS
- See Also:
- Constant Field Values
-
COL_OMIT_WELCOME_MAIL
public static final String COL_OMIT_WELCOME_MAIL
- See Also:
- Constant Field Values
-
COL_VERIFY_USER_AUTOMATICALLY
public static final String COL_VERIFY_USER_AUTOMATICALLY
- See Also:
- Constant Field Values
-
COL_DEFAULT_LOCALE
public static final String COL_DEFAULT_LOCALE
- See Also:
- Constant Field Values
-
ATTR_ALLOWED_CLIENTS
public static final String ATTR_ALLOWED_CLIENTS
- See Also:
- Constant Field Values
-
ATTR_ALLOW_ALL_CLIENTS
public static final String ATTR_ALLOW_ALL_CLIENTS
- See Also:
- Constant Field Values
-
ATTR_OMIT_WELCOME_MAIL
public static final String ATTR_OMIT_WELCOME_MAIL
- See Also:
- Constant Field Values
-
ATTR_VERIFY_USER_AUTOMATICALLY
public static final String ATTR_VERIFY_USER_AUTOMATICALLY
- See Also:
- Constant Field Values
-
ATTR_LOCALIZATIONS
public static final String ATTR_LOCALIZATIONS
- See Also:
- Constant Field Values
-
ATTR_DEFAULT_LOCALE
public static final String ATTR_DEFAULT_LOCALE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getIdentifier
public String getIdentifier()
- Specified by:
getIdentifierin interfaceIAuthenticator<SystemAuthenticatorFile>- Returns:
- a unique key identifying this authenticator within the system, which is used in
IAuthenticatorConfigs
-
getAttributes
public Map<String,String> getAttributes()
- Specified by:
getAttributesin interfaceIAuthenticator<SystemAuthenticatorFile>- Returns:
- A map of all key-value pairs as configured by the user for this authenticator. Please note that the value may be a JSON object, depending on the key.
-
getFileMap
public Map<String,SystemAuthenticatorFile> getFileMap()
- Specified by:
getFileMapin interfaceIAuthenticator<SystemAuthenticatorFile>- Returns:
- A map of files the user uploaded when they configured this authenticator, such as SSL certificates or configuration files.
-
putFile
public SystemAuthenticatorFile putFile(String key, SystemAuthenticatorFile file)
Description copied from class:AAuthenticator- Specified by:
putFilein interfaceIAuthenticator<SystemAuthenticatorFile>- Overrides:
putFilein classAAuthenticator<SystemAuthenticatorFile>- 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
-
isAllowAllClients
public boolean isAllowAllClients()
-
setAllowAllClients
public void setAllowAllClients(boolean allowAllClients)
-
isAllowedForTenant
public boolean isAllowedForTenant(UUID tenantUuid)
Checks if the authenticator is allowed for tenant with the given UUID.- Parameters:
tenantUuid- UUID of the tenant to check.- Returns:
trueif the authenticator is allowed for the given tenant,falseotherwise.
-
isOmitWelcomeMail
public boolean isOmitWelcomeMail()
-
setOmitWelcomeMail
public void setOmitWelcomeMail(boolean omitWelcomeMail)
-
isVerifyUserAutomatically
public boolean isVerifyUserAutomatically()
-
setVerifyUserAutomatically
public void setVerifyUserAutomatically(boolean verifyUserAutomatically)
-
getLocalizations
public List<SystemAuthenticatorLocalization> getLocalizations()
Gets all localization associated with this authenticator. An authenticator may contain a localized display name.- Specified by:
getLocalizationsin interfaceILocalizationProviding<SystemAuthenticator,SystemAuthenticatorLocalization>- Returns:
- All localization associated with this authenticator.
-
setLocalizations
public void setLocalizations(List<SystemAuthenticatorLocalization> localizations)
Sets all localization associated with this authenticator. An authenticator may contain a localized display name.- Parameters:
localizations- All localization associated with this authenticator.
-
getDefaultLocale
public Locale getDefaultLocale()
-
setDefaultLocale
public void setDefaultLocale(Locale defaultLocale)
-
newLocalization
public SystemAuthenticatorLocalization newLocalization()
Description copied from interface:ILocalizationProvidingCreates a new localization object.- Specified by:
newLocalizationin interfaceILocalizationProviding<SystemAuthenticator,SystemAuthenticatorLocalization>- Returns:
- a new localization object
-
getLocalizationsDefaultLocale
public Locale getLocalizationsDefaultLocale()
Description copied from interface:ILocalizationProvidingGets the default locale for this providing object.- Specified by:
getLocalizationsDefaultLocalein interfaceILocalizationProviding<SystemAuthenticator,SystemAuthenticatorLocalization>- Returns:
- the default locale for this providing object
-
getDisplayName
public String getDisplayName(Locale locale)
Get the display name of the authenticator for the given locale. If no localization is available for the given locale, the name of the authenticator is returned.- Parameters:
locale- The locale for which the display name should be returned.
-
onLoad
public void onLoad()
-
-