|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.quattor.pan.dml.data.Element
org.quattor.pan.dml.data.PersistentElement
org.quattor.pan.dml.data.Resource
org.quattor.pan.dml.data.ListResource
org.quattor.pan.dml.data.ProtectedListResource
public class ProtectedListResource
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.quattor.pan.dml.data.Resource |
|---|
Resource.Entry, Resource.Iterator |
| Constructor Summary | |
|---|---|
ProtectedListResource(ListResource baseList)
|
|
| Method Summary | |
|---|---|
void |
checkRange(Range range)
Determine if the element satisfies the given range constraint. |
Element |
duplicate()
This method does a "clone" of the given Element. |
boolean |
equals(java.lang.Object o)
Require that all Elements implement an equals method. |
Element |
get(Term key)
Retrieve the Element associated with the given Term (either an index or string key). |
protected java.util.List<Element> |
getBackingList()
Override this method to return the list from the base list. |
int |
hashCode()
Require that all Elements implement the hashCode method. |
boolean |
isProtected()
This method indicates if the given Element is protected. |
Resource.Iterator |
iterator()
Get an iterator which allows to run over the resources in the Resource. |
java.lang.String |
locateUndefinedElement()
Determine if the element contains any undefined (transient) elements. |
Element |
protect()
Return a protected version of this Element. |
Element |
put(int index,
Element newValue)
This is an optimized version of the put method which doesn't require creating a Term object. |
Element |
put(Term key,
Element newValue)
Define the mapping between the given Term and given Element. |
void |
rput(Term[] terms,
int index,
Element value)
Add the given child to this resource, creating intermediate resources as necessary. |
int |
size()
Get the number of elements in this Resource. |
java.lang.String |
toString()
Require that all Elements implement a reasonable toString method. |
Element |
writableCopy()
This method returns a writable copy of this Element. |
| Methods inherited from class org.quattor.pan.dml.data.ListResource |
|---|
append, checkValidReplacement, getTypeAsString, prepend |
| Methods inherited from class org.quattor.pan.dml.data.Resource |
|---|
rget, rgetList |
| Methods inherited from class org.quattor.pan.dml.data.Element |
|---|
checkInvalidSelfContext, checkRestrictedContext, defined, execute, exists, isBoolean, isDouble, isList, isLong, isNlist, isPersistent, isProperty, isResource, isString, isTransient |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ProtectedListResource(ListResource baseList)
| Method Detail |
|---|
public Element duplicate()
Element
duplicate in class ListResource
public Element get(Term key)
throws InvalidTermException
Resource
get in class ListResourcekey - Term which acts as the key for the desired Element
InvalidTermException - thrown if the term is not of the appropriate type for the
resource; the message should contain the string
representation of the term
public Element put(Term key,
Element newValue)
throws InvalidTermException
Resource
put in class ListResourcekey - Term which acts as the key for the desired ElementnewValue - Element to associate with the given Term
InvalidTermException - thrown if the term is not of the appropriate type for the
resource; the message should contain the string
representation of the term
public Element put(int index,
Element newValue)
ListResource
put in class ListResourceindex - index of the element to insertnewValue - value to insert into the list
public int size()
Resource
size in class ListResourcepublic Resource.Iterator iterator()
Resource
iterator in interface java.lang.Iterable<Resource.Entry>iterator in class ListResourcepublic java.lang.String locateUndefinedElement()
Element
locateUndefinedElement in class ListResource
public void checkRange(Range range)
throws ValidationException
Element
checkRange in class ListResourcerange - Range to check Element against
ValidationException - if the element cannot be compared to a range or if the
element doesn't meet the range requirementpublic Element protect()
Element
protect in class ListResourcepublic int hashCode()
Element
hashCode in class ListResourcepublic boolean equals(java.lang.Object o)
Element
equals in class ListResourceprotected java.util.List<Element> getBackingList()
getBackingList in class ListResourcepublic java.lang.String toString()
Element
toString in class ListResourcepublic boolean isProtected()
Element
isProtected in class Element
public void rput(Term[] terms,
int index,
Element value)
throws InvalidTermException
Element
rput in class ResourceInvalidTermException - thrown if an trying to dereference a list with a key or a
hash with an indexpublic Element writableCopy()
Element
writableCopy in class Element
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||