@Component public class ModelCrudService extends Object
Constructor and Description |
---|
ModelCrudService() |
Modifier and Type | Method and Description |
---|---|
<T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
addObject(PrismObject<T> object,
ModelExecuteOptions options,
Task task,
OperationResult parentResult)
Add new object.
|
boolean |
deactivateServiceThreads(long timeToWait,
OperationResult parentResult) |
<T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
deleteObject(Class<T> clazz,
String oid,
ModelExecuteOptions options,
Task task,
OperationResult parentResult)
Deletes object with specified OID.
|
PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.UserType> |
findShadowOwner(String accountOid,
Task task,
OperationResult parentResult) |
List<String> |
getAllTaskCategories() |
String |
getHandlerUriForCategory(String category) |
<T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
getObject(Class<T> clazz,
String oid,
Collection<SelectorOptions<GetOperationOptions>> options,
Task task,
OperationResult parentResult) |
boolean |
getServiceThreadsActivationState() |
PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType> |
getTaskByIdentifier(String identifier,
Collection<SelectorOptions<GetOperationOptions>> options,
OperationResult parentResult) |
void |
importFromResource(String resourceOid,
QName objectClass,
Task task,
OperationResult parentResult) |
List<PrismObject<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType>> |
listResourceObjects(String resourceOid,
QName objectClass,
ObjectPaging paging,
Task task,
OperationResult parentResult) |
<T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
modifyObject(Class<T> type,
String oid,
Collection<? extends ItemDelta> modifications,
ModelExecuteOptions options,
Task task,
OperationResult parentResult)
Modifies object using relative change description.
|
void |
notifyChange(com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceObjectShadowChangeDescriptionType changeDescription,
OperationResult parentResult,
Task task) |
void |
reactivateServiceThreads(OperationResult parentResult) |
void |
resumeTasks(Collection<String> taskOids,
OperationResult parentResult) |
void |
scheduleTasksNow(Collection<String> taskOids,
OperationResult parentResult) |
<T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
searchObjects(Class<T> type,
ObjectQuery query,
Collection<SelectorOptions<GetOperationOptions>> options,
Task task,
OperationResult parentResult) |
void |
startSchedulers(Collection<String> nodeIdentifiers,
OperationResult parentResult) |
void |
stopSchedulers(Collection<String> nodeIdentifiers,
OperationResult parentResult) |
boolean |
stopSchedulersAndTasks(Collection<String> nodeIdentifiers,
long waitTime,
OperationResult parentResult) |
void |
suspendAndDeleteTasks(Collection<String> taskOids,
long waitForStop,
boolean alsoSubtasks,
OperationResult parentResult) |
boolean |
suspendTasks(Collection<String> taskOids,
long waitForStop,
OperationResult parentResult) |
void |
synchronizeTasks(OperationResult parentResult) |
OperationResult |
testResource(String resourceOid,
Task task) |
public <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> PrismObject<T> getObject(Class<T> clazz, String oid, Collection<SelectorOptions<GetOperationOptions>> options, Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException
public <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> List<PrismObject<T>> searchObjects(Class<T> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, Task task, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException
public void notifyChange(com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceObjectShadowChangeDescriptionType changeDescription, OperationResult parentResult, Task task) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ObjectNotFoundException, GenericConnectorException, ObjectAlreadyExistsException
public <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> String addObject(PrismObject<T> object, ModelExecuteOptions options, Task task, OperationResult parentResult) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException
Add new object.
The OID provided in the input message may be empty. In that case the OID will be assigned by the implementation of this method and it will be provided as return value.
This operation should fail if such object already exists (if object with the provided OID already exists).
The operation may fail if provided OID is in an unusable format for the storage. Generating own OIDs and providing them to this method is not recommended for normal operation.
Should be atomic. Should not allow creation of two objects with the same OID (even if created in parallel).
The operation may fail if the object to be created does not conform to the underlying schema of the storage system or the schema enforced by the implementation.
object
- object to createparentResult
- parent OperationResult (in/out)ObjectAlreadyExistsException
- object with specified identifiers already exists, cannot addObjectNotFoundException
- object required to complete the operation was not found (e.g.
appropriate connector or resource definition)SchemaException
- error dealing with resource schema, e.g. created object does
not conform to schemaExpressionEvaluationException
- evaluation of expression associated with the object has failedCommunicationException
ConfigurationException
PolicyViolationException
- Policy violation was detected during processing of the objectIllegalArgumentException
- wrong OID format, etc.SystemException
- unknown error from underlying layers or other unexpected
stateSecurityViolationException
public <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> void deleteObject(Class<T> clazz, String oid, ModelExecuteOptions options, Task task, OperationResult parentResult) throws ObjectNotFoundException, ConsistencyViolationException, CommunicationException, SchemaException, ConfigurationException, PolicyViolationException, SecurityViolationException
Deletes object with specified OID.
Must fail if object with specified OID does not exists. Should be atomic.
oid
- OID of object to deleteparentResult
- parent OperationResult (in/out)ObjectNotFoundException
- specified object does not existIllegalArgumentException
- wrong OID format, described change is not applicableConsistencyViolationException
- sub-operation failed, cannot delete objects as its deletion
would lead to inconsistent stateCommunicationException
ConfigurationException
PolicyViolationException
- Policy violation was detected during processing of the objectSystemException
- unknown error from underlying layers or other unexpected
stateSchemaException
SecurityViolationException
public <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> void modifyObject(Class<T> type, String oid, Collection<? extends ItemDelta> modifications, ModelExecuteOptions options, Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, ObjectAlreadyExistsException, PolicyViolationException, SecurityViolationException
Modifies object using relative change description.
Must fail if user with provided OID does not exists. Must fail if any of the described changes cannot be applied. Should be atomic.
If two or more modify operations are executed in parallel, the operations should be merged. In case that the operations are in conflict (e.g. one operation adding a value and the other removing the same value), the result is not deterministic.
The operation may fail if the modified object does not conform to the underlying schema of the storage system or the schema enforced by the implementation.
parentResult
- parent OperationResult (in/out)ObjectNotFoundException
- specified object does not existSchemaException
- resulting object would violate the schemaExpressionEvaluationException
- evaluation of expression associated with the object has failedCommunicationException
ObjectAlreadyExistsException
- If the account or another "secondary" object already exists and cannot be createdPolicyViolationException
- Policy violation was detected during processing of the objectIllegalArgumentException
- wrong OID format, described change is not applicableSystemException
- unknown error from underlying layers or other unexpected
stateConfigurationException
SecurityViolationException
public PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.UserType> findShadowOwner(String accountOid, Task task, OperationResult parentResult) throws ObjectNotFoundException, SecurityViolationException, SchemaException, ConfigurationException
public List<PrismObject<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType>> listResourceObjects(String resourceOid, QName objectClass, ObjectPaging paging, Task task, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException
public void importFromResource(String resourceOid, QName objectClass, Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException
public OperationResult testResource(String resourceOid, Task task) throws ObjectNotFoundException
ObjectNotFoundException
public boolean suspendTasks(Collection<String> taskOids, long waitForStop, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException
public void suspendAndDeleteTasks(Collection<String> taskOids, long waitForStop, boolean alsoSubtasks, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException
public void resumeTasks(Collection<String> taskOids, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException
public void scheduleTasksNow(Collection<String> taskOids, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException
public PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType> getTaskByIdentifier(String identifier, Collection<SelectorOptions<GetOperationOptions>> options, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, SecurityViolationException, ConfigurationException
public boolean deactivateServiceThreads(long timeToWait, OperationResult parentResult) throws SchemaException, SecurityViolationException
public void reactivateServiceThreads(OperationResult parentResult) throws SchemaException, SecurityViolationException
public boolean getServiceThreadsActivationState()
public void stopSchedulers(Collection<String> nodeIdentifiers, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException
public boolean stopSchedulersAndTasks(Collection<String> nodeIdentifiers, long waitTime, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException
public void startSchedulers(Collection<String> nodeIdentifiers, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException
public void synchronizeTasks(OperationResult parentResult) throws SchemaException, SecurityViolationException
Copyright © 2016 evolveum. All rights reserved.