|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.n52.security.authentication.loginmodule.SharedState
public class SharedState
Class SharedState represents the shared state between login modules.
This class is introduced to encapsulate the access to common shared states and therefor to minimize programming errors.AbstractLoginModule
and provided via a getter method to sub classes.
Field Summary | |
---|---|
static java.lang.String |
KEY_SHARED_NAME
Field KEY_SHARED_NAME identifies a name (user/login) in the shared map. |
static java.lang.String |
KEY_SHARED_PASSWORD
Field KEY_SHARED_PASSWORD identifies a password in the shared map. |
Constructor Summary | |
---|---|
SharedState(java.util.Map state)
Constructor SharedState creates a new SharedState instance. |
Method Summary | |
---|---|
void |
clear()
Method clears all state information. |
boolean |
contains(java.lang.String key)
Method checks if the state information contains the key. |
java.lang.Object |
get(java.lang.String key)
Method gets the state information for the key. |
java.lang.String |
getLoginName()
Method gets the loginName of this SharedState object. |
char[] |
getLoginPassword()
Method gets the loginPassword of this SharedState object. |
boolean |
isEmpty()
Methods checks for an empty shared state. |
boolean |
isLoginNameSet()
Method checks if a shared login name is set. |
boolean |
isLoginPasswordSet()
Method checks if a shared login password is set. |
void |
put(java.lang.String key,
java.lang.Object value)
Method registers a state information for the key. |
java.lang.Object |
remove(java.lang.String key)
Method remove state information registered for the key. |
void |
removeLoginName()
Method removes the login name from the shared state. |
void |
removeLoginPassword()
Method removes the login password from the shared state. |
void |
setLoginName(java.lang.String name)
Method sets the loginName of this SharedState object. |
void |
setLoginPassword(char[] password)
Method sets the loginPassword of this SharedState object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String KEY_SHARED_PASSWORD
getLoginPassword()
and setLoginPassword(char[])
to access the state information.
public static final java.lang.String KEY_SHARED_NAME
getLoginName()
and setLoginName(String)
to access the state information.
Constructor Detail |
---|
public SharedState(java.util.Map state)
state
- of type MapMethod Detail |
---|
public void clear()
public java.lang.String getLoginName()
KEY_SHARED_NAME
public java.lang.Object get(java.lang.String key)
key
- of type String identifying a state information.
public char[] getLoginPassword()
KEY_SHARED_PASSWORD
public boolean isEmpty()
public boolean isLoginNameSet()
KEY_SHARED_NAME
public boolean contains(java.lang.String key)
key
- of type String identifying a state information.
public boolean isLoginPasswordSet()
KEY_SHARED_PASSWORD
public void removeLoginName()
public java.lang.Object remove(java.lang.String key)
key
- of type String identifying a state information.
public void removeLoginPassword()
public void setLoginName(java.lang.String name)
name
- the loginName.KEY_SHARED_NAME
public void put(java.lang.String key, java.lang.Object value)
key
- of type String identifying the state information.value
- of type Object a new state information.public void setLoginPassword(char[] password)
password
- the shared password.KEY_SHARED_PASSWORD
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |