Package org.dspace.alerts
Enum AllowSessionsEnum
- java.lang.Object
-
- java.lang.Enum<AllowSessionsEnum>
-
- org.dspace.alerts.AllowSessionsEnum
-
- All Implemented Interfaces:
Serializable,Comparable<AllowSessionsEnum>
public enum AllowSessionsEnum extends Enum<AllowSessionsEnum>
Enum representing the options for allowing sessions: ALLOW_ALL_SESSIONS - Will allow all users to log in and continue their sessions ALLOW_CURRENT_SESSIONS_ONLY - Will prevent non admin users from logging in, however logged-in users will remain logged in ALLOW_ADMIN_SESSIONS_ONLY - Only admin users can log in, non admin sessions will be interrupted NOTE: This functionality can be stored in the database, but no support is present right now to interrupt and prevent sessions.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALLOW_ADMIN_SESSIONS_ONLYALLOW_ALL_SESSIONSALLOW_CURRENT_SESSIONS_ONLY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AllowSessionsEnumfromString(String alertAllowSessionType)StringgetValue()static AllowSessionsEnumvalueOf(String name)Returns the enum constant of this type with the specified name.static AllowSessionsEnum[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ALLOW_ALL_SESSIONS
public static final AllowSessionsEnum ALLOW_ALL_SESSIONS
-
ALLOW_CURRENT_SESSIONS_ONLY
public static final AllowSessionsEnum ALLOW_CURRENT_SESSIONS_ONLY
-
ALLOW_ADMIN_SESSIONS_ONLY
public static final AllowSessionsEnum ALLOW_ADMIN_SESSIONS_ONLY
-
-
Method Detail
-
values
public static AllowSessionsEnum[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AllowSessionsEnum c : AllowSessionsEnum.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AllowSessionsEnum valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
public String getValue()
-
fromString
public static AllowSessionsEnum fromString(String alertAllowSessionType)
-
-