|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RepositoryService
Identity Repository Interface.
Status: public Stability: draft
This service provides repository for objects that are commonly found in identity management deployments. It is used for storage and retrieval of objects. It also supports modifications (relative changes), searching and basic coordination.
Supported object types:
Identity repository may add some kind of basic logic in addition to a pure storage of data. E.g. it may check referential consistency, validate schema, etc.
The implementation may store the objects and properties in any suitable way and it is not required to check any schema beyond the basic common schema structures. However, the implementation MAY be able to check additional schema definitions, e.g. to check for mandatory and allowed properties and property types. This may be either explicit (e.g. implementation checking against provided XML schema) or implicit, conforming to the constraints of the underlying storage (e.g. LDAP schema enforced by underlying directory server). One way or another, the implementation may fail to store the objects that violate the schema. The method how the schemas are "loaded" to the implementation is not defined by this interface. This interface even cannot "reveal" the schema to its users (at least not now). Therefore clients of this interface must be prepared to handle schema violation errors.
The implementation is not required to index the data or provide any other optimizations. This depends on the specific implementation, its configuration and the underlying storage system. Qualitative constraints (such as performance) are NOT defined by this interface definition.
operations should be named as <operation><objectType> e.g. addUser, modifyAccount, searchObjects. The operations that returns single object instance or works on single object should be named in singular (e.g. addUser). The operation that return multiple instances should be named in plural (e.g. listObjects). Operations names should be unified as well:
The definition of this interface is somehow "fuzzy" at places. E.g. allowing schema-aware implementation but not mandating it, recommending to remove duplicates, but tolerating them, etc. The reason for this is to have better fit to the underlying storage mechanisms and therefore more efficient and simpler implementation. It may complicate the clients if the code needs to be generic and fit each and every implementation of this interface. However, such code will be quite rare. Most of the custom code will be developed to work on a specific storage (e.g. Oracle DB or LDAP) and therefore can be made slightly implementation-specific. Changing the storage in a running IDM system is extremely unlikely.
Method Summary | ||
---|---|---|
java.lang.String |
addObject(ObjectType object,
OperationResult parentResult)
Add new object. |
|
void |
claimTask(java.lang.String oid,
OperationResult parentResult)
Claim a task. |
|
void |
deleteObject(java.lang.String oid,
OperationResult parentResult)
Deletes object with specified OID. |
|
ObjectType |
getObject(java.lang.String oid,
PropertyReferenceListType resolve,
OperationResult parentResult)
Returns object for provided OID. |
|
PropertyAvailableValuesListType |
getPropertyAvailableValues(java.lang.String oid,
PropertyReferenceListType properties,
OperationResult parentResult)
Returns list of available values for specified properties. |
|
UserType |
listAccountShadowOwner(java.lang.String accountOid,
OperationResult parentResult)
Returns the User object representing owner of specified account (account shadow). |
|
ObjectListType |
listObjects(java.lang.Class objectType,
PagingType paging,
OperationResult parentResult)
Returns all objects of specified type in the repository. |
|
|
listResourceObjectShadows(java.lang.String resourceOid,
java.lang.Class<T> resourceObjectShadowType,
OperationResult parentResult)
Search for resource object shadows of a specified type that belong to the specified resource. |
|
void |
modifyObject(ObjectModificationType objectChange,
OperationResult parentResult)
Modifies object using relative change description. |
|
void |
releaseTask(java.lang.String oid,
OperationResult parentResult)
Release a claimed task. |
|
ObjectListType |
searchObjects(QueryType query,
PagingType paging,
OperationResult parentResult)
Search for objects in the repository. |
Method Detail |
---|
ObjectType getObject(java.lang.String oid, PropertyReferenceListType resolve, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
oid
- OID of the object to getresolve
- list of properties to resolve in the fetched objectresult
- parent OperationResult (in/out)
ObjectNotFoundException
- requested object does not exist
SchemaException
- error dealing with storage schema
java.lang.IllegalArgumentException
- wrong OID format, etc.java.lang.String addObject(ObjectType object, OperationResult parentResult) throws ObjectAlreadyExistsException, SchemaException
object
- object to createscripts
- scripts to execute before/after the operationparentResult
- parent OperationResult (in/out)
ObjectAlreadyExistsException
- object with specified identifiers already exists, cannot add
SchemaException
- error dealing with storage schema, e.g. schema violation
java.lang.IllegalArgumentException
- wrong OID format, etc.ObjectListType listObjects(java.lang.Class objectType, PagingType paging, OperationResult parentResult)
objectType
- paging
- paging specification to limit operation result (optional)parentResult
- parent OperationResult (in/out)
java.lang.IllegalArgumentException
- wrong object typeObjectListType searchObjects(QueryType query, PagingType paging, OperationResult parentResult) throws SchemaException
query
- search querypaging
- paging specification to limit operation result (optional)parentResult
- parent OperationResult (in/out)
java.lang.IllegalArgumentException
- wrong object type
SchemaException
- unknown property used in search queryvoid modifyObject(ObjectModificationType objectChange, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
objectChange
- specification of object changesscripts
- scripts that should be executed before of after operationparentResult
- parent OperationResult (in/out)
ObjectNotFoundException
- specified object does not exist
SchemaException
- resulting object would violate the schema
java.lang.IllegalArgumentException
- wrong OID format, described change is not applicablevoid deleteObject(java.lang.String oid, OperationResult parentResult) throws ObjectNotFoundException
oid
- OID of object to deleteparentResult
- parent OperationResult (in/out)
ObjectNotFoundException
- specified object does not exist
java.lang.IllegalArgumentException
- wrong OID format, described change is not applicablePropertyAvailableValuesListType getPropertyAvailableValues(java.lang.String oid, PropertyReferenceListType properties, OperationResult parentResult) throws ObjectNotFoundException
oid
- OID of the object for which to determine valuesproperties
- list of properties for which to determine valuesparentResult
- parentResult parent OperationResult (in/out)
ObjectNotFoundException
- specified object does not exist
java.lang.IllegalArgumentException
- wrong OID formatUserType listAccountShadowOwner(java.lang.String accountOid, OperationResult parentResult) throws ObjectNotFoundException
accountOid
- OID of account shadowparentResult
- parentResult parent OperationResult (in/out)
ObjectNotFoundException
- specified object does not exist
java.lang.IllegalArgumentException
- wrong OID format<T extends ResourceObjectShadowType> java.util.List<T> listResourceObjectShadows(java.lang.String resourceOid, java.lang.Class<T> resourceObjectShadowType, OperationResult parentResult) throws ObjectNotFoundException
resourceOid
- OID of resource definition (ResourceType)parentResult
- parentResult parent OperationResult (in/out)
ObjectNotFoundException
- specified object does not exist
java.lang.IllegalArgumentException
- wrong OID formatvoid claimTask(java.lang.String oid, OperationResult parentResult) throws ObjectNotFoundException, ConcurrencyException, SchemaException
oid
- task OIDparentResult
- parentResult parent OperationResult (in/out)
ObjectNotFoundException
- the task with specified OID was not found
ConcurrencyException
- attempt to claim already claimed task
SchemaException
- error dealing with storage schema
java.lang.IllegalArgumentException
- wrong OID format or a specified object is not a taskvoid releaseTask(java.lang.String oid, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
oid
- task OIDparentResult
- parentResult parent OperationResult (in/out)
ObjectNotFoundException
- the task with specified OID was not found
SchemaException
- error dealing with storage schema
java.lang.IllegalArgumentException
- wrong OID format or a specified object is not a task
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |