|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The principal factory provides means to
| Field Summary | |
static java.lang.String |
ICUSTOM_OBJECT
Deprecated. |
static java.lang.String |
IGROUP
|
static java.lang.String |
IPRINCIPAL
|
static java.lang.String |
IPRINCIPALSET
|
static java.lang.String |
IROLE
|
static java.lang.String |
IUSER
|
static java.lang.String |
IUSERACCOUNT
|
static java.lang.String |
VERSIONSTRING
|
| Method Summary | |
void |
addDataSource(java.io.InputStream configuration)
Adds a new datasource dynamically to IPrincipalFactory. |
void |
addPrincipalToParent(java.lang.String customObjectId,
java.lang.String parentPrincipalId)
assign customObject with customObjectId to parent-customOjbect with parentPrincipalId. |
void |
commitPrincipals(IPrincipalMaint[] objects)
Commit the changes applied to a set of objects to the object
store in one pass. |
void |
deletePrincipal(java.lang.String uniqueID)
Delete a object from the use store |
void |
deregisterPrincipalMetaData(java.lang.String principalTypeIdentifier)
Deregisters the IPrincipalMetaData object. |
IPrincipalMetaData[] |
getAvailablePrincipalMetaData()
Get all available IPrincipalMetaData objects. |
IPrincipalMaint |
getMutablePrincipal(java.lang.String uniqueId)
Get a object which can be modified. |
IPrincipal |
getPrincipal(java.lang.String uniqueId)
Get a principal by using its id. |
IPrincipal |
getPrincipal(java.lang.String uniqueId,
AttributeList populateAttributes)
Get a principal by using its uniqueId and the populateAttributes which should be populated. |
IPrincipalMetaData |
getPrincipalMetaData(java.lang.String principalTypeIdentifier)
Get a IPrincipalMetaData object for the given principal type identifier. |
IPrincipal[] |
getPrincipals(java.lang.String[] uniqueIDs)
Gets the objects for multiple unique IDs |
IPrincipal[] |
getPrincipals(java.lang.String[] uniqueIDs,
AttributeList populateAttributes)
Gets the objects for multiple unique IDs and populates all attributes in populateAttributes |
IPrincipalSearchFilter |
getPrincipalSearchFilter(boolean orMode,
java.lang.String principalTypeIdentifier)
Returns an IPrincipalSearchFilter object to be used to specify query attributes |
java.lang.String |
getPrincipalType(java.lang.String uniqueId)
get the data type out of a principal's uniqueId. |
java.lang.String |
getPrincipalTypeIdentifier(java.lang.String uniqueId)
Get the principal type identifier for this custom object. |
boolean |
isPrincipalAttributeModifiable(java.lang.String uniqueId,
java.lang.String namespace,
java.lang.String attributename)
Checks whether a specific attribute of the principal with the given uniqueId is modifiable. |
boolean |
isPrincipalDeletable(java.lang.String uniqueId)
Checks whether the principal with the given uniqueId can be deleted. |
boolean |
isPrincipalModifiable(java.lang.String uniqueId)
Checks whether at least one attribute of the principal with the given uniqueId is modifiable. |
IPrincipalMaint |
newPrincipal(IPrincipal copyFrom)
Creates a new object. |
IPrincipalMaint |
newPrincipal(java.lang.String principalTypeIdentifier)
Creates a new, initially blank object. |
IPrincipalMetaData |
newPrincipalMetaData(java.lang.String principalTypeIdentifier,
int principalType)
Returns a new IPrincipalMetaData object, or throws a ObjectAlreadyExistsException, if there is already a IPrincipalMetaData object for the given principalTypeIdentifier. |
IPrincipalMaint[] |
newPrincipals(java.lang.String principalTypeIdentifier,
int num)
Creates new, initially blank object objects. |
IPrincipalSet |
newPrincipalSet(IPrincipalSet copyFrom)
Creates a new object. |
IPrincipalSet |
newPrincipalSet(java.lang.String principalTypeIdentifier)
Creates a new, initially blank object. |
void |
registerListener(PrincipalListener objectListener,
int modifier)
registerListener allows to subscribe to a predefined eventName PrincipalListener
The caller has to provide a receiver object which implements PrincipalListener |
void |
registerPrincipalMetaData(IPrincipalMetaData metadata)
Registers the given IPrincipalMetaData object. |
void |
removePrincipalFromParent(java.lang.String customObjectId,
java.lang.String parentPrincipalId)
unassign customObject with customObjectId to parent-customOjbect with parentPrincipalId. |
void |
rollbackPrincipals(IPrincipalMaint[] objects)
Roll back (i.e. |
void |
savePrincipals(IPrincipalMaint[] objects)
Batch save, the data is not made permanent until commitObjects() is called |
ISearchResult |
searchPrincipals(IPrincipalSearchFilter filter)
Search for objects in the objects store which match the criteria specified in the |
void |
unregisterListener(PrincipalListener objectListener)
unregisterListener unsubscribes a receiver from a previously subscribed event. |
| Methods inherited from interface com.sap.security.api.IConfigurable |
initialize |
| Field Detail |
public static final java.lang.String VERSIONSTRING
public static final java.lang.String IUSER
public static final java.lang.String IUSERACCOUNT
public static final java.lang.String IGROUP
public static final java.lang.String IROLE
public static final java.lang.String IPRINCIPAL
public static final java.lang.String IPRINCIPALSET
public static final java.lang.String ICUSTOM_OBJECT
| Method Detail |
public java.lang.String getPrincipalType(java.lang.String uniqueId)
throws UMException
IUSER, IUSERACCOUNT,
IGROUP, IROLE,
IPRINCIPAL, IPRINCIPALSETuniqueId - The unique id of a principalUMException -
public IPrincipal getPrincipal(java.lang.String uniqueId)
throws UMException
uniqueId - The unique id of the principalUMException -
public IPrincipal getPrincipal(java.lang.String uniqueId,
AttributeList populateAttributes)
throws UMException
uniqueId - The unique id of the principalpopulateAttributes - The attributes which should be populatedUMException -
public boolean isPrincipalModifiable(java.lang.String uniqueId)
throws UMException
uniqueId - The unique id of the principalUMException -
public boolean isPrincipalDeletable(java.lang.String uniqueId)
throws UMException
uniqueId - The unique id of the principalUMException -
public boolean isPrincipalAttributeModifiable(java.lang.String uniqueId,
java.lang.String namespace,
java.lang.String attributename)
throws UMException
uniqueId - The unique id of the principalnamespace - The namespace of the attributeattributename - The name of the attributeUMException -
public IPrincipal[] getPrincipals(java.lang.String[] uniqueIDs)
throws NoSuchPrincipalException
String[] - array of uniqueIDs which are used to identify the principal objectsNoSuchPrincipalException - if one or more of the given unique IDs
are not assigned to any object
public IPrincipal[] getPrincipals(java.lang.String[] uniqueIDs,
AttributeList populateAttributes)
throws NoSuchPrincipalException
String[] - array of uniqueIDs which are used to identify the principal objectspopulateAttributes - AttributeListNoSuchPrincipalException - if one or more of the given unique IDs
are not assigned to any objectpublic IPrincipalMaint newPrincipal(java.lang.String principalTypeIdentifier)
IPrincipalMaint.commit().
Note: don't forget to add this type to the data source configuration. One data source
has to be home for this object typeprincipalTypeIdentifier - 4 letter Identifier for this new principalpublic IPrincipalSet newPrincipalSet(java.lang.String principalTypeIdentifier)
newPrincipal(String) After setting the appropriate data via
IPrincipalMaint's set-methods, the object object must be commited to the object
store via IPrincipalMaint.commit().
Note: don't forget to add this type to the data source configuration. One data source
has to be home for this object typeprincipalTypeIdentifier - 4 letter Identifier for this new principalpublic IPrincipalSet newPrincipalSet(IPrincipalSet copyFrom)
copyFrom will be used as a template, i.e. some (but not
necessarily all) attributes will be copied to the new object. The unique
ID for the new object will be generated by the object factory.
After setting the appropriate data via set-methods, the principal object
must be commited to the principal store via IPrincipalMaint.commit().IPrincipalSet - The object which is used as a blueprintpublic IPrincipalMaint newPrincipal(IPrincipal copyFrom)
copyFrom will be used as a template, i.e. some (but not
necessarily all) attributes will be copied to the new object. The unique
ID for the new object will be generated by the object factory.
After setting the appropriate data via set-methods, the principal object
must be commited to the principal store via IPrincipalMaint.commit().IPrincipal - The object which is used as a blueprint
public void deletePrincipal(java.lang.String uniqueID)
throws UMException
uniqueId - The unique id of the principalUMException - if the object can't be deleted
public void commitPrincipals(IPrincipalMaint[] objects)
throws UMException
objects to the object
store in one pass. Depending on the object factory's implementation, this
will result in better performance than calling IPrincipalMaint.commit()
on each object object individually.
Note that either commiting or rolling back changes will be
required to unlock objects if the object factory employs pessimistic
locking.IPrincipalMaint[] - Objects which should be stored to the data storeUMException - if one or more of the IPrincipalMaint objects cannot
be stored successfully.
public void rollbackPrincipals(IPrincipalMaint[] objects)
throws UMException
objects
.
Note that either commiting or rolling back changes will be
required to unlock objects if the object factory employs pessimistic
locking.IPrincipalMaint[] - Objects which should be stored to the data storeUMException - if one or more of the IPrincipalMaint objects cannot
be discarded successfully.
public ISearchResult searchPrincipals(IPrincipalSearchFilter filter)
throws UMException
given filter. In order to get a principal search filter use
getPrincipalSearchFilter(boolean,String).
You can define a search filter using methods of IPrincipalSearchFilter.
IPrincipalSearchFilter - filter defined to search for principals
public void savePrincipals(IPrincipalMaint[] objects)
throws UMException
IPrincipalMaint[] - objects which should be saved
public IPrincipalMaint[] newPrincipals(java.lang.String principalTypeIdentifier,
int num)
IPrincipalMaint.commit().
For batch save and commit savePrincipals(IPrincipalMaint[]) and
commitPrincipals(IPrincipalMaint[])principalTypeIdentifier - The principal type identifierprincipalTypeIdentifier - num - number of new blank objects requested
public IPrincipalMaint getMutablePrincipal(java.lang.String uniqueId)
throws UMException
IPrincipalMaint interface which contains the corresponding
set-methods.uniqueId - The unique id of a principalUMException - if no modifiable object can be provided.
public java.lang.String getPrincipalTypeIdentifier(java.lang.String uniqueId)
throws UMException
the - unique id of the object
public IPrincipalSearchFilter getPrincipalSearchFilter(boolean orMode,
java.lang.String principalTypeIdentifier)
throws UMException
IPrincipalSearchFilter only contains attributes which will be queried
UMException - FeatureNotAvailableException -
public void addPrincipalToParent(java.lang.String customObjectId,
java.lang.String parentPrincipalId)
throws UMException
customObjectId - uniqueId of PrincipalparentPrincipalId - uniqueId of the parent PrincipalUMException - if data cannot be stored successfully
public void removePrincipalFromParent(java.lang.String customObjectId,
java.lang.String parentPrincipalId)
throws UMException
customObjectId - uniqueId of PrincipalparentPrincipalId - uniqueId of the parent PrincipalUMException - if data cannot be stored successfully
public void registerListener(PrincipalListener objectListener,
int modifier)
PrincipalListener
The caller has to provide a receiver object which implements PrincipalListenerPrincipalListener - object which should be registeredmodifier - constant defined in PrincipalListenerpublic void unregisterListener(PrincipalListener objectListener)
PrincipalListener - object which should be unregistered
public IPrincipalMetaData newPrincipalMetaData(java.lang.String principalTypeIdentifier,
int principalType)
throws UMException
principalTypeIdentifier - The principalTypeIdentifier which is described by the new IPrincipalMetaData objectprincipalType - The semantic principal type, e.g. IPrincipalMetaData.IPrincipalSet or IPrincipalMetaData.IPrincipalObjectAlreadyExistsException - if there is already a object for the given principal type
public void registerPrincipalMetaData(IPrincipalMetaData metadata)
throws UMException
principal type identifier as the given one. The object becomes persistent, and will also be
available after the restart of the system.metadata - The IPrincipalMetaData object that should be registered
public void deregisterPrincipalMetaData(java.lang.String principalTypeIdentifier)
throws UMException
principalTypeIdentifier - The principal type identifier.
public IPrincipalMetaData[] getAvailablePrincipalMetaData()
throws UMException
public IPrincipalMetaData getPrincipalMetaData(java.lang.String principalTypeIdentifier)
throws NoSuchObjectException,
UMException
principal type identifier. If no
IPrincipalMetaData object is registered for the given principal type identifier, a
NoSuchObjectException is thrown.principalTypeIdentifier - The principal type identifierNoSuchObjectException - If no IPrincipalMetaData object is registered for the given principal type identifier
public void addDataSource(java.io.InputStream configuration)
throws UMException
NOTE: The configuration of the new datasource has to be compatible to the configurations of already loaded datasources. Otherwise malfunctions might occur. The implementing class must be accessible from UME-core.
configuration - a java.io.InputStream containing the
data source information in xml format which should be used
to initialize the given datasourcethrows - UMException if an error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||