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

All Known Subinterfaces:
AccountManager, ResourceManager, RoleManager, SystemManager, UserManager
All Known Implementing Classes:
AccountManagerImpl, BasicObjectManagerImpl, ObjectManagerImpl, ResourceManagerImpl, RoleManagerImpl, 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

Field Summary
static java.lang.String ADD
           
static java.lang.String CLASS_NAME
           
static java.lang.String CREATE
           
static java.lang.String DELETE
           
static java.lang.String GET
           
static java.lang.String GET_PROPERTY_AVAILABLE_VALUES
           
static java.lang.String LIST
           
static java.lang.String SUBMIT
           
 
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, Task task, OperationResult parentResult)
          Modify the object.
 

Field Detail

CLASS_NAME

static final java.lang.String CLASS_NAME

LIST

static final java.lang.String LIST

GET

static final java.lang.String GET

CREATE

static final java.lang.String CREATE

ADD

static final java.lang.String ADD

SUBMIT

static final java.lang.String SUBMIT

DELETE

static final java.lang.String DELETE

GET_PROPERTY_AVAILABLE_VALUES

static final java.lang.String GET_PROPERTY_AVAILABLE_VALUES
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,
                                     Task task,
                                     OperationResult parentResult)
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 © 2012 evolveum. All Rights Reserved.