|
||||||||
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
public class 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 | |
---|---|
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. |
Constructor Summary | |
---|---|
Subject()
|
|
Subject(org.w3c.dom.Element e)
|
|
Subject(java.lang.String xml)
|
Method Summary | |
---|---|
void |
addAdminRoleRef(com.waveset.object.ObjectRef arref)
|
void |
addPrincipalRef(com.waveset.object.ObjectRef p)
|
void |
checkSubjectTimeout()
|
void |
clear()
|
boolean |
equals(java.lang.Object anObject)
|
com.waveset.object.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. |
com.waveset.object.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. |
com.waveset.object.ObjectRef[] |
getPrincipalRefs()
|
com.waveset.object.ObjectRef[] |
getPrincipalRefs(com.waveset.object.Type type)
|
java.util.List |
getSubjectPrincipals()
|
long |
getSubjectTimeout()
|
WSUser |
getUser(com.waveset.object.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()
|
void |
setAdminRoleRefs(com.waveset.object.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(com.waveset.object.ObjectRef lmgRef)
|
void |
setOption(java.lang.String name,
java.lang.Object value)
|
void |
setOptions(java.util.Map options)
|
void |
setPrincipalRefs(com.waveset.object.ObjectRef[] parray)
|
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, setTrace, toIdentityString, toVerboseString, toVerboseString, toXml, toXml |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String APPLICATION
public static final java.lang.String CLIENT_IP
public static final java.lang.String code_id
public static final java.lang.String SESSION_ID
public static final java.lang.String XML_ELEMENT
Constructor Detail |
---|
public Subject() throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public Subject(org.w3c.dom.Element e) throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public Subject(java.lang.String xml) throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
Method Detail |
---|
public void addAdminRoleRef(com.waveset.object.ObjectRef arref) throws com.waveset.util.WSLoginException
com.waveset.util.WSLoginException
public void addPrincipalRef(com.waveset.object.ObjectRef p) throws com.waveset.util.WSLoginException
com.waveset.util.WSLoginException
public void checkSubjectTimeout() throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public void clear() throws com.waveset.util.WSLoginException
com.waveset.util.WSLoginException
public boolean equals(java.lang.Object anObject)
equals
in class java.lang.Object
true
if and only if the specified object
is an instance of Subject
with the same name.public com.waveset.object.ObjectRef[] getAdminRoleRefs()
public java.lang.String getElementName()
getElementName
in interface XmlObject
getElementName
in class AbstractXmlObject
public long getLastAccessTime()
public java.lang.String getLoginApplication()
public com.waveset.object.ObjectRef getLoginModGrp()
public java.lang.String getName()
public java.lang.Object getOption(java.lang.String name)
public java.util.Map getOptions()
public com.waveset.object.ObjectRef[] getPrincipalRefs()
public com.waveset.object.ObjectRef[] getPrincipalRefs(com.waveset.object.Type type)
public java.util.List getSubjectPrincipals()
public long getSubjectTimeout()
public WSUser getUser(com.waveset.object.ObjectCache cache) throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public boolean isAdministrator()
public boolean isTimedOut()
public void setAdminRoleRefs(com.waveset.object.ObjectRef[] adminRoleRefs)
public void setLastAccessTime(long lastAccessTime)
public void setLoginInProgressName(java.lang.String name)
public void setLoginModGrp(com.waveset.object.ObjectRef lmgRef)
public void setOption(java.lang.String name, java.lang.Object value)
public void setOptions(java.util.Map options)
public void setPrincipalRefs(com.waveset.object.ObjectRef[] parray)
public void setSubjectPrincipals(java.util.List subjectPrincipals)
public void setSubjectTimeout(long subjectTimeout)
public java.lang.String toString()
toString
in class java.lang.Object
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
b
- StringBuffer in which to write the generated xmlindent
- Number of spaces to indent the generated xml blockpublic void updateLastAccessTime()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |