|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.util.AbstractXmlObject
com.waveset.object.Subject
A Subject can be any entity such as a person or service. For our purpose, it will generally be a person attempting to authenticate to the Waveset Provisioning System. A Subject is constructed and saved by the LocalSession at LocalSession construction time. If the Subject is authenticated, it will be populated with one or more Principals as follows:
* User (not assigned to any AdminGroups) * User and one or more AdminGroups to which the User has been assigned
The Subject will be stored in a LocalSession instance variable. Since there will be an instance of a LocalSession per authenticated Waveset user, the associated Subject represents the security credentials for the user and will be used for all authorization decisions.
Field Summary | |
protected java.util.List |
_subjectPrincipals
When the principals are calculated for this subject, they can be cached here. |
static java.lang.String |
APPLICATION
The name of an option containing the "application name" to be used in audit events. |
static java.lang.String |
CLIENT_IP
The name of an option containing the client IP address parameter to be used in audit events. |
static java.lang.String |
code_id
|
static java.lang.String |
SESSION_ID
The name of an option containing the Session ID parameter to be used in audit events. |
static java.lang.String |
XML_ELEMENT
The name of the XML element that wraps this object. |
Fields inherited from class com.waveset.util.AbstractXmlObject |
_trace |
Constructor Summary | |
Subject()
|
|
Subject(org.w3c.dom.Element e)
|
|
Subject(java.lang.String xml)
|
Method Summary | |
void |
addAdminRoleRef(ObjectRef arref)
|
void |
addPrincipalRef(ObjectRef p)
|
void |
checkSubjectTimeout()
|
void |
clear()
|
boolean |
equals(java.lang.Object anObject)
|
ObjectRef[] |
getAdminRoleRefs()
|
java.lang.String |
getElementName()
Return the desired XML element name, required by the XmlObject interface. |
long |
getLastAccessTime()
|
java.lang.String |
getLoginApplication()
From the subject's options get the login application from which this subject originated. |
ObjectRef |
getLoginModGrp()
|
java.lang.String |
getName()
|
java.lang.Object |
getOption(java.lang.String name)
|
java.util.Map |
getOptions()
Get the options associated with this subject. |
ObjectRef[] |
getPrincipalRefs()
|
ObjectRef[] |
getPrincipalRefs(Type type)
|
java.util.List |
getSubjectPrincipals()
|
long |
getSubjectTimeout()
|
WSUser |
getUser(ObjectCache cache)
Return the WSUser object embedded within this subject. |
boolean |
isAdministrator()
Checks to see if the subject represents an Administrator, where an Administrator is defined as a WSUser with at least one AdminGroup (Capability) (e.g. |
boolean |
isTimedOut()
|
protected void |
removePrincipalRefs()
|
void |
setAdminRoleRefs(ObjectRef[] adminRoleRefs)
|
void |
setLastAccessTime(long lastAccessTime)
|
void |
setLoginInProgressName(java.lang.String name)
Used for setting a subject's name where the login state is "in progress". |
void |
setLoginModGrp(ObjectRef lmgRef)
|
protected void |
setName(java.lang.String name)
|
void |
setOption(java.lang.String name,
java.lang.Object value)
|
void |
setOptions(java.util.Map options)
|
void |
setPrincipalRefs(ObjectRef[] parray)
|
protected void |
setReadOnly(boolean readOnly)
|
void |
setSubjectPrincipals(java.util.List subjectPrincipals)
|
void |
setSubjectTimeout(long subjectTimeout)
|
java.lang.String |
toString()
|
java.lang.String |
toXml()
A default implementation for rendering as a valid XML document. |
void |
toXml(java.lang.StringBuffer b,
int indent)
Serialize into a buffer with optional indentation. |
void |
updateLastAccessTime()
|
Methods inherited from class com.waveset.util.AbstractXmlObject |
addXmlHeader, cloneObject, dump, dumpFile, getReference, println, setTrace, toIdentityString, toVerboseString, toVerboseString, toXml, toXml |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
public static final java.lang.String CLIENT_IP
public static final java.lang.String SESSION_ID
public static final java.lang.String APPLICATION
public static final java.lang.String XML_ELEMENT
protected java.util.List _subjectPrincipals
Constructor Detail |
public Subject() throws WavesetException
public Subject(java.lang.String xml) throws WavesetException
public Subject(org.w3c.dom.Element e) throws WavesetException
Method Detail |
public java.lang.String getElementName()
getElementName
in interface XmlObject
getElementName
in class AbstractXmlObject
public boolean isAdministrator()
public java.util.List getSubjectPrincipals()
public void setSubjectPrincipals(java.util.List subjectPrincipals)
public ObjectRef[] getAdminRoleRefs()
public void addAdminRoleRef(ObjectRef arref) throws WSLoginException
WSLoginException
public void setAdminRoleRefs(ObjectRef[] adminRoleRefs)
public ObjectRef[] getPrincipalRefs()
public ObjectRef[] getPrincipalRefs(Type type)
public void addPrincipalRef(ObjectRef p) throws WSLoginException
WSLoginException
protected void removePrincipalRefs() throws WSLoginException
WSLoginException
public void setPrincipalRefs(ObjectRef[] parray)
protected void setReadOnly(boolean readOnly)
public java.lang.String toString()
public java.lang.String getName()
protected void setName(java.lang.String name)
public void setLoginInProgressName(java.lang.String name)
public boolean equals(java.lang.Object anObject)
true
if and only if the specified object
is an instance of Subject
with the same name.public void setOption(java.lang.String name, java.lang.Object value)
public java.lang.Object getOption(java.lang.String name)
public void setOptions(java.util.Map options)
public java.util.Map getOptions()
public WSUser getUser(ObjectCache cache) throws WavesetException
WavesetException
public long getSubjectTimeout()
public void setSubjectTimeout(long subjectTimeout)
public long getLastAccessTime()
public void setLastAccessTime(long lastAccessTime)
public void updateLastAccessTime()
public boolean isTimedOut()
public void checkSubjectTimeout() throws WavesetException
WavesetException
public void clear() throws WSLoginException
WSLoginException
public java.lang.String getLoginApplication()
public ObjectRef getLoginModGrp()
public void setLoginModGrp(ObjectRef lmgRef)
public java.lang.String toXml()
AbstractXmlObject
toXml
in interface XmlObject
toXml
in class AbstractXmlObject
public void toXml(java.lang.StringBuffer b, int indent)
AbstractXmlObject
toXml
in interface XmlObject
toXml
in class AbstractXmlObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |