|
||||||||||
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.Policy
A class used to represent policies. Currently, these are used only as string validation rules that may be associated with fields in other objects.
These are structurally similar to Resource objects, in that they are backed by a PolicyImplementation object which is a pluggable class that implements a policy. The Policy object encapsulates paramters to the policy implementation.
PolicyImplementation
,
PolicyManager
Nested Class Summary |
Nested classes inherited from class com.waveset.object.PersistentObject |
PersistentObject.Comparator, PersistentObject.InitialInstance |
Field Summary | |
static java.lang.String |
ALL_INTERFACES
|
static java.lang.String |
code_id
|
static java.lang.String |
MIN_NUMERIC
Attribute constants for a temporary upgrade. |
static java.lang.String |
MIN_SPECIAL
|
static java.lang.String |
MUST_NOT_CONTAIN
|
static java.lang.String |
MUST_NOT_CONTAIN_WORDS
|
static java.lang.String |
PASSWORD_HISTORY_DEPTH
A policy attribute that specifies the number of previous passwords that should be kept per user, per resource. |
Fields inherited from class com.waveset.object.PersistentObject |
_trace, trace |
Constructor Summary | |
Policy()
Create an empty policy ready for filling. |
|
Policy(org.w3c.dom.Element e)
Flesh out policy object by parsing its XML representation. |
Method Summary | |
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). |
Message |
getAssignmentMessage()
Return the description of this policy. |
GenericObject |
getAttributes()
Get the list of policy attributes. |
protected WSAttribute |
getAttributeValues(java.lang.String attrName)
|
java.lang.String |
getDescription()
Return the description of this policy. |
java.lang.String |
getImplementation()
Get the name of the policy implementation class. |
java.lang.Object |
getPolicyAttribute(java.lang.String name)
Get the value of for one of the policy attributes. |
java.lang.String |
getPolicyType()
Returns the associated Type object. |
Type |
getType()
Returns the associated Type object. |
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). |
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 |
removePolicyAttribute(java.lang.String name)
|
void |
removePolicyAttributes(java.lang.String[] names)
|
void |
setAssignmentMessage(Message m)
Set the description of the policy. |
void |
setAttributes(GenericObject wsa)
|
void |
setDescription(java.lang.String d)
Set the description of the policy. |
void |
setImplementation(java.lang.String i)
Set the policy implementation class name. |
void |
setPolicyAttribute(java.lang.String name,
java.lang.Object value)
Set the value of a policy attribute. |
void |
setPolicyAttribute(java.lang.String name,
java.lang.Object[] values)
Set the values of a multi-valued policy attribute. |
void |
visit(Visitor v)
Visitor interface. |
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 MIN_NUMERIC
public static final java.lang.String MIN_SPECIAL
public static final java.lang.String MUST_NOT_CONTAIN
public static final java.lang.String MUST_NOT_CONTAIN_WORDS
public static final java.lang.String PASSWORD_HISTORY_DEPTH
public static final java.lang.String ALL_INTERFACES
Constructor Detail |
public Policy()
public Policy(org.w3c.dom.Element e) throws WavesetException
Method Detail |
public void visit(Visitor v) throws WavesetException
visit
in class PersistentObject
WavesetException
public Type getType()
getType
in class PersistentObject
public java.lang.String getPolicyType()
public java.lang.String getImplementation()
public void setImplementation(java.lang.String i)
This should only be called by things like PolicyImplementation subclasses as part of the construction of the prototype instance for that implementation.
Applications should never set this as it could change the fundamental nature of the policy.
public java.lang.String getDescription()
public void setDescription(java.lang.String d)
public Message getAssignmentMessage()
public void setAssignmentMessage(Message m)
public GenericObject getAttributes()
NOTE: This should be used only for browsing, do not modify
the objects on this list. Use setAttribute
for
modification. We might want to have a safer way to access the list?
public void setAttributes(GenericObject wsa)
public java.lang.Object getPolicyAttribute(java.lang.String name)
This is a little safer than getAttributes(), but you must still only change the value, changing the name is meaningless. This is probably unnecessary, if you want to change the value use setAttribute instead. // *
// * Sigh, wanted to use use getAttribute(), but that method was defined // * by PersistentObject to mean something else. Since getAttribute // * isn't being used any more, we could switch the names.
public void removePolicyAttribute(java.lang.String name)
public void removePolicyAttributes(java.lang.String[] names)
public void setPolicyAttribute(java.lang.String name, java.lang.Object value) throws WavesetException
GenericObject
map returned by
getPolicyAttributes
.
Might want a variant of this that takes a WSAttribute for
symetry with getPolicyAttribute
?
WavesetException
public void setPolicyAttribute(java.lang.String name, java.lang.Object[] values)
WSAttributes
list returned by
getPolicyAttributes
.
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()
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.
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
.
protected 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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |