Class AttributeInfo
- java.lang.Object
-
- org.identityconnectors.framework.common.objects.AttributeInfo
-
public final class AttributeInfo extends Object
AttributeInfo is meta data responsible for describing anAttribute
. It can be programmatically determined at runtime or statically constructed. The class determines if anAttribute
is required, readable, writable, or nullable. In also includes the native type and name. It is recommended that date fields be represented as a long with time zone UTC. It should be up to the display or separate attributes if the time zone is necessary.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AttributeInfo.Flags
Enum of modifier flags to use for attributes.static class
AttributeInfo.RoleInReference
The role of an object in the relationship (provided by specific reference attribute).static class
AttributeInfo.Subtypes
Enumeration of pre-defined attribute subtypes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Set<AttributeInfo.Flags>
getFlags()
Returns the set of flags associated with the attribute.String
getName()
The name of the attribute.String
getNativeName()
The native name of the attribute.String
getReferencedObjectClassName()
For reference attributes, this method returns the object class of referenced objects.String
getRoleInReference()
For reference attributes, this method provides an indication of the role the holding object plays in the reference.String
getSubtype()
Optional subtype of the attribute.Class<?>
getType()
The basic type associated with this attribute.int
hashCode()
boolean
is(String name)
Determines if the name parameter matches thisAttributeInfo
.boolean
isCreateable()
Determines if the attribute is writable on create.boolean
isMultiValued()
Determines if this attribute can handle multiple values.boolean
isReadable()
Determines if the attribute is readable.boolean
isReference()
boolean
isRequired()
Determines whether this attribute is required for creates.boolean
isReturnedByDefault()
Determines if the attribute is returned by default.boolean
isUpdateable()
Determines if the attribute is writable on update.String
toString()
-
-
-
Method Detail
-
getName
public String getName()
The name of the attribute. This the attribute name as it is known by the framework. It may be derived from the native attribute name. Or it may be one of the special names such as __NAME__ or __PASSWORD__.- Returns:
- the name of the attribute its describing.
-
getType
public Class<?> getType()
The basic type associated with this attribute. All primitives are supported.- Returns:
- the native type if uses.
-
getSubtype
public String getSubtype()
Optional subtype of the attribute. This defines a subformat or provides more specific definition what the attribute contains. E.g. it may define that the attribute contains case-insensitive string, URL, LDAP distinguished name and so on. The subtype may contain one of the pre-defined subtypes (a value form the Subtype enumeration). The subtype may also contain an URI that specifies a custom subtype that the connector recognizes and it is not defined in the pre-defined subtype enumeration. ForConnectorObjectReference
attributes, the subtype - if present - contains the connector-wide identification of the reference. This is important especially for bi-directional relations (like the group membership), where the client might be interested that the reference attribute (e.g.)group
on theuser
object is bound to the reference attribute (e.g.)member
on thegroup
object. This feature is optional: the subtype may be missing for a reference attribute.- Returns:
- attribute subtype.
-
getNativeName
public String getNativeName()
The native name of the attribute. This is the attribute name as it is known by the resource. It is especially useful for attributes with special names such as __NAME__ or __PASSWORD__. In this case the nativeName will contain the real name of the attribute. The nativeName may be null. In such a case it is assumed that the native name is the same as name.- Returns:
- the native name of the attribute its describing.
-
getFlags
public Set<AttributeInfo.Flags> getFlags()
Returns the set of flags associated with the attribute.- Returns:
- the set of flags associated with the attribute
-
isReadable
public boolean isReadable()
Determines if the attribute is readable.- Returns:
- true if the attribute is readable else false.
-
isCreateable
public boolean isCreateable()
Determines if the attribute is writable on create.- Returns:
- true if the attribute is writable on create else false.
-
isUpdateable
public boolean isUpdateable()
Determines if the attribute is writable on update.- Returns:
- true if the attribute is writable on update else false.
-
isRequired
public boolean isRequired()
Determines whether this attribute is required for creates.- Returns:
- true if the attribute is required for an object else false.
-
isMultiValued
public boolean isMultiValued()
Determines if this attribute can handle multiple values. There is a special case with byte[] since in most instances this denotes a single object.- Returns:
- true if the attribute is multi-value otherwise false.
-
isReturnedByDefault
public boolean isReturnedByDefault()
Determines if the attribute is returned by default. Indicates if anAttribute
will be returned duringSearchApiOp
,SyncApiOp
orGetApiOp
inside aConnectorObject
by default. The default value istrue
.- Returns:
- false if the attribute should not be returned by default.
-
getReferencedObjectClassName
public String getReferencedObjectClassName()
For reference attributes, this method returns the object class of referenced objects. It is optional: the connector may not have this information, or sometimes, there may be more than a single object class that can be referenced by the attribute. (For example,member
attribute on thegroup
object can reference accounts, groups, and other kinds of objects.)
-
getRoleInReference
public String getRoleInReference()
For reference attributes, this method provides an indication of the role the holding object plays in the reference. The standard roles are described inAttributeInfo.RoleInReference
enumeration. May be null if not known or not supported.
-
isReference
public boolean isReference()
-
is
public boolean is(String name)
Determines if the name parameter matches thisAttributeInfo
.
-
-