|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.object.PersistentObject
com.waveset.object.ResourceAccount
Nested Class Summary |
Nested classes inherited from class com.waveset.object.PersistentObject |
PersistentObject.Comparator, PersistentObject.InitialInstance |
Field Summary | |
static java.lang.String |
code_id
|
static java.lang.String |
EL_CURRENT_ATTRIBUTES
|
static java.lang.String |
EL_POTENTIAL_OWNERS
|
static java.lang.String |
EL_PREVIOUS_ATTRIBUTES
|
static java.lang.String |
OWNER_UNKNOWN
If Attribute.OWNER has this value, the resource account is not owned by any Lighthouse user. |
Fields inherited from class com.waveset.object.PersistentObject |
_trace, trace |
Constructor Summary | |
|
ResourceAccount(org.w3c.dom.Element e)
|
|
ResourceAccount(Resource r,
java.lang.String accountId)
|
|
ResourceAccount(Resource r,
java.lang.String accountId,
java.util.Map attributes)
|
|
ResourceAccount(java.lang.String xml)
|
protected |
ResourceAccount(java.lang.String resourceId,
java.lang.String accountId)
Repository needs this, or a no-arg constructor plus a string setter for resource id. |
Method Summary | |
boolean |
addPotentialOwner(WSUser user)
Add the specified user to the list of potential owners (if not already among the list). |
boolean |
addPotentialOwners(java.util.List users)
Add each specified user to the list of potential owners (if that user is not already in the list). |
protected void |
addSubclassAttributes(java.lang.StringBuffer b)
Each concrete subclass may append to the buffer an XML representation of any fields it adds to PersistentObject (if those field values must persist). |
protected void |
addSubclassElements(java.lang.StringBuffer b)
Each concrete subclass may append to the buffer an XML representation of any fields it adds to PersistentObject (if those field values must persist). |
boolean |
equals(java.lang.Object o)
Compares two objects for equality of identity. |
static AttributeCondition[] |
forResource(Resource r)
|
java.lang.String |
getAccountId()
|
protected WSAttribute |
getAttributeValues(java.lang.String attrName)
|
java.util.Map |
getCurrentAttributes()
|
static java.lang.String |
getName(Resource r,
java.lang.String accountId)
|
static java.lang.String |
getName(java.lang.String resourceId,
java.lang.String accountId)
|
java.lang.String |
getOwner()
|
java.lang.String |
getOwnerName()
|
java.util.List |
getPotentialOwners()
|
java.util.Map |
getPreviousAttributes()
In order to perform attribute-level reconciliation (i.e., in order to detect changes in the values of change-controlled attributes of user resource accounts), we must keep the attribute values as of the last reconciliation. |
java.lang.String |
getResourceId()
|
Account.Situation |
getSituation()
|
Type |
getType()
Return the type of this object. |
boolean |
getUnowned()
|
java.util.List |
listQueryableAttributes()
|
java.util.List |
listSummaryAttributes()
Returns the complete list of defined attributes
that this type of persistent object exposes as summary attributes
(regardless of whether this particular object has a value for each). |
static void |
main(java.lang.String[] args)
|
protected void |
parseSubclassAttributes(org.w3c.dom.Element e)
Each concrete subclass should parse from the XML buffer any persisted subclass-specific fields (generally, the same ones that it writes into the buffer). |
protected void |
parseSubclassElements(org.w3c.dom.Element e)
Each concrete subclass should parse from the XML buffer any persisted subclass-specific elements (generally, the same ones that it writes into the buffer). |
void |
setCurrentAttributes(java.util.Map attributeMap)
|
void |
setOwner(WSUser user)
Specify the Lighthouse user who owns this account. |
protected void |
setOwnerId(java.lang.String ownerId)
|
protected void |
setOwnerName(java.lang.String name)
|
void |
setPotentialOwners(java.util.List list)
Specify the repository id of a Lighthouse user who might own (or become the owner of) this resource account. |
void |
setPreviousAttributes(java.util.Map attributeMap)
|
void |
setSituation(Account.Situation s)
|
void |
setSituation(java.lang.String s)
|
void |
setUnowned(boolean b)
Mark this resource account as having no owner known to Lighthouse. |
java.lang.String |
toString()
|
static AttributeCondition[] |
unownedOnResource(Resource r)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
public static final java.lang.String OWNER_UNKNOWN
public static final java.lang.String EL_POTENTIAL_OWNERS
public static final java.lang.String EL_CURRENT_ATTRIBUTES
public static final java.lang.String EL_PREVIOUS_ATTRIBUTES
Constructor Detail |
public ResourceAccount(Resource r, java.lang.String accountId)
public ResourceAccount(Resource r, java.lang.String accountId, java.util.Map attributes)
public ResourceAccount(java.lang.String xml) throws WavesetException
public ResourceAccount(org.w3c.dom.Element e) throws WavesetException
protected ResourceAccount(java.lang.String resourceId, java.lang.String accountId)
Method Detail |
public java.lang.String getOwner()
public void setOwner(WSUser user) throws InvalidArgument
InvalidArgument
protected void setOwnerId(java.lang.String ownerId)
public java.lang.String getOwnerName()
protected void setOwnerName(java.lang.String name)
public boolean getUnowned()
public void setUnowned(boolean b)
public java.util.List getPotentialOwners()
public void setPotentialOwners(java.util.List list)
public boolean addPotentialOwner(WSUser user) throws WavesetException
WavesetException
public boolean addPotentialOwners(java.util.List users) throws WavesetException
WavesetException
public Account.Situation getSituation()
public void setSituation(Account.Situation s)
public void setSituation(java.lang.String s)
public java.util.Map getCurrentAttributes()
public void setCurrentAttributes(java.util.Map attributeMap)
public java.util.Map getPreviousAttributes()
public void setPreviousAttributes(java.util.Map attributeMap)
public static java.lang.String getName(Resource r, java.lang.String accountId)
ResourceAccount
object.public static java.lang.String getName(java.lang.String resourceId, java.lang.String accountId)
ResourceAccount
object.public static AttributeCondition[] forResource(Resource r)
public static AttributeCondition[] unownedOnResource(Resource r)
public Type getType()
PersistentObject
getType
in class PersistentObject
public java.lang.String getResourceId()
public java.lang.String getAccountId()
public java.util.List listQueryableAttributes()
listQueryableAttributes
in class PersistentObject
defined attributes
that this type of PersistentObject exposes as queryable attributes
(regardless of whether this object has a value for each).
Any subclass of PersistentObject that overrides this method
should first invoke super.listQueryableAttributes()
to ensure that the subclass includes queryable attributes
that are common to all PersistentObjects.
public java.util.List listSummaryAttributes()
PersistentObject
defined attributes
that this type of persistent object exposes as summary attributes
(regardless of whether this particular object has a value for each).
Any subclass of PersistentObject that overrides this method
should first invoke super.listSummaryAttributes()
to ensure that the subclass includes summary attributes
that are common to all PersistentObjects.
Any subclass that overrides this implementation must also consider the length of the summary string that will be generated from these attributes.
listSummaryAttributes
in class PersistentObject
defined attributes
that this type of PersistentObject exposes as summary attributes
(regardless of whether this object has a value for each).
Any subclass of PersistentObject that overrides this method
should first invoke super.listSummaryAttributes()
to ensure that the subclass includes summary attributes
that are common to all PersistentObjects.
Constants.MAX_SUMMARY_STRING_LENGTH
,
PersistentObject.getSummaryString()
protected WSAttribute getAttributeValues(java.lang.String attrName)
getAttributeValues
in class PersistentObject
attrName
- - the name of the attribute for which to return values.
WSAttribute
that represents the value (or values)
that this object contains for the specified attribute
.
public java.lang.String toString()
toString
in class PersistentObject
public boolean equals(java.lang.Object o)
PersistentObject
This method overrides the java.lang.Object equals method. It determines equality based on whether the two identities of the current object and the object argument are equal, where equal is defined as:
Note that this will makes it impossible to use the equals() method to do content comparison of two object copies. I'm not sure I really like this, its an unusual way to have equals() behave, but it is convenient for searching collections for references.
equals
in class PersistentObject
o
- - a PersistentObject or an ObjectRefprotected void addSubclassAttributes(java.lang.StringBuffer b)
PersistentObject
NOTE: Any subclass that overrides this method must similarly override parseSubclassAttributes() so that the subclass attributes are restored.
addSubclassAttributes
in class PersistentObject
protected void addSubclassElements(java.lang.StringBuffer b)
PersistentObject
NOTE: Any subclass that overrides this method must similarly override parseSubclassElements() so that the subclass elements are restored.
addSubclassElements
in class PersistentObject
protected void parseSubclassAttributes(org.w3c.dom.Element e) throws WavesetException
PersistentObject
parseSubclassAttributes
in class PersistentObject
WavesetException
PersistentObject's default implementation is a no-op.
,
PersistentObject.parseXml(Element)
protected void parseSubclassElements(org.w3c.dom.Element e) throws WavesetException
PersistentObject
parseSubclassElements
in class PersistentObject
WavesetException
PersistentObject's default implementation is a no-op.
,
PersistentObject.parseXml(Element)
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |