public interface SessionNamespace
SessionNamespaceAttibute) pairs associated with Session, which are commonly used to record application state, user profile, and so on.| Modifier and Type | Interface and Description |
|---|---|
static class |
SessionNamespace.ATTR_EVENT_TYPE
The list of possible events an attribute can have.
|
| Modifier and Type | Method and Description |
|---|---|
SessionNamespaceAttribute |
createAttribute(java.lang.String name, java.lang.String value)
Creates a new attribute in the namespace with the specified name and value.
|
SessionNamespaceAttribute |
createAttribute(java.lang.String name, java.lang.String value, java.util.List<SessionNamespace.ATTR_EVENT_TYPE> event)
Creates a new attribute in the namespace with the specified name, value, and event.
|
void |
deleteAttribute(java.lang.String name)
Deletes the specified attribute
|
SessionNamespaceAttribute |
getAttribute(java.lang.String name)
" Returns the specified attribute."
|
java.util.Collection<SessionNamespaceAttribute> |
getAttributes()
Returns a collection of the attribute names in the namespace.
|
java.lang.String |
getName()
Returns the name of the namespace
|
SessionNamespaceAttribute |
resetAttribute(java.lang.String name)
Resets the specified attribute in the namespace to its default value.
|
SessionNamespaceAttribute |
setAttribute(java.lang.String name, java.lang.String value)
Sets the attribute for a session namespace with the specified name and value
|
java.lang.String |
toString()
Returns a string representation of the namespace
|
java.util.Collection<SessionNamespaceAttribute> getAttributes()
SessionNamespaceAttribute createAttribute(java.lang.String name, java.lang.String value) throws java.sql.SQLException, SessionNamespaceException, AccessDeniedException, XSException, InvalidXSAttributeException, NotAttachedException
name - name of the attributevalue - value of the attributejava.sql.SQLException - when a JDBC exception is thrownAccessDeniedException - when the current user does not have the privilege to attach to the sessionXSException - when a generic error is detectedSessionNamespaceException - when the attibute name is invalidInvalidXSAttributeException - when the attribute value is invalidNotAttachedException - when the session is not attachedSessionNamespaceAttribute createAttribute(java.lang.String name, java.lang.String value, java.util.List<SessionNamespace.ATTR_EVENT_TYPE> event) throws java.sql.SQLException, SessionNamespaceException, AccessDeniedException, XSException, InvalidXSAttributeException, NotAttachedException
name - name of the attributevalue - value of the attributeevent - event registration of the attributejava.sql.SQLException - when a JDBC exception is thrownAccessDeniedException - when the current user does not have the privilege to attach to the sessionXSException - when a generic error is detectedSessionNamespaceException - when the attibute name is invalidInvalidXSAttributeException - when the attribute value is invalidNotAttachedException - when the session is not attachedSessionNamespaceAttribute resetAttribute(java.lang.String name) throws java.sql.SQLException, AccessDeniedException, XSException, InvalidXSAttributeException, NotAttachedException
name - name of the attributejava.sql.SQLException - when a JDBC exception is thrownAccessDeniedException - when the current user does not have the privilege to reset the attributeXSException - when a generic error is detectedInvalidXSAttributeException - when the attribute is invalidNotAttachedException - when the session is not attachedSessionNamespaceAttribute setAttribute(java.lang.String name, java.lang.String value) throws java.sql.SQLException, SessionNamespaceException, AccessDeniedException, XSException, InvalidXSAttributeException, NotAttachedException
name - name of the attributevalue - value of the attributejava.sql.SQLException - when a JDBC exception is thrownAccessDeniedException - when the current user does not have the privilege to set the attributeXSException - when a generic error is detectedSessionNamespaceException - when the namespace is invalidInvalidXSAttributeException - when the attribute is invalidNotAttachedException - when the session is not attachedSessionNamespaceAttribute getAttribute(java.lang.String name) throws java.sql.SQLException, AccessDeniedException, XSException, InvalidXSAttributeException, NotAttachedException
name - the name of the attribute in the namespacejava.sql.SQLException - when a JDBC exception is thrownAccessDeniedException - when the current user does not have the privilege to get the attributeXSException - when a generic error is detectedInvalidXSAttributeException - when the attribute is invalidNotAttachedException - when the session is not attachedvoid deleteAttribute(java.lang.String name)
throws java.sql.SQLException,
AccessDeniedException,
XSException,
InvalidXSAttributeException,
NotAttachedException
name - name of the attributejava.sql.SQLException - when a JDBC exception is thrownAccessDeniedException - when the current user does not have the privilege to delete the attributeXSException - when a generic error is detectedInvalidXSAttributeException - when the attribute is invalidNotAttachedException - when the session is not attachedjava.lang.String getName()
java.lang.String toString()
toString in class java.lang.Object