|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface extends IPrincipal. 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.
| Fields inherited from interface com.sap.security.api.IPrincipal |
BYTE_TYPE, DEFAULT_NAMESPACE, DEFAULT_RELATION_NAMESPACE, DESCRIPTION, DISPLAYNAME, PRINCIPAL_CREATION_DATE, PRINCIPAL_MODIFY_DATE, PRINCIPAL_RELATION_MEMBER_ATTRIBUTE, PRINCIPAL_RELATION_PARENT_ATTRIBUTE, STRING_TYPE, TRANSIENT_NAMESPACE, UNIQUE_NAME, VERSIONSTRING |
| Method Summary | |
void |
commit()
Commit changed principal data to the principal store. |
boolean |
isModified()
Check if the object has been modified |
void |
rollback()
Roll back (i.e. |
void |
save()
Call this function to save/update the principal data. |
boolean |
setAttribute(java.lang.String namespace,
java.lang.String name,
java.lang.String[] values)
Generic method to associate arbitrary text data with a principal. |
boolean |
setBinaryAttribute(java.lang.String namespace,
java.lang.String name,
byte[] value)
Generic method to associate arbitrary binary data with a principal. |
boolean |
setDisplayName(java.lang.String displayName)
Sets the displayName of this principal. |
| Methods inherited from interface com.sap.security.api.IPrincipal |
created, equals, getAttribute, getAttributeNames, getAttributeNamespaces, getAttributeType, getBinaryAttribute, getDisplayName, getParents, getUniqueID, hashCode, isExistenceChecked, isMutable, lastModified, refresh |
| Method Detail |
public boolean setAttribute(java.lang.String namespace,
java.lang.String name,
java.lang.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)UMRuntimeException - if either namespace
or name is not supported
public boolean setBinaryAttribute(java.lang.String namespace,
java.lang.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)values - byte array of values of the attributeUMRuntimeException - if either namespace
or name is not supportedpublic boolean isModified()
true if any of the set method on this object have been called.
public boolean setDisplayName(java.lang.String displayName)
throws UMException
UMException - if the displayName could not be set
public void 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 aPrincipalAlreadyExistsException 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 commited to the principal store.public void rollback()
commit() or rollback will be
required to unlock the principal if the principal factory employs pessimistic
locking.
public void save()
throws UMException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||