|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
org.identityconnectors.framework.common.objects.AttributesAccessor
public class AttributesAccessor
Attributes Accessor convenience methods for accessing attributes. This class wraps a set of attributes to make lookup faster than the AttributeUtil.find(String, Set)
method, since that method must re-create the map each time.
Constructor Summary | |
---|---|
AttributesAccessor(java.util.Set<Attribute> attrs) |
Method Summary | |
---|---|
Attribute |
find(java.lang.String name) Find the named attribute |
java.math.BigDecimal |
findBigDecimal(java.lang.String name) Get the big decimal value from the specified (single-valued) attribute. |
java.lang.Boolean |
findBoolean(java.lang.String name) Get the boolean value from the specified (single-valued) attribute. |
java.util.Date |
findDate(java.lang.String name) Get the date value from the specified (single-valued) attribute that contains a long. |
java.lang.Double |
findDouble(java.lang.String name) Get the integer value from the specified (single-valued) attribute. |
java.lang.Integer |
findInteger(java.lang.String name) Get the integer value from the specified (single-valued) attribute. |
java.util.List<java.lang.Object> |
findList(java.lang.String name) Return a list of attributes |
java.lang.Long |
findLong(java.lang.String name) Get the long value from the specified (single-valued) attribute. |
java.lang.String |
findString(java.lang.String name) Get the string value from the specified (single-valued) attribute. |
java.util.List<java.lang.String> |
findStringList(java.lang.String name) Return the multivalued attribute as a list of strings. |
boolean |
getEnabled(boolean dflt) Return the enabled status of the account. |
Name |
getName() Get the Name attribute from the set of attributes. |
GuardedString |
getPassword() Get the password as a GuardeString |
Uid |
getUid() Get the Uid attribute from the set of attributes. |
boolean |
hasAttribute(java.lang.String name) Determines if the set as the attribute specified. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AttributesAccessor(java.util.Set<Attribute> attrs)
Method Detail |
---|
public Attribute find(java.lang.String name)
name
- - the attribute name to search forpublic Name getName()
Name
attribute from the set of attributes.Name
attribute in the set.public Uid getUid()
Uid
attribute from the set of attributes.Uid
attribute in the set.public boolean getEnabled(boolean dflt)
dflt
- the default state if enable is not found.public GuardedString getPassword()
public java.util.List<java.lang.Object> findList(java.lang.String name)
name
- - name of attribute to search for.public java.util.List<java.lang.String> findStringList(java.lang.String name)
name
- the name of the attribute to search forpublic boolean hasAttribute(java.lang.String name)
name
- attribute namepublic java.lang.String findString(java.lang.String name)
name
- Attribute from which to retrieve the long value.java.lang.ClassCastException
- iff the object in the attribute is not an long.java.lang.IllegalArgumentException
- iff the attribute is a multi-valued (rather than single-valued).public java.lang.Integer findInteger(java.lang.String name)
name
- Attribute from which to retrieve the long value.java.lang.ClassCastException
- iff the object in the attribute is not an long.java.lang.IllegalArgumentException
- iff the attribute is a multi-valued (rather than single-valued).public java.lang.Long findLong(java.lang.String name)
name
- Attribute from which to retrieve the long value.java.lang.ClassCastException
- iff the object in the attribute is not an long.java.lang.IllegalArgumentException
- iff the attribute is a multi-valued (rather than single-valued).public java.util.Date findDate(java.lang.String name)
name
- Attribute from which to retrieve the date value.java.lang.ClassCastException
- iff the object in the attribute is not an long.java.lang.IllegalArgumentException
- iff the attribute is a multi-valued (rather than single-valued).public java.lang.Double findDouble(java.lang.String name)
name
- Attribute from which to retrieve the integer value.java.lang.ClassCastException
- iff the object in the attribute is not an integer.java.lang.IllegalArgumentException
- iff the attribute is a multi-valued (rather than single-valued)..public java.math.BigDecimal findBigDecimal(java.lang.String name)
name
- Attribute from which to retrieve the big decimal value.java.lang.ClassCastException
- iff the object in the attribute is not an big decimal.java.lang.IllegalArgumentException
- iff the attribute is a multi-valued (rather than single-valued).public java.lang.Boolean findBoolean(java.lang.String name)
name
- Attribute from which to retrieve the boolean value.java.lang.ClassCastException
- iff the object in the attribute is not an Boolean
.java.lang.IllegalArgumentException
- iff the attribute is a multi-valued (rather than single-valued).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |