|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.novell.service.file.nw.VolumeRestriction
Provides for attribute values of volume restrictions associated with a given Volume.
This class results in a mutable object. For versitility, code block synchronization has been implemented in the various jndi search and modify methods of this class's implementation to provide for thread safe operation.
If you have a code segment of multi-threaded application that uses get methods of this class, and there is a potential of another thread randomly using corresponding set methods of this class, you should enclose the calls to the get methods of this class in a synchronized code block.
If you have a code segment of a multi-threaded application that uses set methods of this class, and there is a potential of another thread randomly using corresponding get methods of this class, you should enclose the calls to the set methods of this class in a synchronized code block.
VolumeRestrictionEnumerator
Field Summary | |
static java.lang.String |
ATTRIBUTE_ID
Attribute ID of VolumeRestriction. |
static java.lang.String |
COMPARE_SYNTAX_STRING
Schema Syntax of VolumeRestriction. |
static java.lang.String |
INUSE_FIELD
The InUse compare field. |
static java.lang.String |
NAME_FIELD
The Name compare field. |
static java.lang.String |
RESTRICTION_FIELD
The Restriction compare field. |
static java.lang.String |
SCHEMA_BINDING_NAME
Schema Name of VolumeRestriction. |
Constructor Summary | |
VolumeRestriction()
Creates a Default VolumeRestriction Constructor with no parameters. |
|
VolumeRestriction(java.lang.String name)
Creates a VolumeRestriction Constructor object with only the name parameter known, and initializes the object to the values of theis parameter. |
|
VolumeRestriction(java.lang.String name,
int restriction,
int inUse)
Creates a full VolumeRestriction Constructor object with all possible state parameters, and initializes the object to the values of these parameters. |
Method Summary | |
java.lang.Object |
clone()
Clones the current VolumeRestriction object. |
void |
copy(VolumeRestriction from)
Copies the CallsServiceRemote from object into this object. |
void |
copySubset(VolumeRestriction from)
|
boolean |
equals(java.lang.Object obj)
Compares the input object against this object for equality. |
java.lang.String |
getCompareString()
Returns the current value of the compareString. |
int |
getInUse()
Returns the inUse field of this Object. |
java.lang.String |
getName()
Returns a reference to this object's name field. |
int |
getObjectId()
Returns the objectId field of this Object. |
int |
getRestriction()
Returns the restriction field of this Object. |
com.novell.service.rfc1960.Rfc1960Parser |
getSearchStringParser()
Returns the RFC1960 Search String parser for the compare string. |
void |
setCompareString(java.lang.String compareString)
Sets the compare string value for the compare fields. |
void |
setInUse(int value)
Sets the inUse field of this Object. |
void |
setName(java.lang.String value)
Sets the value of this object's name field. |
void |
setObjectId(int value)
Sets the objectId field of this Object. |
void |
setRestriction(int value)
Sets the restriction field of this Object. |
java.lang.String |
toString()
Returns a String representation of this object. |
Methods inherited from class java.lang.Object |
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String ATTRIBUTE_ID
(ATTRIBUTE_ID = "Volume Restrictions")
public static final java.lang.String SCHEMA_BINDING_NAME
(SCHEMA_BINDING_NAME = ATTRIBUTE_ID + " Definition")
public static final java.lang.String COMPARE_SYNTAX_STRING
(COMPARE_SYNTAX_STRING = "(" + SearchStringComponent.EQUALS_STRING + "," + SearchStringComponent.PRESENT_STRING + "," + SearchStringComponent.SUBSTRING_STRING + ")")
public static final java.lang.String NAME_FIELD
(NAME_FIELD = "Name")
setCompareString(java.lang.String)
,
equals(java.lang.Object)
public static final java.lang.String RESTRICTION_FIELD
(RESTRICTION_FIELD = "Restriction")
setCompareString(java.lang.String)
,
equals(java.lang.Object)
public static final java.lang.String INUSE_FIELD
(INUSE_FIELD = "InUse")
setCompareString(java.lang.String)
,
equals(java.lang.Object)
Constructor Detail |
public VolumeRestriction()
public VolumeRestriction(java.lang.String name, int restriction, int inUse)
name
- The name data members value.restriction
- The restriction data members value.inUse
- The inUse data members value.public VolumeRestriction(java.lang.String name)
All other data members are set to NULL or zero. The actual name parameter reference will be stored by this object (it will not be cloned). Later modifications to to this references state will be reflected in this object.
name
- The name data members value.Method Detail |
public java.lang.String getName()
If you modify the state of the returned object, it will be reflected in this object.
public void setName(java.lang.String value)
The actual parameter reference will be stored by this object (it will not be cloned). Later modifications to to this reference's state will be reflected in this object.
value
- The new value of the name field.public int getRestriction()
public void setRestriction(int value)
value
- The new value of this object's restriction field
in 4K pieces.public int getInUse()
public void setInUse(int value)
value
- The new value of this object's inUse field
in 4K pieces.public int getObjectId()
This method should only be used by name space provider spi code.
public void setObjectId(int value)
This method should only be used by name space provider spi code.
value
- The new value of this object's objectId field.public void setCompareString(java.lang.String compareString)
The compare string uses the RFC1960 (LDAP) search string format and is used to allow individual compares on the name, restriction, and inUse fields. If the string passed in is not a valid RFC1960 formated string, this method will throw an IllegalArgumentException. If the compareString value is NULL, RFC1960 formatted compares will be disabled.
The names of these fields have taken the names of their corresponding methods minus the get or set prefix. Given the following string:
"(&(Name=*printer*)(ObjectId>=2)(Rights>=128))"
The equals method will return TRUE if the name contains the substring printer, the objectId is not 2, and the rights are set to be able to modify (TA_MODIFY). If the approximate operator type is used on the Rights field the various bits of the operand value are checked, and if any of them are set, equals will return TRUE. For example: "(Rights~=3) returns TRUE if either the TA_READ or TA_WRITE bits are set regardless of what other bits might be set.
compareString
- The RFC1960 formatted search string. NULL
disables this compare functionality.equals(java.lang.Object)
,
NAME_FIELD
,
RESTRICTION_FIELD
,
INUSE_FIELD
public java.lang.String getCompareString()
setCompareString(java.lang.String)
public com.novell.service.rfc1960.Rfc1960Parser getSearchStringParser()
A Rfc1960Parser object that was instantiated with the compareString last set by the setCompareString method is returned.
public boolean equals(java.lang.Object obj)
If the input object has a RFC1960 compare string, this method will do the comparision based on the commands in the compare string. If the operationType is illegal for the data type being compared, an IllegalArmumentException will be thrown.
obj
- The object to compare.setCompareString(java.lang.String)
,
NAME_FIELD
,
RESTRICTION_FIELD
,
INUSE_FIELD
public java.lang.String toString()
The String representation is in the following format: "name: s, restriction: n, inUse: n, compareString: s"
public java.lang.Object clone()
Instantiates a new object of this type with all new references, but with the same values within those references.
public void copySubset(VolumeRestriction from)
public void copy(VolumeRestriction from)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |