|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ServerAttribute
The server specific interface extending the EntryAttribute interface. It adds three more methods which are Server side.
Method Summary | |
---|---|
org.apache.directory.shared.ldap.schema.AttributeType |
getAttributeType()
Get the attribute type associated with this ServerAttribute. |
boolean |
instanceOf(java.lang.String attributeId)
Check if the current attribute type is of the expected attributeType |
boolean |
isValid()
Checks to see if this attribute is valid along with the values it contains. |
void |
setAttributeType(org.apache.directory.shared.ldap.schema.AttributeType attributeType)
Set the attribute type associated with this ServerAttribute. |
void |
setUpId(java.lang.String upId,
org.apache.directory.shared.ldap.schema.AttributeType attributeType)
Set the user provided ID. |
org.apache.directory.shared.ldap.entry.EntryAttribute |
toClientAttribute()
Convert the ServerAttribute to a ClientAttribute |
Methods inherited from interface org.apache.directory.shared.ldap.entry.client.ClientAttribute |
---|
isValid |
Methods inherited from interface org.apache.directory.shared.ldap.entry.EntryAttribute |
---|
add, add, add, clear, clone, contains, contains, contains, get, get, getAll, getBytes, getId, getString, getUpId, isHR, put, put, put, put, remove, remove, remove, setHR, setId, setUpId, size |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Methods inherited from interface java.io.Externalizable |
---|
readExternal, writeExternal |
Method Detail |
---|
org.apache.directory.shared.ldap.schema.AttributeType getAttributeType()
void setAttributeType(org.apache.directory.shared.ldap.schema.AttributeType attributeType)
Set the attribute type associated with this ServerAttribute.
The current attributeType will be replaced. It is the responsibility of the caller to insure that the existing values are compatible with the new AttributeType
attributeType
- the attributeType associated with this entry attributeboolean instanceOf(java.lang.String attributeId) throws javax.naming.directory.InvalidAttributeValueException
Check if the current attribute type is of the expected attributeType
This method won't tell if the current attribute is a descendant of the attributeType. For instance, the "CN" serverAttribute will return false if we ask if it's an instance of "Name".
attributeId
- The AttributeType ID to check
javax.naming.directory.InvalidAttributeValueException
- If there is no AttributeTypevoid setUpId(java.lang.String upId, org.apache.directory.shared.ldap.schema.AttributeType attributeType)
Set the user provided ID. If we have none, the upId is assigned the attributetype's name. If it does not have any name, we will use the OID.
If we have an upId and an AttributeType, they must be compatible. : - if the upId is an OID, it must be the AttributeType's OID - otherwise, its normalized form must be equals to ones of the attributeType's names.
In any case, the ATtributeType will be changed. The caller is responsible for the present values to be compatoble with the new AttributeType.
upId
- The attribute IDattributeType
- The associated attributeTypeboolean isValid() throws javax.naming.NamingException
Checks to see if this attribute is valid along with the values it contains.
An attribute is valid if :
javax.naming.NamingException
- if there is a failure to check syntaxes of valuesorg.apache.directory.shared.ldap.entry.EntryAttribute toClientAttribute()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |