Class ModelInteractionServiceImpl
- All Implemented Interfaces:
ModelInteractionService
- Author:
- semancik
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.evolveum.midpoint.model.api.ModelInteractionService
ModelInteractionService.SearchSpec<T> -
Field Summary
Fields inherited from interface com.evolveum.midpoint.model.api.ModelInteractionService
CHECK_PASSWORD, CLASS_NAME_WITH_DOT, GET_ALLOWED_REQUEST_ASSIGNMENT_ITEMS, GET_ASSIGNABLE_ROLE_SPECIFICATION, GET_AUTHENTICATIONS_POLICY, GET_CONNECTOR_OPERATIONAL_STATUS, GET_CREDENTIALS_POLICY, GET_DEPUTY_ASSIGNEES, GET_EDIT_OBJECT_DEFINITION, GET_REGISTRATIONS_POLICY, GET_SECURITY_POLICY, GET_SECURITY_POLICY_FOR_ARCHETYPE, MERGE_OBJECTS_PREVIEW_DELTA, MERGE_OBJECTS_PREVIEW_OBJECT, OP_SUBMIT, PREVIEW_CHANGES, SUBMIT_TASK_FROM_TEMPLATE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyDefinitions(ShadowType shadow, Task task, OperationResult result) Helper method to properly apply definitions to shadow.voidapplyView(CompiledObjectCollectionView existingView, GuiObjectListViewType objectListViewType) Applying all GuiObjectListViewsType to CompiledObjectCollectionViewassignmentTypeDefinitionWithConcreteTargetRefType(PrismContainerDefinition<AssignmentType> orig, QName targetType) Returns Container Definition of Assignment Type with target type of assignment replaced by more concrete situation This allows for using more specific definition when searching for definitions for dereference, in GUI search or columns where we are sure (on other criteria) only assignment types we are processing have concrete target type.assumePowerOfAttorney(PrismObject<? extends FocusType> donor, Task task, OperationResult result) voidauthorizeBulkActionExecution(@Nullable BulkAction action, @Nullable AuthorizationPhaseType phase, @NotNull Task task, @NotNull OperationResult result) Just a convenience method that checks that relevant authorization is present.booleancheckPassword(String userOid, ProtectedStringType password, Task task, OperationResult parentResult) Checks if the supplied password matches with current user password.@NotNull CompiledObjectCollectionViewcompileObjectCollectionView(@NotNull CollectionRefSpecificationType collectionRef, @Nullable Class<? extends Containerable> targetTypeClass, @NotNull Task task, @NotNull OperationResult result) voidcompileView(CompiledObjectCollectionView existingView, GuiObjectListViewType objectListViewsType, Task task, OperationResult result) Compile object list view together with collection ref specification if presentcountObjectsFromCollection(CollectionRefSpecificationType collectionConfig, QName typeForFilter, Collection<SelectorOptions<GetOperationOptions>> defaultOptions, ObjectPaging usedPaging, VariablesMap variables, Task task, OperationResult result) @NotNull TaskTypecreateExecutionTask(@NotNull ActivityDefinitionType activityDefinition, @NotNull ActivitySubmissionOptions options, @NotNull Task task, @NotNull OperationResult result) AsModelInteractionService.submit(ActivityDefinitionType, ActivitySubmissionOptions, Task, OperationResult)but only prepares the task for execution; does not submit it.@NotNull LocalizableMessageTypecreateLocalizableMessageType(LocalizableMessageTemplateType template, VariablesMap variables, Task task, OperationResult result) <O extends AssignmentHolderType>
ArchetypePolicyTypedetermineArchetypePolicy(PrismObject<O> assignmentHolder, OperationResult result) Efficiently determines information about archetype policy applicable for a particular object.@NotNull List<ArchetypeType>determineArchetypes(@Nullable ObjectType object, OperationResult result) determineAssignmentHolderSpecification(PrismObject<O> assignmentTarget, OperationResult result) Returns data structure that contains information about possible assignment holders for a particular target object.determineAssignmentTargetSpecification(PrismObject<O> object, OperationResult result) Returns data structure that contains information about possible assignment targets for a particular holder object.@NotNull CollectionStatsdetermineCollectionStats(@NotNull CompiledObjectCollectionView collectionView, @NotNull Task task, @NotNull OperationResult result) <F extends FocusType>
NonceCredentialsPolicyTypedetermineNonceCredentialsPolicy(PrismObject<F> focus, String nonceCredentialName, Task task, OperationResult parentResult) dropPowerOfAttorney(Task task, OperationResult result) @NotNull Collection<EvaluatedPolicyRule>evaluateCollectionPolicyRules(@NotNull PrismObject<ObjectCollectionType> collection, @Nullable CompiledObjectCollectionView preCompiledView, @Nullable Class<? extends ObjectType> targetTypeClass, @NotNull Task task, @NotNull OperationResult result) Returns all policy rules that apply to the collection.executeCredentialsReset(PrismObject<UserType> user, ExecuteCredentialResetRequestType executeCredentialResetRequest, Task task, OperationResult parentResult) <X> XexecuteWithSimulationResult(@NotNull TaskExecutionMode mode, @Nullable SimulationDefinitionType simulationDefinition, @NotNull Task task, @NotNull OperationResult result, SimulationResultManager.SimulatedFunctionCall<X> functionCall) Executes the code in `functionCall` parameter (SimulationResultManager.SimulatedFunctionCall) in the simulation mode (`mode` parameter), with the provided simulation result definition.voidexpandConfigurationObject(@NotNull PrismObject<? extends ObjectType> configurationObject, @NotNull Task task, @NotNull OperationResult result) SeeProvisioningService.expandConfigurationObject(PrismObject, Task, OperationResult)for the description.<O extends ObjectType>
StringgenerateNonce(NonceCredentialsPolicyType noncePolicy, Task task, OperationResult result) <O extends ObjectType>
voidgenerateValue(PrismObject<O> object, PolicyItemsDefinitionType policyItemsDefinition, Task task, OperationResult parentResult) <O extends ObjectType>
StringgenerateValue(ValuePolicyType policy, int defaultLength, boolean generateMinimalSize, PrismObject<O> object, String shortDesc, Task task, OperationResult parentResult) TEMPORARY.<T extends ObjectType>
ObjectFiltergetAccessibleForAssignmentObjectsFilter(Class<T> searchResultType, ObjectFilter origFilter, Task task, OperationResult parentResult) Returns a filter for lookup of users which are allowed to be objects during assign operation.Collection<? extends DisplayableValue<String>>Returns a collection of all authorization actions known to the system.<O extends ObjectType,R extends AbstractRoleType>
ItemSecurityConstraintsgetAllowedRequestAssignmentItems(PrismObject<O> object, PrismObject<R> target, Task task, OperationResult result) Returns decisions for individual items for "assign" authorization.<H extends AssignmentHolderType,R extends AbstractRoleType>
RoleSelectionSpecificationgetAssignableRoleSpecification(@NotNull PrismObject<H> focus, Class<R> targetType, int assignmentOrder, Task task, OperationResult parentResult) Returns an object that defines which roles can be assigned by the currently logged-in user.getAssignmentEffectiveStatus(String lifecycleStatus, ActivationType activationType) Computes effective status for the current ActivationType in for an assignmentgetAuditConfiguration(OperationResult parentResult) getAuthenticationPolicy(PrismObject<UserType> user, Task task, OperationResult parentResult) Returns an authentications policies as defined in the system configuration security policy.getCertificationConfiguration(OperationResult parentResult) @NotNull CompiledGuiProfilegetCompiledGuiProfile(Task task, OperationResult parentResult) Returns currently applicable user profile, compiled for efficient use in the user interface.getConnectorOperationalStatus(String resourceOid, Task task, OperationResult parentResult) getCredentialsPolicy(PrismObject<? extends FocusType> focus, Task task, OperationResult parentResult) Returns a credential policy that applies to the specified user.getDeploymentInformationConfiguration(OperationResult parentResult) @NotNull List<ObjectReferenceType>getDeputyAssignees(AbstractWorkItemType workItem, Task task, OperationResult parentResult) Gets "deputy assignees" i.e.@NotNull List<ObjectReferenceType>getDeputyAssignees(ObjectReferenceType assigneeRef, OtherPrivilegesLimitations.Type limitationType, Task task, OperationResult parentResult) <T extends ObjectType>
ObjectFiltergetDonorFilter(Class<T> searchResultType, ObjectFilter origFilter, String targetAuthorizationAction, Task task, OperationResult parentResult) Returns filter for lookup of donors of power of attorney.getEditObjectClassDefinition(@NotNull PrismObject<ShadowType> shadow, @NotNull PrismObject<ResourceType> resource, AuthorizationPhaseType phase, Task task, OperationResult result) Returns an object definition that reflects edit-ability of the resource object in terms of midPoint schema limitations and security.<O extends ObjectType>
@NotNull PrismObjectDefinition<O>getEditObjectDefinition(PrismObject<O> object, AuthorizationPhaseType phase, Task task, OperationResult parentResult) Returns a schema that reflects editability of the object in terms of midPoint schema limitations and security.getEditShadowDefinition(ResourceShadowCoordinates coordinates, AuthorizationPhaseType phase, Task task, OperationResult parentResult) <O extends AssignmentHolderType>
List<ArchetypeType>getFilteredArchetypesByHolderType(PrismObject<O> object, OperationResult result) This method is used to differentiate which archetypes can be added to object with holderType type.<O extends AssignmentHolderType>
List<ArchetypeType>getFilteredArchetypesByHolderType(Class<O> objectType, OperationResult result) getFlowPolicy(PrismObject<? extends FocusType> focus, Task task, OperationResult parentResult) Returns a policy for registration, e.g.getLoggedInPrincipals(Task task, OperationResult result) getMergeConfiguration(OperationResult parentResult) <O extends ObjectType>
MetadataItemProcessingSpecgetMetadataItemProcessingSpec(ItemPath metadataItemPath, PrismObject<O> object, Task task, OperationResult result) Returns specification of processing of given metadata item (e.g.getSearchSpecificationFromCollection(CompiledObjectCollectionView compiledCollection, QName typeForFilter, Collection<SelectorOptions<GetOperationOptions>> defaultOptions, VariablesMap variables, Task task, OperationResult result) TODO document and clean up the interfacegetSecurityPolicy(@Nullable PrismObject<? extends FocusType> focus, Task task, OperationResult parentResult) Returns security policy for given focus (or global policy if the focus is not specified).getSecurityPolicy(ResourceObjectDefinition rOCDef, Task task, OperationResult parentResult) Returns resolved value policy references.getSecurityPolicyForArchetype(@Nullable String archetypeOid, @NotNull Task task, @NotNull OperationResult parentResult) Returns security policy for given archetype (or global policy if the archetype is not specified).getSystemConfiguration(OperationResult parentResult) booleanisOfArchetype(AssignmentHolderType assignmentHolderType, String archetypeOid, OperationResult result) Determines if the object is of the specified archetype considering also archetypes hierarchy.booleanisSubarchetypeOrArchetype(String archetypeOid, String parentArchetype, OperationResult result) mergeArchetypePolicies(PrismObject<ArchetypeType> archetype, OperationResult result) <O extends ObjectType>
MergeDeltas<O>mergeObjectsPreviewDeltas(Class<O> type, String leftOid, String rightOid, String mergeConfigurationName, Task task, OperationResult parentResult) <O extends ObjectType>
PrismObject<O>mergeObjectsPreviewObject(Class<O> type, String leftOid, String rightOid, String mergeConfigurationName, Task task, OperationResult parentResult) <F extends ObjectType>
@NotNull ModelContext<F>previewChanges(Collection<ObjectDelta<? extends ObjectType>> deltas, ModelExecuteOptions options, Task task, Collection<ProgressListener> listeners, OperationResult result) The "modern" implementation that uses the simulations feature.voidprocessObjectsFromCollection(CollectionRefSpecificationType collectionConfig, QName typeForFilter, Predicate<PrismContainer> handler, Collection<SelectorOptions<GetOperationOptions>> defaultOptions, VariablesMap variables, Task task, OperationResult result, boolean recordProgress) TODO documentrefDefinitionWithConcreteTargetRefType(PrismReferenceDefinition orig, QName targetType) Returns Container Definition of Assignment Type with target type of assignment replaced by more concrete situation This allows for using more specific definition when searching for definitions for dereference, in GUI search or columns where we are sure (on other criteria) only assignment types we are processing have concrete target type.voidrefreshPrincipal(String oid, Class<? extends FocusType> clazz) <T> TrunUnderPowerOfAttorney(Producer<T> producer, PrismObject<? extends FocusType> donor, Task task, OperationResult result) List<? extends Serializable>searchObjectsFromCollection(CollectionRefSpecificationType collectionConfig, QName typeForFilter, Collection<SelectorOptions<GetOperationOptions>> defaultOptions, ObjectPaging usedPaging, VariablesMap variables, Task task, OperationResult result) @NotNull Stringsubmit(@NotNull ActivityDefinitionType activityDefinition, @NotNull ActivitySubmissionOptions options, @NotNull Task task, @NotNull OperationResult parentResult) Executes specified activity.@NotNull StringsubmitTaskFromTemplate(@NotNull String templateOid, @NotNull ActivityCustomization customization, @NotNull Task task, @NotNull OperationResult parentResult) Submits a task from template (pointed to by `templateOid`).@NotNull TaskTypesubmitTaskFromTemplate(String templateTaskOid, List<Item<?, ?>> extensionItems, Task opTask, OperationResult parentResult) @NotNull TaskTypesubmitTaskFromTemplate(String templateTaskOid, Map<QName, Object> extensionValues, Task opTask, OperationResult parentResult) voidterminateSessions(TerminateSessionEvent terminateSessionEvent, Task task, OperationResult result) Terminates specified sessions (clusterwide).<F extends ObjectType>
ModelContext<F>unwrapModelContext(LensContextType wrappedContext, Task task, OperationResult result) <O extends ObjectType>
voidvalidateValue(PrismObject<O> object, PolicyItemsDefinitionType policyItemsDefinition, Task task, OperationResult parentResult) <O extends ObjectType>
List<StringLimitationResult>validateValue(ProtectedStringType protectedStringValue, ValuePolicyType valuePolicy, PrismObject<O> object, Task task, OperationResult result) @NotNull VisualizationvisualizeDelta(ObjectDelta<? extends ObjectType> delta, boolean includeOperationalItems, boolean includeOriginalObject, Task task, OperationResult result) @NotNull VisualizationvisualizeDelta(ObjectDelta<? extends ObjectType> delta, boolean includeOperationalItems, Task task, OperationResult result) @NotNull VisualizationvisualizeDelta(ObjectDelta<? extends ObjectType> delta, boolean includeOperationalItems, ObjectReferenceType objectRef, Task task, OperationResult result) @NotNull VisualizationvisualizeDelta(ObjectDelta<? extends ObjectType> delta, Task task, OperationResult result) visualizeDeltas(List<ObjectDelta<? extends ObjectType>> deltas, Task task, OperationResult result) <O extends ObjectType>
ModelContextVisualizationvisualizeModelContext(ModelContext<O> context, Task task, OperationResult result) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.model.api.ModelInteractionService
getSecurityPolicy, previewChanges, runUnderPowerOfAttorneyChecked, submitScriptingExpression
-
Constructor Details
-
ModelInteractionServiceImpl
public ModelInteractionServiceImpl()
-
-
Method Details
-
previewChanges
@NotNull public <F extends ObjectType> @NotNull ModelContext<F> previewChanges(Collection<ObjectDelta<? extends ObjectType>> deltas, ModelExecuteOptions options, Task task, Collection<ProgressListener> listeners, OperationResult result) throws SchemaException, PolicyViolationException, ExpressionEvaluationException, ObjectNotFoundException, ObjectAlreadyExistsException, CommunicationException, ConfigurationException, SecurityViolationException The "modern" implementation that uses the simulations feature. -
unwrapModelContext
public <F extends ObjectType> ModelContext<F> unwrapModelContext(LensContextType wrappedContext, Task task, OperationResult result) throws SchemaException, ConfigurationException, ObjectNotFoundException, CommunicationException, ExpressionEvaluationException - Specified by:
unwrapModelContextin interfaceModelInteractionService- Throws:
SchemaExceptionConfigurationExceptionObjectNotFoundExceptionCommunicationExceptionExpressionEvaluationException
-
getEditObjectDefinition
@NotNull public <O extends ObjectType> @NotNull PrismObjectDefinition<O> getEditObjectDefinition(PrismObject<O> object, AuthorizationPhaseType phase, Task task, OperationResult parentResult) throws SchemaException, ConfigurationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, SecurityViolationException Description copied from interface:ModelInteractionServiceReturns a schema that reflects editability of the object in terms of midPoint schema limitations and security. This method merges together all the applicable limitations that midPoint knows of (schema, security, other constraints). It may be required to pre-populate new object before calling this method, e.g. to put the object in a correct org in case that delegated administration is used.
If null is returned then the access to the entire object is denied. It cannot be created or edited at all.
The returned definition contains all parts of static schema and run-time extensions. It does not contain parts of resource "refined" schemas. Therefore for shadows it is only applicable to static parts of the shadow (not attributes).
This is not security-sensitive function. It provides data about security constraints but it does not enforce it and it does not modify anything or reveal any data. The purpose of this method is to enable convenient display of GUI form fields, e.g. to hide non-accessible fields from the form. The actual enforcement of the security is executed regardless of this method.
- Specified by:
getEditObjectDefinitionin interfaceModelInteractionService- Parameters:
object- object to edit- Returns:
- schema with correctly set constraint parts or null
- Throws:
SchemaExceptionConfigurationExceptionObjectNotFoundExceptionExpressionEvaluationExceptionCommunicationExceptionSecurityViolationException
-
getEditShadowDefinition
public PrismObjectDefinition<ShadowType> getEditShadowDefinition(ResourceShadowCoordinates coordinates, AuthorizationPhaseType phase, Task task, OperationResult parentResult) throws SchemaException, ConfigurationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, SecurityViolationException -
getEditObjectClassDefinition
public ResourceObjectDefinition getEditObjectClassDefinition(@NotNull @NotNull PrismObject<ShadowType> shadow, @NotNull @NotNull PrismObject<ResourceType> resource, AuthorizationPhaseType phase, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException, SecurityViolationException Description copied from interface:ModelInteractionServiceReturns an object definition that reflects edit-ability of the resource object in terms of midPoint schema limitations and security. I.e. just likeModelInteractionService.getEditShadowDefinition(ResourceShadowCoordinates, AuthorizationPhaseType, Task, OperationResult)but for resource objects. -
getMetadataItemProcessingSpec
public <O extends ObjectType> MetadataItemProcessingSpec getMetadataItemProcessingSpec(ItemPath metadataItemPath, PrismObject<O> object, Task task, OperationResult result) throws SchemaException, ConfigurationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, SecurityViolationException Description copied from interface:ModelInteractionServiceReturns specification of processing of given metadata item (e.g. provenance). The caller can use returned object to find out the processing of given metadata item for various data items (e.g. givenName, familyName, etc). -
getAllowedRequestAssignmentItems
public <O extends ObjectType,R extends AbstractRoleType> ItemSecurityConstraints getAllowedRequestAssignmentItems(PrismObject<O> object, PrismObject<R> target, Task task, OperationResult result) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:ModelInteractionServiceReturns decisions for individual items for "assign" authorization. This is usually applicable to assignment parameters. The decisions are evaluated using the security context of a currently logged-in user.- Specified by:
getAllowedRequestAssignmentItemsin interfaceModelInteractionService- Parameters:
object- object of the operation (user)target- target of the operation (role, org, service that is being assigned)- Throws:
SchemaExceptionSecurityViolationExceptionObjectNotFoundExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
getActionUrls
Description copied from interface:ModelInteractionServiceReturns a collection of all authorization actions known to the system. The format of returned data is designed for displaying purposes.
Note: this method returns only the list of authorization actions that are known to the IDM Model component and the components below. It does not return a GUI-specific authorization actions.
- Specified by:
getActionUrlsin interfaceModelInteractionService
-
getAssignableRoleSpecification
public <H extends AssignmentHolderType,R extends AbstractRoleType> RoleSelectionSpecification getAssignableRoleSpecification(@NotNull @NotNull PrismObject<H> focus, Class<R> targetType, int assignmentOrder, Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, ConfigurationException, ExpressionEvaluationException, CommunicationException, SecurityViolationException Description copied from interface:ModelInteractionServiceReturns an object that defines which roles can be assigned by the currently logged-in user.- Specified by:
getAssignableRoleSpecificationin interfaceModelInteractionService- Parameters:
focus- Object of the operation. The object (usually user) to whom the roles should be assigned.assignmentOrder- order=0 means assignment, order>0 means inducement- Throws:
ObjectNotFoundExceptionSchemaExceptionConfigurationExceptionExpressionEvaluationExceptionCommunicationExceptionSecurityViolationException
-
getDonorFilter
public <T extends ObjectType> ObjectFilter getDonorFilter(Class<T> searchResultType, ObjectFilter origFilter, String targetAuthorizationAction, Task task, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException, SecurityViolationException Description copied from interface:ModelInteractionServiceReturns filter for lookup of donors of power of attorney. The donors are the users that have granted the power of attorney to the currently logged-in user.TODO: authorization limitations
- Specified by:
getDonorFilterin interfaceModelInteractionService- Parameters:
searchResultType- type of the expected search resultsorigFilter- original filter (e.g. taken from GUI search bar)targetAuthorizationAction- Authorization action that the attorney is trying to execute on behalf of donor. Only donors for which the use of this authorization was not limited will be returned (that does not necessarily mean that the donor is able to execute this action, it may be limited by donor's authorizations). If the parameter is null then all donors are returned.task- taskparentResult- operation result- Returns:
- original filter with AND clause limiting the search.
- Throws:
SchemaExceptionObjectNotFoundExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationExceptionSecurityViolationException
-
getAccessibleForAssignmentObjectsFilter
public <T extends ObjectType> ObjectFilter getAccessibleForAssignmentObjectsFilter(Class<T> searchResultType, ObjectFilter origFilter, Task task, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException, SecurityViolationException Description copied from interface:ModelInteractionServiceReturns a filter for lookup of users which are allowed to be objects during assign operation. "assign" authorization can define a filter for object. This means that logged in user can request an assignment only for those user(s) which satisfies the filter.- Specified by:
getAccessibleForAssignmentObjectsFilterin interfaceModelInteractionService- Parameters:
searchResultType- type of the expected search resultsorigFilter- original filter (e.g. taken from GUI search bar)task- taskparentResult- operation result- Returns:
- original filter with AND clause limiting the search.
- Throws:
SchemaExceptionObjectNotFoundExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationExceptionSecurityViolationException
-
getAuthenticationPolicy
public AuthenticationsPolicyType getAuthenticationPolicy(PrismObject<UserType> user, Task task, OperationResult parentResult) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException Description copied from interface:ModelInteractionServiceReturns an authentications policies as defined in the system configuration security policy. This method is designed to be used during registration process or reset password process. security questions, etc).- Specified by:
getAuthenticationPolicyin interfaceModelInteractionService- Returns:
- applicable credentials policy or null
- Throws:
SchemaException- Wrong schema or content of security policyCommunicationExceptionConfigurationExceptionSecurityViolationExceptionExpressionEvaluationException
-
getFlowPolicy
public RegistrationsPolicyType getFlowPolicy(PrismObject<? extends FocusType> focus, Task task, OperationResult parentResult) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException Description copied from interface:ModelInteractionServiceReturns a policy for registration, e.g. type of the supported registrations (self, social,...)- Specified by:
getFlowPolicyin interfaceModelInteractionService- Parameters:
focus- focus for who the policy should apply- Returns:
- applicable credentials policy or null
- Throws:
SchemaException- Wrong schema or content of security policyCommunicationExceptionConfigurationExceptionSecurityViolationExceptionExpressionEvaluationException
-
getCredentialsPolicy
public CredentialsPolicyType getCredentialsPolicy(PrismObject<? extends FocusType> focus, Task task, OperationResult parentResult) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException Description copied from interface:ModelInteractionServiceReturns a credential policy that applies to the specified user. This method is designed to be used during credential reset so the GUI has enough information to set up the credential (e.g. password policies, security questions, etc).- Specified by:
getCredentialsPolicyin interfaceModelInteractionService- Parameters:
focus- focus for who the policy should apply- Returns:
- applicable credentials policy or null
- Throws:
SchemaException- Wrong schema or content of security policyCommunicationExceptionConfigurationExceptionSecurityViolationExceptionExpressionEvaluationException
-
determineNonceCredentialsPolicy
public <F extends FocusType> NonceCredentialsPolicyType determineNonceCredentialsPolicy(PrismObject<F> focus, String nonceCredentialName, Task task, OperationResult parentResult) throws SchemaException, ExpressionEvaluationException, CommunicationException, SecurityViolationException, ConfigurationException -
getSecurityPolicy
public SecurityPolicyType getSecurityPolicy(@Nullable @Nullable PrismObject<? extends FocusType> focus, Task task, OperationResult parentResult) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException Description copied from interface:ModelInteractionServiceReturns security policy for given focus (or global policy if the focus is not specified).- Specified by:
getSecurityPolicyin interfaceModelInteractionService- Throws:
SchemaExceptionCommunicationExceptionConfigurationExceptionSecurityViolationExceptionExpressionEvaluationException
-
getSecurityPolicyForArchetype
public SecurityPolicyType getSecurityPolicyForArchetype(@Nullable @Nullable String archetypeOid, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult parentResult) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException Description copied from interface:ModelInteractionServiceReturns security policy for given archetype (or global policy if the archetype is not specified). -
getSecurityPolicy
public SecurityPolicyType getSecurityPolicy(ResourceObjectDefinition rOCDef, Task task, OperationResult parentResult) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException, ObjectNotFoundException Description copied from interface:ModelInteractionServiceReturns resolved value policy references. -
getCompiledGuiProfile
@NotNull public @NotNull CompiledGuiProfile getCompiledGuiProfile(Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException Description copied from interface:ModelInteractionServiceReturns currently applicable user profile, compiled for efficient use in the user interface. Use profile contains configuration, customization and user preferences for the user interface. Note: This operation bypasses the authorizations. It will always return the value regardless whether the current user is authorized to read the underlying objects or not. However, it will always return only values applicable for current user, therefore the authorization might be considered to be implicit in this case. -
getLoggedInPrincipals
- Specified by:
getLoggedInPrincipalsin interfaceModelInteractionService- Returns:
- list of logged in users with at least 1 active session (clusterwide)
-
terminateSessions
public void terminateSessions(TerminateSessionEvent terminateSessionEvent, Task task, OperationResult result) Description copied from interface:ModelInteractionServiceTerminates specified sessions (clusterwide).- Specified by:
terminateSessionsin interfaceModelInteractionService
-
getSystemConfiguration
public SystemConfigurationType getSystemConfiguration(OperationResult parentResult) throws SchemaException - Specified by:
getSystemConfigurationin interfaceModelInteractionService- Throws:
SchemaException
-
getDeploymentInformationConfiguration
public DeploymentInformationType getDeploymentInformationConfiguration(OperationResult parentResult) throws SchemaException - Specified by:
getDeploymentInformationConfigurationin interfaceModelInteractionService- Throws:
SchemaException
-
getAuditConfiguration
public SystemConfigurationAuditType getAuditConfiguration(OperationResult parentResult) throws SchemaException - Specified by:
getAuditConfigurationin interfaceModelInteractionService- Throws:
SchemaException
-
getMergeConfiguration
public List<MergeConfigurationType> getMergeConfiguration(OperationResult parentResult) throws SchemaException - Specified by:
getMergeConfigurationin interfaceModelInteractionService- Throws:
SchemaException
-
getCertificationConfiguration
public AccessCertificationConfigurationType getCertificationConfiguration(OperationResult parentResult) throws SchemaException - Specified by:
getCertificationConfigurationin interfaceModelInteractionService- Throws:
SchemaException
-
checkPassword
public boolean checkPassword(String userOid, ProtectedStringType password, Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException Description copied from interface:ModelInteractionServiceChecks if the supplied password matches with current user password. This method is NOT subject to any password expiration policies, it does not update failed login counters, it does not change any data or meta-data. This method is NOT SUPPOSED to be used to validate password on login. This method is supposed to check old password when the password is changed by the user. We assume that the user already passed normal system authentication.Note: no authorizations are checked in the implementation. It is assumed that authorizations will be enforced at the page level.
- Specified by:
checkPasswordin interfaceModelInteractionService- Returns:
- true if the password matches, false otherwise
- Throws:
ObjectNotFoundExceptionSchemaException
-
visualizeDeltas
public List<Visualization> visualizeDeltas(List<ObjectDelta<? extends ObjectType>> deltas, Task task, OperationResult result) throws SchemaException, ExpressionEvaluationException - Specified by:
visualizeDeltasin interfaceModelInteractionService- Throws:
SchemaExceptionExpressionEvaluationException
-
visualizeModelContext
public <O extends ObjectType> ModelContextVisualization visualizeModelContext(ModelContext<O> context, Task task, OperationResult result) throws SchemaException, ExpressionEvaluationException, ConfigurationException - Specified by:
visualizeModelContextin interfaceModelInteractionService- Throws:
SchemaExceptionExpressionEvaluationExceptionConfigurationException
-
visualizeDelta
@NotNull public @NotNull Visualization visualizeDelta(ObjectDelta<? extends ObjectType> delta, Task task, OperationResult result) throws SchemaException, ExpressionEvaluationException - Specified by:
visualizeDeltain interfaceModelInteractionService- Throws:
SchemaExceptionExpressionEvaluationException
-
visualizeDelta
@NotNull public @NotNull Visualization visualizeDelta(ObjectDelta<? extends ObjectType> delta, boolean includeOperationalItems, Task task, OperationResult result) throws SchemaException, ExpressionEvaluationException - Specified by:
visualizeDeltain interfaceModelInteractionService- Throws:
SchemaExceptionExpressionEvaluationException
-
visualizeDelta
@NotNull public @NotNull Visualization visualizeDelta(ObjectDelta<? extends ObjectType> delta, boolean includeOperationalItems, boolean includeOriginalObject, Task task, OperationResult result) throws SchemaException, ExpressionEvaluationException - Specified by:
visualizeDeltain interfaceModelInteractionService- Throws:
SchemaExceptionExpressionEvaluationException
-
visualizeDelta
@NotNull public @NotNull Visualization visualizeDelta(ObjectDelta<? extends ObjectType> delta, boolean includeOperationalItems, ObjectReferenceType objectRef, Task task, OperationResult result) throws SchemaException, ExpressionEvaluationException - Specified by:
visualizeDeltain interfaceModelInteractionService- Throws:
SchemaExceptionExpressionEvaluationException
-
getConnectorOperationalStatus
public List<ConnectorOperationalStatus> getConnectorOperationalStatus(String resourceOid, Task task, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, ExpressionEvaluationException - Specified by:
getConnectorOperationalStatusin interfaceModelInteractionService- Throws:
SchemaExceptionObjectNotFoundExceptionCommunicationExceptionConfigurationExceptionExpressionEvaluationException
-
mergeObjectsPreviewDeltas
public <O extends ObjectType> MergeDeltas<O> mergeObjectsPreviewDeltas(Class<O> type, String leftOid, String rightOid, String mergeConfigurationName, Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, ConfigurationException, ExpressionEvaluationException, CommunicationException, SecurityViolationException -
mergeObjectsPreviewObject
public <O extends ObjectType> PrismObject<O> mergeObjectsPreviewObject(Class<O> type, String leftOid, String rightOid, String mergeConfigurationName, Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, ConfigurationException, ExpressionEvaluationException, CommunicationException, SecurityViolationException -
generateNonce
public <O extends ObjectType> String generateNonce(NonceCredentialsPolicyType noncePolicy, Task task, OperationResult result) throws ExpressionEvaluationException, SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException -
generateValue
public <O extends ObjectType> String generateValue(ValuePolicyType policy, int defaultLength, boolean generateMinimalSize, PrismObject<O> object, String shortDesc, Task task, OperationResult parentResult) throws ExpressionEvaluationException, SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException Description copied from interface:ModelInteractionServiceTEMPORARY. Need to find out better way how to deal with generated values- Specified by:
generateValuein interfaceModelInteractionServiceobject- object for which we generate the value (e.g. user or shadow)- Returns:
- Throws:
ExpressionEvaluationExceptionSchemaExceptionObjectNotFoundExceptionCommunicationExceptionConfigurationExceptionSecurityViolationException
-
generateValue
public <O extends ObjectType> void generateValue(PrismObject<O> object, PolicyItemsDefinitionType policyItemsDefinition, Task task, OperationResult parentResult) throws ObjectAlreadyExistsException, ExpressionEvaluationException, SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, PolicyViolationException -
validateValue
public <O extends ObjectType> void validateValue(PrismObject<O> object, PolicyItemsDefinitionType policyItemsDefinition, Task task, OperationResult parentResult) throws ExpressionEvaluationException, SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, PolicyViolationException -
getDeputyAssignees
@NotNull public @NotNull List<ObjectReferenceType> getDeputyAssignees(AbstractWorkItemType workItem, Task task, OperationResult parentResult) throws SchemaException Description copied from interface:ModelInteractionServiceGets "deputy assignees" i.e. users that are deputies of assignees. Takes limitations into account.MAY NOT CHECK AUTHORIZATIONS (uses repository directly, at least at some places) - TODO TODO parameterize on limitation kind
- Specified by:
getDeputyAssigneesin interfaceModelInteractionService- Throws:
SchemaException
-
getDeputyAssignees
@NotNull public @NotNull List<ObjectReferenceType> getDeputyAssignees(ObjectReferenceType assigneeRef, OtherPrivilegesLimitations.Type limitationType, Task task, OperationResult parentResult) throws SchemaException - Specified by:
getDeputyAssigneesin interfaceModelInteractionService- Throws:
SchemaException
-
getAssignmentEffectiveStatus
public ActivationStatusType getAssignmentEffectiveStatus(String lifecycleStatus, ActivationType activationType) Description copied from interface:ModelInteractionServiceComputes effective status for the current ActivationType in for an assignment- Specified by:
getAssignmentEffectiveStatusin interfaceModelInteractionService
-
assumePowerOfAttorney
public MidPointPrincipal assumePowerOfAttorney(PrismObject<? extends FocusType> donor, Task task, OperationResult result) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException -
dropPowerOfAttorney
public MidPointPrincipal dropPowerOfAttorney(Task task, OperationResult result) throws SecurityViolationException - Specified by:
dropPowerOfAttorneyin interfaceModelInteractionService- Throws:
SecurityViolationException
-
runUnderPowerOfAttorney
public <T> T runUnderPowerOfAttorney(Producer<T> producer, PrismObject<? extends FocusType> donor, Task task, OperationResult result) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException -
createLocalizableMessageType
@NotNull public @NotNull LocalizableMessageType createLocalizableMessageType(LocalizableMessageTemplateType template, VariablesMap variables, Task task, OperationResult result) throws ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, SecurityViolationException -
executeCredentialsReset
public ExecuteCredentialResetResponseType executeCredentialsReset(PrismObject<UserType> user, ExecuteCredentialResetRequestType executeCredentialResetRequest, Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException, ObjectAlreadyExistsException, PolicyViolationException -
refreshPrincipal
public void refreshPrincipal(String oid, Class<? extends FocusType> clazz) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException -
getRelationDefinitions
- Specified by:
getRelationDefinitionsin interfaceModelInteractionService
-
submitTaskFromTemplate
@NotNull public @NotNull TaskType submitTaskFromTemplate(String templateTaskOid, List<Item<?, ?>> extensionItems, Task opTask, OperationResult parentResult) throws CommunicationException, ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, ExpressionEvaluationException, ObjectAlreadyExistsException, PolicyViolationExceptionDescription copied from interface:ModelInteractionService -
submitTaskFromTemplate
@NotNull public @NotNull TaskType submitTaskFromTemplate(String templateTaskOid, Map<QName, Object> extensionValues, Task opTask, OperationResult parentResult) throws CommunicationException, ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, ExpressionEvaluationException, ObjectAlreadyExistsException, PolicyViolationExceptionDescription copied from interface:ModelInteractionService -
submitTaskFromTemplate
@NotNull public @NotNull String submitTaskFromTemplate(@NotNull @NotNull String templateOid, @NotNull @NotNull ActivityCustomization customization, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult parentResult) throws CommonException Description copied from interface:ModelInteractionServiceSubmits a task from template (pointed to by `templateOid`). SeeMidpointFunctions.submitTaskFromTemplate(String, ActivityCustomization)for details.- Specified by:
submitTaskFromTemplatein interfaceModelInteractionService- Throws:
CommonException
-
determineArchetypePolicy
public <O extends AssignmentHolderType> ArchetypePolicyType determineArchetypePolicy(PrismObject<O> assignmentHolder, OperationResult result) throws SchemaException, ConfigurationException Description copied from interface:ModelInteractionServiceEfficiently determines information about archetype policy applicable for a particular object. Returns null if no archetype policy is applicable. This is a "one stop" method for archetype policy in the GUI. The method returns archetype policy even for "legacy" situations, e.g. if the policy needs to be determined from system configuration using legacy subtype. GUI should not need to to any other processing to determine archetype information.This method is invoked very often, usually when any object is displayed (including display of object lists and search results). Therefore this method is supposed to be very efficient. It should be using caching as much as possible.
- Specified by:
determineArchetypePolicyin interfaceModelInteractionService- Throws:
SchemaExceptionConfigurationException
-
mergeArchetypePolicies
public ArchetypePolicyType mergeArchetypePolicies(PrismObject<ArchetypeType> archetype, OperationResult result) throws SchemaException, ConfigurationException - Specified by:
mergeArchetypePoliciesin interfaceModelInteractionService- Throws:
SchemaExceptionConfigurationException
-
determineAssignmentTargetSpecification
public <O extends AssignmentHolderType> AssignmentCandidatesSpecification determineAssignmentTargetSpecification(PrismObject<O> object, OperationResult result) throws SchemaException Description copied from interface:ModelInteractionServiceReturns data structure that contains information about possible assignment targets for a particular holder object.This method should be used when editing assignment holder (e.g. user) and looking for available assignment target. The determineAssignmentHolderSpecification is a "reverse" version of this method.
This method is not used that often. It is used when an object is edited. But it should be quite efficient anyway. It should use cached archetype information.
- Specified by:
determineAssignmentTargetSpecificationin interfaceModelInteractionService- Throws:
SchemaException
-
getFilteredArchetypesByHolderType
public <O extends AssignmentHolderType> List<ArchetypeType> getFilteredArchetypesByHolderType(Class<O> objectType, OperationResult result) throws SchemaException - Specified by:
getFilteredArchetypesByHolderTypein interfaceModelInteractionService- Throws:
SchemaException
-
getFilteredArchetypesByHolderType
public <O extends AssignmentHolderType> List<ArchetypeType> getFilteredArchetypesByHolderType(PrismObject<O> object, OperationResult result) throws SchemaException Description copied from interface:ModelInteractionServiceThis method is used to differentiate which archetypes can be added to object with holderType type. e.g. when changing archetype within Change archetype functionality should provide only those archetypes which can be assigned according to holderType.- Specified by:
getFilteredArchetypesByHolderTypein interfaceModelInteractionService- Throws:
SchemaException
-
determineAssignmentHolderSpecification
public <O extends AbstractRoleType> AssignmentCandidatesSpecification determineAssignmentHolderSpecification(PrismObject<O> assignmentTarget, OperationResult result) throws SchemaException Description copied from interface:ModelInteractionServiceReturns data structure that contains information about possible assignment holders for a particular target object.This method should be used when editing assignment target (role, org, service) and looking for object that can be potential members. The determineAssignmentTargetSpecification is a "reverse" version of this method.
This method is not used that often. It is used when an object is edited. But it should be quite efficient anyway. It should use cached archetype information.
- Specified by:
determineAssignmentHolderSpecificationin interfaceModelInteractionService- Throws:
SchemaException
-
evaluateCollectionPolicyRules
@Experimental @NotNull public @NotNull Collection<EvaluatedPolicyRule> evaluateCollectionPolicyRules(@NotNull @NotNull PrismObject<ObjectCollectionType> collection, @Nullable @Nullable CompiledObjectCollectionView preCompiledView, @Nullable @Nullable Class<? extends ObjectType> targetTypeClass, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) throws ObjectNotFoundException, SchemaException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException Description copied from interface:ModelInteractionServiceReturns all policy rules that apply to the collection. Later, the policy rules are compiled from all the applicable sources (target, meta-roles, etc.). But for now we support only policy rules that are directly placed in collection assignments. EXPERIMENTAL. Quite likely to change later. [EP:APSO] DONE We assume that the collection is provided from the repository! Verified with the caller. -
compileObjectCollectionView
@Experimental @NotNull public @NotNull CompiledObjectCollectionView compileObjectCollectionView(@NotNull @NotNull CollectionRefSpecificationType collectionRef, @Nullable @Nullable Class<? extends Containerable> targetTypeClass, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException, ObjectNotFoundException -
determineCollectionStats
@Experimental @NotNull public @NotNull CollectionStats determineCollectionStats(@NotNull @NotNull CompiledObjectCollectionView collectionView, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) throws SchemaException, ObjectNotFoundException, SecurityViolationException, ConfigurationException, CommunicationException, ExpressionEvaluationException -
applyView
public void applyView(CompiledObjectCollectionView existingView, GuiObjectListViewType objectListViewType) Description copied from interface:ModelInteractionServiceApplying all GuiObjectListViewsType to CompiledObjectCollectionView- Specified by:
applyViewin interfaceModelInteractionService
-
compileView
public void compileView(CompiledObjectCollectionView existingView, GuiObjectListViewType objectListViewsType, Task task, OperationResult result) throws SchemaException, ExpressionEvaluationException, CommunicationException, SecurityViolationException, ConfigurationException, ObjectNotFoundException Description copied from interface:ModelInteractionServiceCompile object list view together with collection ref specification if present -
validateValue
public <O extends ObjectType> List<StringLimitationResult> validateValue(ProtectedStringType protectedStringValue, ValuePolicyType valuePolicy, PrismObject<O> object, Task task, OperationResult result) throws SchemaException, PolicyViolationException, ObjectNotFoundException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException -
processObjectsFromCollection
public void processObjectsFromCollection(CollectionRefSpecificationType collectionConfig, QName typeForFilter, Predicate<PrismContainer> handler, Collection<SelectorOptions<GetOperationOptions>> defaultOptions, VariablesMap variables, Task task, OperationResult result, boolean recordProgress) throws SchemaException, ObjectNotFoundException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException Description copied from interface:ModelInteractionServiceTODO document -
getSearchSpecificationFromCollection
public <T> ModelInteractionService.SearchSpec<T> getSearchSpecificationFromCollection(CompiledObjectCollectionView compiledCollection, QName typeForFilter, Collection<SelectorOptions<GetOperationOptions>> defaultOptions, VariablesMap variables, Task task, OperationResult result) throws ConfigurationException, SchemaException, ExpressionEvaluationException, CommunicationException, SecurityViolationException, ObjectNotFoundException Description copied from interface:ModelInteractionServiceTODO document and clean up the interface -
searchObjectsFromCollection
public List<? extends Serializable> searchObjectsFromCollection(CollectionRefSpecificationType collectionConfig, QName typeForFilter, Collection<SelectorOptions<GetOperationOptions>> defaultOptions, ObjectPaging usedPaging, VariablesMap variables, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException -
countObjectsFromCollection
public Integer countObjectsFromCollection(CollectionRefSpecificationType collectionConfig, QName typeForFilter, Collection<SelectorOptions<GetOperationOptions>> defaultOptions, ObjectPaging usedPaging, VariablesMap variables, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException -
expandConfigurationObject
public void expandConfigurationObject(@NotNull @NotNull PrismObject<? extends ObjectType> configurationObject, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) throws SchemaException, ConfigurationException, ObjectNotFoundException Description copied from interface:ModelInteractionServiceSeeProvisioningService.expandConfigurationObject(PrismObject, Task, OperationResult)for the description. TODO security aspects- Specified by:
expandConfigurationObjectin interfaceModelInteractionService- Throws:
SchemaExceptionConfigurationExceptionObjectNotFoundException
-
submit
@NotNull public @NotNull String submit(@NotNull @NotNull ActivityDefinitionType activityDefinition, @NotNull @NotNull ActivitySubmissionOptions options, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult parentResult) throws CommonException Description copied from interface:ModelInteractionServiceExecutes specified activity. Currently hard-wired to do that on background, i.e. by wrapping it into a task, and creating the task via the clockwork. (So that mappings from e.g. archetypes are executed.) Does _not_ require any special authorizations to submit the task. (The submit operation executes with elevated privileges.) The planned future state is that GUI declares the work that should be done (like "recompute members of role X") and the model will then decide the optimal way of doing that (e.g., on foreground or on background) and executes the action. When determining the way it needs to consider user preferences and/or authorizations, or the situation, like how many members are there. The goal is to better isolate GUI from the rest of midPoint, and to provide means for 3rd party GUI implementations. The current method should be seen as a (very rough) placeholder. Task archetype(s) are determined from the work, from the task template or from explicit options. Returns the background task OID. It is also set in the operation result.- Specified by:
submitin interfaceModelInteractionService- Throws:
CommonException
-
createExecutionTask
@NotNull public @NotNull TaskType createExecutionTask(@NotNull @NotNull ActivityDefinitionType activityDefinition, @NotNull @NotNull ActivitySubmissionOptions options, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) throws CommonException Description copied from interface:ModelInteractionServiceAsModelInteractionService.submit(ActivityDefinitionType, ActivitySubmissionOptions, Task, OperationResult)but only prepares the task for execution; does not submit it.- Specified by:
createExecutionTaskin interfaceModelInteractionService- Throws:
CommonException
-
assignmentTypeDefinitionWithConcreteTargetRefType
public PrismContainerDefinition<AssignmentType> assignmentTypeDefinitionWithConcreteTargetRefType(PrismContainerDefinition<AssignmentType> orig, QName targetType) Description copied from interface:ModelInteractionServiceReturns Container Definition of Assignment Type with target type of assignment replaced by more concrete situation This allows for using more specific definition when searching for definitions for dereference, in GUI search or columns where we are sure (on other criteria) only assignment types we are processing have concrete target type.- Specified by:
assignmentTypeDefinitionWithConcreteTargetRefTypein interfaceModelInteractionService- Parameters:
orig- Original definition of Assignment TypetargetType- Concrete target type
-
refDefinitionWithConcreteTargetRefType
public PrismReferenceDefinition refDefinitionWithConcreteTargetRefType(PrismReferenceDefinition orig, QName targetType) Description copied from interface:ModelInteractionServiceReturns Container Definition of Assignment Type with target type of assignment replaced by more concrete situation This allows for using more specific definition when searching for definitions for dereference, in GUI search or columns where we are sure (on other criteria) only assignment types we are processing have concrete target type.- Specified by:
refDefinitionWithConcreteTargetRefTypein interfaceModelInteractionService- Parameters:
orig- Original definition of Assignment TypetargetType- Concrete target type
-
executeWithSimulationResult
public <X> X executeWithSimulationResult(@NotNull @NotNull TaskExecutionMode mode, @Nullable @Nullable SimulationDefinitionType simulationDefinition, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result, @NotNull SimulationResultManager.SimulatedFunctionCall<X> functionCall) throws CommonException Description copied from interface:ModelInteractionServiceExecutes the code in `functionCall` parameter (SimulationResultManager.SimulatedFunctionCall) in the simulation mode (`mode` parameter), with the provided simulation result definition. The task must not be persistent. (This limitation can be lifted in the future, if needed.) Requires the native repository.- Specified by:
executeWithSimulationResultin interfaceModelInteractionService- Throws:
CommonException
-
authorizeBulkActionExecution
public void authorizeBulkActionExecution(@Nullable @Nullable BulkAction action, @Nullable @Nullable AuthorizationPhaseType phase, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) throws SchemaException, ExpressionEvaluationException, SecurityViolationException, CommunicationException, ConfigurationException, ObjectNotFoundException Description copied from interface:ModelInteractionServiceJust a convenience method that checks that relevant authorization is present. (No action means the authorization for all actions is checked.) -
applyDefinitions
public void applyDefinitions(ShadowType shadow, Task task, OperationResult result) throws SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, ObjectNotFoundException Description copied from interface:ModelInteractionServiceHelper method to properly apply definitions to shadow. It is only needed when raw option is used for shadow search. Not sure about correctness of the method place and if even should be needed.- Specified by:
applyDefinitionsin interfaceModelInteractionService- Throws:
SchemaExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationExceptionObjectNotFoundException
-
isOfArchetype
public boolean isOfArchetype(AssignmentHolderType assignmentHolderType, String archetypeOid, OperationResult result) throws SchemaException, ConfigurationException Description copied from interface:ModelInteractionServiceDetermines if the object is of the specified archetype considering also archetypes hierarchy. In other works, looks recursively at superArchetypeRef is there is a match with specified archetype Later, this should be the functionality directly supported in DB (and midPoint query language)- Specified by:
isOfArchetypein interfaceModelInteractionService- Throws:
SchemaExceptionConfigurationException
-
isSubarchetypeOrArchetype
public boolean isSubarchetypeOrArchetype(String archetypeOid, String parentArchetype, OperationResult result) - Specified by:
isSubarchetypeOrArchetypein interfaceModelInteractionService
-
determineArchetypes
@NotNull public @NotNull List<ArchetypeType> determineArchetypes(@Nullable @Nullable ObjectType object, OperationResult result) throws SchemaException - Specified by:
determineArchetypesin interfaceModelInteractionService- Throws:
SchemaException
-