|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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(Set<Attribute> attrs)
|
Method Summary | |
---|---|
Attribute |
find(String name)
Find the named attribute |
BigDecimal |
findBigDecimal(String name)
Get the big decimal value from the specified (single-valued) attribute. |
Boolean |
findBoolean(String name)
Get the boolean value from the specified (single-valued) attribute. |
Date |
findDate(String name)
Get the date value from the specified (single-valued) attribute that contains a long. |
Double |
findDouble(String name)
Get the integer value from the specified (single-valued) attribute. |
Integer |
findInteger(String name)
Get the integer value from the specified (single-valued) attribute. |
List<Object> |
findList(String name)
Return a list of attributes |
Long |
findLong(String name)
Get the long value from the specified (single-valued) attribute. |
String |
findString(String name)
Get the string value from the specified (single-valued) attribute. |
List<String> |
findStringList(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(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(Set<Attribute> attrs)
Method Detail |
---|
public Attribute find(String name)
name
- -
the attribute name to search for
public 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 List<Object> findList(String name)
name
- -
name of attribute to search for.
public List<String> findStringList(String name)
name
- the name of the attribute to search for
public boolean hasAttribute(String name)
name
- attribute name
public String findString(String name)
name
- Attribute from which to retrieve the long value.
ClassCastException
- iff the object in the attribute is not an long.
IllegalArgumentException
- iff the attribute is a multi-valued (rather than
single-valued).public Integer findInteger(String name)
name
- Attribute from which to retrieve the long value.
ClassCastException
- iff the object in the attribute is not an long.
IllegalArgumentException
- iff the attribute is a multi-valued (rather than
single-valued).public Long findLong(String name)
name
- Attribute from which to retrieve the long value.
ClassCastException
- iff the object in the attribute is not an long.
IllegalArgumentException
- iff the attribute is a multi-valued (rather than
single-valued).public Date findDate(String name)
name
- Attribute from which to retrieve the date value.
ClassCastException
- iff the object in the attribute is not an long.
IllegalArgumentException
- iff the attribute is a multi-valued (rather than
single-valued).public Double findDouble(String name)
name
- Attribute from which to retrieve the integer value.
ClassCastException
- iff the object in the attribute is not an integer.
IllegalArgumentException
- iff the attribute is a multi-valued (rather than
single-valued)..public BigDecimal findBigDecimal(String name)
name
- Attribute from which to retrieve the big decimal value.
ClassCastException
- iff the object in the attribute is not an big decimal.
IllegalArgumentException
- iff the attribute is a multi-valued (rather than
single-valued).public Boolean findBoolean(String name)
name
- Attribute from which to retrieve the boolean value.
ClassCastException
- iff the object in the attribute is not an Boolean
.
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 |