public interface IPrincipalMaint extends IPrincipal
IPrincipal
and provides write access to a
principal.
It provides methods to change a principal's attributes, to commit these
changes to the principal store or to roll them back (i.e. discard them) if
appropriate. It is intended for administration of user profiles (including
self-administration). The set-methods with boolean return values return
true
if the new value is different from the previous value.
Calling of set-methods with a value of null
to effectively
remove an attribute. If invalid arguments in set-methods are detected, a
UMRuntimeException
is thrown.
Note: For consistency reasons no leading or trailing spaces are
allowed in namespaces, attribute names and String values. All setter methods
like setAttribute(String, String, String[])
of this
interface and all setter methods of derived interfaces like
IUserMaint.setLastName(String)
always return true to avoid
performance issues due to round trips to the persistency.
BYTE_TYPE, CREATED_BY, DATASOURCE, DEFAULT_NAMESPACE, DEFAULT_RELATION_NAMESPACE, DESCRIPTION, DISPLAYNAME, LAST_MODIFIED_BY, PRINCIPAL_CREATION_DATE, PRINCIPAL_MODIFY_DATE, PRINCIPAL_RELATION_MEMBER_ATTRIBUTE, PRINCIPAL_RELATION_PARENT_ATTRIBUTE, STRING_TYPE, TRANSIENT_NAMESPACE, UNIQUE_NAME
Modifier and Type | Method and Description |
---|---|
boolean |
addAttributeValue(String namespace,
String name,
String value)
Generic method to add arbitrary text data to a principal's attribute.
|
void |
commit()
Commit changed principal data to the principal store.
|
boolean |
isModified()
Check if the object has been modified.
|
boolean |
removeAttributeValue(String namespace,
String name,
String value)
Generic method to remove arbitrary text data from a principal's
attribute.
|
void |
rollback()
Roll back (i.e. discard) the changes applied to a principal object up to
the point when IPrincipalMaint was requested or until the latest call of
commit.
|
void |
save()
Call this function to save/update the principal data.
|
boolean |
setAttribute(String namespace,
String name,
String[] values)
Generic method to associate arbitrary text data with a principal.
|
boolean |
setBinaryAttribute(String namespace,
String name,
byte[] value)
Generic method to associate arbitrary binary data with a principal.
|
boolean |
setDisplayName(String displayName)
Sets the displayName of this principal.
|
created, equals, getAttribute, getAttributeNames, getAttributeNamespaces, getAttributeType, getBinaryAttribute, getDisplayName, getMessages, getParents, getUniqueID, hashCode, isExistenceChecked, isMutable, lastModified, refresh
boolean setAttribute(String namespace, String name, String[] values)
true
if values
is different
from the attribute's previous values, false
otherwise.
Namespace and name can have up to 255 characters. Each value String can
have up to 255 characters. If the given values array is null
, the attribute is deleted on the persistence.
Note: Doublets in the values array are removed. I.e. if the values array contains ["t1","t1","t2"], it will be stored as ["t1","t2"].
namespace
- namespace of the attribute to set (max. 255 characters).name
- name of the attribute (max. 255 characters)values
- values of the attribute (each max. 255 characters)values
is different
from the attribute's previous values, false otherwiseUMRuntimeException
- if either namespace
or
name
is not supportedboolean addAttributeValue(String namespace, String name, String value)
true
if the operation changes the
attribute's previous values, false
otherwise. Namespace and
name can have up to 255 characters. Each value String can have up to 255
characters. The given value must not be null
.
Note: Doublets will lead to an
AttributeValueAlreadyExistsException
during
commit()
.
namespace
- namespace of the attribute to set (max. 255 characters).name
- name of the attribute (max. 255 characters)value
- value to add to the attribute (each max. 255 characters)UMRuntimeException
- if either namespace
or
name
is not supportedboolean removeAttributeValue(String namespace, String name, String value)
true
if the operation
changes the attribute's previous values, false
otherwise.
Namespace and name can have up to 255 characters. Each value String can
have up to 255 characters. The given value must not be null
.namespace
- namespace of the attribute to set (max. 255 characters).name
- name of the attribute (max. 255 characters)value
- value to remove from the attribute (each max. 255
characters)UMRuntimeException
- if either namespace
or
name
is not supportedboolean setBinaryAttribute(String namespace, String name, byte[] value)
true
if values
is different
from the attribute's previous values, false
otherwise. If
the given value is null
, the attribute is deleted on the
persistence.
Namespace and name can have up to 255 characters.namespace
- namespace of the attribute to set (max. 255 characters).name
- name of the attribute (max. 255 characters)value
- byte array of values of the attributevalues
is different
from the attribute's previous values, false otherwiseUMRuntimeException
- if either namespace
or
name
is not supportedboolean isModified()
true
if any of the set method on this object have
been called.boolean setDisplayName(String displayName) throws UMException
displayName
- String containing the user's displayNameUMException
- if the displayName could not be setvoid commit() throws UMException
commit()
or rollback
will be required to unlock
the principal if the principal factory employs pessimistic locking.
Note: This method will throw a
PrincipalAlreadyExistsException
if the principal already
existsAttributeValueAlreadyExistsException
if a duplicate
value should be added for an attribute and this is not supported by the
persistence which should store the attributeUMException
- if the data can't be committed to the principal
store.void rollback()
commit()
or rollback
will be required to unlock the principal if the principal factory employs
pessimistic locking.void save() throws UMException
UMException
- if the data can't be storedAccess 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