|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.novell.service.file.nw.ExtendedAttribute
Provides constructors and methods for the support of an extended attribute. An extended attribute is composed of a name and a corresponding byte array of data.
WARNING: 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 classes implementation to provide for thread safe operation.
If you have a multi-threaded application and a code segment of that application 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 method of this class in a synchronized code block.
If you have a multi-threaded application and a code segment of that application 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.
EAEnumerator
Field Summary | |
static java.lang.String |
ATTRIBUTE_ID
Attribute ID of ExtendedAttribute |
static java.lang.String |
COMPARE_SYNTAX_STRING
Schema syntax of ExtendedAttribute |
static java.lang.String |
NAME_FIELD
Compare Fields |
static java.lang.String |
SCHEMA_BINDING_NAME
Schema name of ExtendedAttribute |
Constructor Summary | |
ExtendedAttribute()
Constructs an ExtendedAttribute object with name and data set to NULL. |
|
ExtendedAttribute(byte[] data)
Constructs an ExtendedAttribute object with the data set to the passed in parameter. |
|
ExtendedAttribute(java.lang.String name)
Constructs an ExtendedAttribute object with the name set to the passed in parameter. |
|
ExtendedAttribute(java.lang.String name,
byte[] data)
Constructs an ExtendedAttribute object with the name and data set to the passed in parameters. |
Method Summary | |
java.lang.Object |
clone()
Instantiates a new object of this type with all new references, but with the same values within those references. |
boolean |
equals(java.lang.Object obj)
Compares the input object against this object. |
java.lang.String |
getCompareString()
Returns the current value of compareString. |
byte[] |
getData()
Returns the Data associated with this extended attribute. |
java.lang.String |
getName()
Returns the name associated with this extended attribute. |
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 used to allow individual compares on the eaName field. |
void |
setData(byte[] data)
Sets the Data to be associated with this extended attribute. |
void |
setName(java.lang.String name)
Sets the name to be associated with this extended attribute. |
java.lang.String |
toString()
Converts the object to a String. |
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 = "Extended Attribute")
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)
Constructor Detail |
public ExtendedAttribute()
setName(java.lang.String)
,
setData(byte[])
public ExtendedAttribute(java.lang.String name)
name
- The extended attribute's namesetData(byte[])
public ExtendedAttribute(byte[] data)
data
- The extended attribute's data.setName(java.lang.String)
public ExtendedAttribute(java.lang.String name, byte[] data)
name
- The extended attribute's name.data
- The extended attribute's data.Method Detail |
public java.lang.String getName()
public void setName(java.lang.String name)
name
- The extended attribute's name.public byte[] getData()
public void setData(byte[] data)
data
- The extended attributes data.public void setCompareString(java.lang.String compareString)
See the various SearchStringComponent compare methods referenced below for detailed information on the operation types allowed for String and integer data members.
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 returns TRUE if the name contains the substring "printer" and the objectId is not 2, and the rights are set 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 the TA_WRITE bits are set, regardless of what other bits are set.
If the string passed in is not a valid RFC1960 formatted string, this method will throw an IllegalArgumentException. If the compareString value is NULL, RFC1960 formatted compares will be disabled.
compareString
- The RFC1960 formatted search string. NULL
disables this compare functionality.equals(java.lang.Object)
,
NAME_FIELD
public java.lang.String getCompareString()
Trustee.setCompareString(java.lang.String)
public com.novell.service.rfc1960.Rfc1960Parser getSearchStringParser()
Returns a Rfc1960Parser object that was instantiated with the compareString last set by the setCompareString() method.
public boolean equals(java.lang.Object obj)
obj
- The object to compare.setCompareString(java.lang.String)
,
NAME_FIELD
public java.lang.String toString()
A String is created that contains the name of the attribute, the size of the data and a comma separated list of its first 128 data elements in the following format: "eaName: s, compareString: s, eaData length: n, eaData: 1, 2, 3, ..."
This method overrides the Object.toString method.
public java.lang.Object clone()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |