|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xins.common.manageable.Manageable org.xins.server.frontend.SessionManager
Manager for the sessions and session properties for the XINS front-end framework.
Nested Class Summary |
Nested classes inherited from class org.xins.common.manageable.Manageable |
Manageable.State |
Field Summary |
Fields inherited from class org.xins.common.manageable.Manageable |
BOOTSTRAPPED, BOOTSTRAPPING, DEINITIALIZING, INITIALIZING, UNUSABLE, USABLE |
Constructor Summary | |
SessionManager(API api)
Creates the session manager. |
Method Summary | |
protected void |
bootstrapImpl(PropertyReader bootstrapProperties)
Performs the bootstrap procedure (actual implementation). |
boolean |
getBoolProperty(String name)
Gets the value of a boolean session property. |
Map |
getProperties()
Gets the session properties. |
Object |
getProperty(String name)
Gets the value of a session property. |
String |
getSessionId()
Gets the session id. |
void |
removeProperties()
Removes all session properties for the customer. |
void |
removeProperty(String name)
Removes a session property. |
protected void |
request(HttpServletRequest request)
Method called when the request is received. |
protected void |
result(boolean successful)
Sets the input parameters in the session is the execution of the function is successful. |
void |
setProperty(String name,
boolean value)
Adds or sets a new session property. |
void |
setProperty(String name,
Object value)
Adds a new session property. |
boolean |
shouldLogIn()
Returns true if the user needs to log in to access the page. |
Methods inherited from class org.xins.common.manageable.Manageable |
assertUsable, bootstrap, deinit, deinitImpl, getState, init, initImpl, isBootstrapped, isUsable |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SessionManager(API api)
api
- the API.Method Detail |
protected void bootstrapImpl(PropertyReader bootstrapProperties) throws MissingRequiredPropertyException, InvalidPropertyValueException, BootstrapException
Manageable
Manageable.bootstrap(PropertyReader)
, the state and
the argument will have been checked and the state will have been set to
Manageable.BOOTSTRAPPING
.
The implementation of this method in class Manageable
is
empty.
bootstrapImpl
in class Manageable
bootstrapProperties
- the bootstrap properties, not null
.
BootstrapException
- if the bootstrapping failed for any other reason.
MissingRequiredPropertyException
- if a required property is not given.
InvalidPropertyValueException
- if the value of a certain property is invalid.protected void request(HttpServletRequest request)
request
- the HTTP request, cannot be null
.protected void result(boolean successful)
successful
- true
if the function is successful, false
otherwise.public boolean shouldLogIn()
true
if the user needs to log in to access the page.
public String getSessionId()
null
.public Map getProperties()
public void setProperty(String name, Object value) throws IllegalArgumentException
null
, the property is removed.
name
- the name of the session property, cannot be null
.value
- the value of the session property, can be null
.
IllegalArgumentException
- if name == null
.public void setProperty(String name, boolean value) throws IllegalArgumentException
name
- the name of the session property, cannot be null
.value
- the value of the session property.
IllegalArgumentException
- if name == null
.public Object getProperty(String name) throws IllegalArgumentException
name
- the name of the session property, cannot be null
.
null
if the property does not exist.
IllegalArgumentException
- if name == null
.public boolean getBoolProperty(String name) throws IllegalArgumentException
name
- the name of the session property, cannot be null
.
true
if the value of the property is "true" or Boolean.TRUE,
false
otherwise.
IllegalArgumentException
- if name == null
.public void removeProperty(String name) throws IllegalArgumentException
name
- the name of the session property, cannot be null
.
IllegalArgumentException
- if name == null
.public void removeProperties()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |