com.evolveum.midpoint.web.model
Interface ObjectManager<T>

All Known Subinterfaces:
AccountManager, ResourceManager, SystemManager, UserManager
All Known Implementing Classes:
AccountManagerImpl, ObjectManagerImpl, ResourceManagerImpl, SystemManagerImpl, UserManagerImpl

public interface ObjectManager<T>

Manages identity objects. Retrieves them and submits changes. It does not mean that the changes will be applied immediately. There may be workflow, approval or any other business logic. This is bad. The object is Java bean with java property names and the changes are XML QNames. But the extenstion attributes will be XML anyway and the Generic Objects as well. Beans are there only to simplify standard stuff. We might get rid of them later. But now we just don't know.

Author:
semancik

Method Summary
 java.lang.String add(T newObject)
          Add new object to the repository.
 T create()
          Create an empty object.
 void delete(java.lang.String oid)
          Deletes object from the repository.
 T get(java.lang.String oid, PropertyReferenceListType resolve)
          Lookup object by OID.
 java.util.List<PropertyAvailableValues> getPropertyAvailableValues(java.lang.String oid, java.util.List<java.lang.String> properties)
          TODO
 java.util.Collection<T> list()
          List all objects.
 java.util.Collection<T> list(PagingType paging)
          List objects according to paging parameters.
 java.util.Set<PropertyChange> submit(T changedObject)
          Modify the object.
 

Method Detail

list

java.util.Collection<T> list(PagingType paging)
List objects according to paging parameters.

Returns:
all objects from the repository.

list

java.util.Collection<T> list()
List all objects.

Returns:
all objects from the repository.

get

T get(java.lang.String oid,
      PropertyReferenceListType resolve)
Lookup object by OID.

Parameters:
oid - OID of object to return
Returns:
complete object retrieved from the repository

create

T create()
Create an empty object. TODO

Returns:

add

java.lang.String add(T newObject)
Add new object to the repository. The OID property of the object may be null. In that case the OID will be generated by the repository (recommended).

Parameters:
newObject - object to add
Returns:
OID of stored object

submit

java.util.Set<PropertyChange> submit(T changedObject)
Modify the object. The method will change the object to a new state. It is not guaranteed that the object will be in the state specified by changedObject parameter when stored in the repository because many updates may be running in parallel. TODO Should not be normally used.

Parameters:
changedObject - new state of the object
Returns:
relative changes that will be applied to the object

delete

void delete(java.lang.String oid)
Deletes object from the repository.

Parameters:
oid -

getPropertyAvailableValues

java.util.List<PropertyAvailableValues> getPropertyAvailableValues(java.lang.String oid,
                                                                   java.util.List<java.lang.String> properties)
TODO

Parameters:
oid -
properties -
Returns:
Throws:
java.lang.UnsupportedOperationException - The operation is not supported for this object type


Copyright © 2011 evolveum. All Rights Reserved.