public class AttributeList extends Object implements Serializable, Cloneable
Note: Reuse of a AttributeList object which was already used to get a principal from a factory is not supported. The factory might change the content of the passed AttributeList object.
Modifier and Type | Field and Description |
---|---|
protected ArrayList |
attributes |
protected HashSet |
fastAccess |
protected boolean |
mCheckSizeLimit |
static int |
TYPE_BLOB
TYPE_BLOB is returned by
getAttributeType(String, String) if the
type of the values of an attribute is of type byte[] |
static int |
TYPE_STRING
TYPE_STRING is returned by
getAttributeType(String, String) if
the type of the values of an attribute is of type String |
static int |
TYPE_UNKNOWN
TYPE_UNKNOWN is returned by
getAttributeType(String, String) if
the type of the values of an attribute cannot be determined |
Constructor and Description |
---|
AttributeList()
Default constructor of AttributeList.
|
AttributeList(boolean checkSizeLimit)
Constructor of AttributeList.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(String nameSpace,
String attributeName)
Add an attribute to this instance of AttributeList with following
properties
Note: A AttributeList can only contain 25 attributes.
|
void |
addAttribute(String nameSpace,
String attributeName,
int type)
Add an attribute to this instance of AttributeList with following
properties
|
void |
addAttributeList(AttributeList populateAttributes)
Add attributes to this instance of AttributeList
|
Object |
clone()
Returns a new instance of AttributeList which contains the same data as
this instance.
|
boolean |
containsAttribute(String nameSpace,
String attributeName) |
boolean |
containsAttribute(String nameSpace,
String attributeName,
int type)
Returns whether an attribute is contained in this instance of
AttributeList with following properties
|
boolean |
equals(Object obj)
used to compare instances of AttributeList
|
String |
getAttributeNameOfAttributeAt(int index)
Returns the name of an attribute at a given index in this attributeList
|
int |
getAttributeType(String nameSpace,
String attributeName)
returns the type of the attribute of this instance of AttributeList.
|
int |
getAttributeTypeOfAttributeAt(int index)
returns the type of the attribute of this instance of AttributeList.
|
String |
getNameSpaceOfAttributeAt(int index)
Returns the namespace of an attribute at a given index in this
attributeList
|
AttributeList |
getNotContainedAttributes(AttributeList populateAttributes)
Returns a new instance of AttributeList which contains all attributes
which are contained in the passed AttributeList, but not contained in
this instance.
|
int |
getSize()
Returns the number of components in this attributeList
|
int |
hashCode() |
boolean |
isSubsetOf(AttributeList populateAttributes)
Returns a whether this AttributeList is a subset of the given
AttributeList
|
void |
removeAttribute(String nameSpace,
String attributeName)
Removes an attribute from this instance of AttributeList with following
properties
|
String |
toString()
Returns a string representation of this AttributeList.
|
public static final int TYPE_UNKNOWN
getAttributeType(String, String)
if
the type of the values of an attribute cannot be determinedpublic static final int TYPE_STRING
getAttributeType(String, String)
if
the type of the values of an attribute is of type Stringpublic static final int TYPE_BLOB
getAttributeType(String, String)
if the
type of the values of an attribute is of type byte[]protected ArrayList attributes
protected HashSet fastAccess
protected boolean mCheckSizeLimit
public AttributeList()
addAttribute(String, String)
to add attributespublic AttributeList(boolean checkSizeLimit)
addAttribute(String, String)
to add attributescheckSizeLimit
- specifies whether the size limit of 25 attributes
should be checkedpublic boolean equals(Object obj)
public int getAttributeTypeOfAttributeAt(int index)
index
- index of attribute in AttributeListpublic int getAttributeType(String nameSpace, String attributeName)
nameSpace
- namespace of the attributeattributeName
- name of the attributepublic void removeAttribute(String nameSpace, String attributeName)
nameSpace
- namespace of the attributeattributeName
- name of the attributepublic boolean containsAttribute(String nameSpace, String attributeName, int type)
nameSpace
- namespace of the attributeattributeName
- name of the attributetype
- the attribute typepublic void addAttribute(String nameSpace, String attributeName)
nameSpace
- namespace of the attributeattributeName
- name of the attributeUMRuntimeException
- if the AttributeList already contains 25
attributes.public void addAttribute(String nameSpace, String attributeName, int type)
nameSpace
- namespace of the attributeattributeName
- name of the attributetype
- of the attribute. Following constants are allowed: TYPE_UNKNOWN, TYPE_STRING,
TYPE_BLOBUMRuntimeException
- if the AttributeList already contains 25 attributes.public void addAttributeList(AttributeList populateAttributes)
populateAttributes
- instance of another AttributeList which is used
to copy the attributes into this instanceUMRuntimeException
- if the AttributeList already contains 25
attributes.public boolean isSubsetOf(AttributeList populateAttributes)
populateAttributes
- the AttributeList against which this AttributeList is comparedpublic AttributeList getNotContainedAttributes(AttributeList populateAttributes)
populateAttributes
- the AttributeList to be added to this AttributeListpublic Object clone()
public int getSize()
public String getNameSpaceOfAttributeAt(int index)
index
- given index in attributeListpublic String getAttributeNameOfAttributeAt(int index)
index
- given index in attributeListAccess Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] CORE-TOOLS
|
[sap.com]
|
default
|
BC-JAS
|
[sap.com] ENGFACADE
|
[sap.com] tc/je/usermanagement/api
|
api
|
BC-JAS-SEC
|
[sap.com] ENGINEAPI
|
[sap.com]
|
-
|
BC-JAS-SEC-UME
|
[sap.com] ENGINEAPI
|
[sap.com]
|
default
|
BC-JAS-SEC-UME
|
Copyright 2018 SAP AG Complete Copyright Notice