|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
org.globus.common
Class ConstrainedMVHashtable
java.lang.Object | +--org.globus.common.MVHashtable | +--org.globus.common.ConstrainedMVHashtable
- All Implemented Interfaces:
- Serializable
- public class ConstrainedMVHashtable
- extends MVHashtable
- implements Serializable
- extends MVHashtable
ConstrainedMVHashtable allows the placing of constraints on a MVHashtable that determine if an attribute is optional, required, or if an attribute is single, or multivalued. Use set/isRequired() functions to specify/check whether an attribute will be required or not. Use set/isSingleValued() to specify/check whether an attribute accepts a single or multiple values. Use setMaximum() to set the largest number of values an attribute is allowed to accept. NOTE: this class is not supported yet.
- See Also:
- Serialized Form
| Field Summary | |
protected Hashtable |
maxValues
holds the maximum values for various attributes |
protected Hashtable |
required
holds required status of attributes |
protected Hashtable |
singleValued
holds single-valued status of attributes |
| Fields inherited from class org.globus.common.MVHashtable |
attribs |
| Constructor Summary | |
ConstrainedMVHashtable()
Default constructor which creates a blank ConstrainedMVHashtable. |
|
ConstrainedMVHashtable(ConstrainedMVHashtable constrainedMultivaluedHashtable)
Copy constructor. |
|
| Method Summary | |
boolean |
isRequired(String key)
Returns true if the key is constrained to be required. |
boolean |
isSingleValued(String key)
Returns true if a specific attribute is constrained to be SingleValued |
void |
setMaximum(String key,
int maxValues)
Constrain the number of values for a specific attribute. |
void |
setRequired(String[] keys,
boolean required)
Constrains all attributes specified in the array of key strings to be required/not required. |
void |
setRequired(String key,
boolean req)
Constrains a specific attribute to be required or optional. |
void |
setSingleValued(String[] keys,
boolean single)
Constrains all attributes specified by the array of strings to be SingleValued. |
void |
setSingleValued(String key,
boolean single)
Constrains a specific attribute to be SingleValued. |
| Methods inherited from class org.globus.common.MVHashtable |
add, add, add, add, clear, contains, containsName, get, getFirstValue, getKeys, getLastValue, getValueAt, keys, print, remove, remove, remove, set, size, size, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
singleValued
protected Hashtable singleValued
- holds single-valued status of attributes
required
protected Hashtable required
- holds required status of attributes
maxValues
protected Hashtable maxValues
- holds the maximum values for various attributes
| Constructor Detail |
ConstrainedMVHashtable
public ConstrainedMVHashtable()
- Default constructor which creates a blank ConstrainedMVHashtable.
ConstrainedMVHashtable
public ConstrainedMVHashtable(ConstrainedMVHashtable constrainedMultivaluedHashtable)
- Copy constructor.
- Parameters:
constrainedMultivaluedHashtable- the ConstrainedMVHashtable to be copied
| Method Detail |
setRequired
public void setRequired(String key, boolean req)
- Constrains a specific attribute to be required or optional. Each
attribute is by default optional.
- Parameters:
key- the key of the attribute to be constrainedreq- true if required, false if optional
setRequired
public void setRequired(String[] keys, boolean required)
- Constrains all attributes specified in the array of key strings to be
required/not required.
- Parameters:
keys- an array of the keys to be constrainedrequired- true if all are required, false if all are optional
isRequired
public boolean isRequired(String key)
- Returns true if the key is constrained to be required.
- Parameters:
key- the key of attribute to check- Returns:
booleantrue if required, false if optional
setSingleValued
public void setSingleValued(String key, boolean single)
- Constrains a specific attribute to be SingleValued. Each
attribute is by default multiValued.
- Parameters:
key- the key of the attribute to be constrainedsingle- true if single-valued, false if multi-valued
setSingleValued
public void setSingleValued(String[] keys, boolean single)
- Constrains all attributes specified by the array of strings to be
SingleValued.
- Parameters:
keys- an array of keys of the attributes to be constrainedsingle- true if all should be single-valued, false if multi-valued
isSingleValued
public boolean isSingleValued(String key)
- Returns true if a specific attribute is constrained to be SingleValued
- Parameters:
key- the key of the attribute to be checked- Returns:
booleantrue if single-valued, false if multi-valued
setMaximum
public void setMaximum(String key, int maxValues)
- Constrain the number of values for a specific attribute.
- Parameters:
key- the key of the attribute to be constrainedmaxValues- the maximum number of values this attribute can have
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||