Class MemberOperationsHelper
- java.lang.Object
-
- com.evolveum.midpoint.gui.impl.page.admin.abstractrole.component.MemberOperationsHelper
-
public class MemberOperationsHelper extends Object
Creates and optionally submits tasks for member operations on abstract roles. Does not include pure GUI aspects.- See Also:
MemberOperationsGuiHelper
-
-
Constructor Summary
Constructors Constructor Description MemberOperationsHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
createAndSubmitAssignMembersTask(AbstractRoleType targetObject, QName memberType, ObjectQuery memberQuery, @NotNull QName relation, org.apache.wicket.ajax.AjaxRequestTarget target, PageBase pageBase)
static void
createAndSubmitDeleteMembersTask(AbstractRoleType targetObject, AbstractRoleMemberPanel.QueryScope scope, QName memberType, ObjectQuery memberQuery, org.apache.wicket.ajax.AjaxRequestTarget target, PageBase pageBase)
static void
createAndSubmitRecomputeMembersTask(AbstractRoleType targetObject, AbstractRoleMemberPanel.QueryScope scope, QName memberType, ObjectQuery memberQuery, org.apache.wicket.ajax.AjaxRequestTarget target, PageBase pageBase)
Creates and submits a task that recomputes the role members.static void
createAndSubmitUnassignMembersTask(AbstractRoleType targetObject, AbstractRoleMemberPanel.QueryScope scope, QName memberType, ObjectQuery memberQuery, Collection<QName> relations, org.apache.wicket.ajax.AjaxRequestTarget target, PageBase pageBase)
Creates and executes (i.e.static <R extends AbstractRoleType>
@NotNull ObjectQuerycreateDirectMemberQuery(R targetObject, @NotNull QName memberType, Collection<QName> relations, ObjectReferenceType tenant, ObjectReferenceType project)
Creates a query covering all direct (assigned) members of an abstract role.static Task
createRecomputeMembersTask(AbstractRoleType targetObject, AbstractRoleMemberPanel.QueryScope scope, QName memberType, ObjectQuery memberQuery, org.apache.wicket.ajax.AjaxRequestTarget target, PageBase pageBase)
Creates a task that recomputes the role members.static @NotNull List<PrismReferenceValue>
createReferenceValuesList(@NotNull AbstractRoleType targetObject, @NotNull Collection<QName> relations)
Creates reference values pointing to given target with given relations.static @NotNull List<PrismReferenceValue>
createReferenceValuesList(@NotNull ObjectReferenceType targetObjectRef, @NotNull Collection<QName> relations)
Creates reference values pointing to given target with given relations.static @NotNull ObjectQuery
createSelectedObjectsQuery(@NotNull List<? extends ObjectType> selectedObjects)
Creates a query covering all selected objects (converts list of objects to a multivalued "OID" query).static @Nullable Task
createUnassignMembersTask(AbstractRoleType targetObject, AbstractRoleMemberPanel.QueryScope scope, QName memberType, ObjectQuery memberQuery, @NotNull Collection<QName> relations, org.apache.wicket.ajax.AjaxRequestTarget target, PageBase pageBase)
Creates the member unassignment task.
-
-
-
Method Detail
-
createAndSubmitUnassignMembersTask
public static void createAndSubmitUnassignMembersTask(AbstractRoleType targetObject, AbstractRoleMemberPanel.QueryScope scope, QName memberType, ObjectQuery memberQuery, Collection<QName> relations, org.apache.wicket.ajax.AjaxRequestTarget target, PageBase pageBase)
Creates and executes (i.e. submits) member unassign task: an iterative scripting task that un-assigns members of a given abstract role- Parameters:
targetObject
- Role whose members are to be unassignedscope
- What members should be processed (selected / all / all deeply), seemingly used only for task name creationmemberType
- Type of members to be processedmemberQuery
- Query selecting members that are to be processedrelations
- Relations to unassign. Not null, not empty.
-
createUnassignMembersTask
@Nullable public static @Nullable Task createUnassignMembersTask(AbstractRoleType targetObject, AbstractRoleMemberPanel.QueryScope scope, QName memberType, ObjectQuery memberQuery, @NotNull @NotNull Collection<QName> relations, org.apache.wicket.ajax.AjaxRequestTarget target, PageBase pageBase)
Creates the member unassignment task.- Returns:
- null if there's an error; the error is shown in such a case
- See Also:
createAndSubmitUnassignMembersTask(AbstractRoleType, QueryScope, QName, ObjectQuery, Collection, AjaxRequestTarget, PageBase)
-
createAndSubmitAssignMembersTask
public static void createAndSubmitAssignMembersTask(AbstractRoleType targetObject, QName memberType, ObjectQuery memberQuery, @NotNull @NotNull QName relation, org.apache.wicket.ajax.AjaxRequestTarget target, PageBase pageBase)
-
createAndSubmitDeleteMembersTask
public static void createAndSubmitDeleteMembersTask(AbstractRoleType targetObject, AbstractRoleMemberPanel.QueryScope scope, QName memberType, ObjectQuery memberQuery, org.apache.wicket.ajax.AjaxRequestTarget target, PageBase pageBase)
-
createAndSubmitRecomputeMembersTask
public static void createAndSubmitRecomputeMembersTask(AbstractRoleType targetObject, AbstractRoleMemberPanel.QueryScope scope, QName memberType, ObjectQuery memberQuery, org.apache.wicket.ajax.AjaxRequestTarget target, PageBase pageBase)
Creates and submits a task that recomputes the role members.
-
createRecomputeMembersTask
public static Task createRecomputeMembersTask(AbstractRoleType targetObject, AbstractRoleMemberPanel.QueryScope scope, QName memberType, ObjectQuery memberQuery, org.apache.wicket.ajax.AjaxRequestTarget target, PageBase pageBase)
Creates a task that recomputes the role members.
-
createDirectMemberQuery
@NotNull public static <R extends AbstractRoleType> @NotNull ObjectQuery createDirectMemberQuery(R targetObject, @NotNull @NotNull QName memberType, Collection<QName> relations, ObjectReferenceType tenant, ObjectReferenceType project)
Creates a query covering all direct (assigned) members of an abstract role.- Parameters:
targetObject
- The role.memberType
- Type of members to be looked for.relations
- Relations (of member->target assignment) to be looked for. Should not be empty (although it is not guaranteed now).tenant
- Tenant to be looked for (assignment/tenantRef)project
- Org to be looked for (assignment/orgRef)
-
createReferenceValuesList
@NotNull public static @NotNull List<PrismReferenceValue> createReferenceValuesList(@NotNull @NotNull AbstractRoleType targetObject, @NotNull @NotNull Collection<QName> relations)
Creates reference values pointing to given target with given relations.- Parameters:
relations
- The relations. Must be at least one, otherwise the resulting list (to be used in a query, presumably) will be empty, making the query wrong.
-
createReferenceValuesList
@NotNull public static @NotNull List<PrismReferenceValue> createReferenceValuesList(@NotNull @NotNull ObjectReferenceType targetObjectRef, @NotNull @NotNull Collection<QName> relations)
Creates reference values pointing to given target with given relations.- Parameters:
relations
- The relations. Must be at least one, otherwise the resulting list (to be used in a query, presumably) will be empty, making the query wrong.
-
createSelectedObjectsQuery
@NotNull public static @NotNull ObjectQuery createSelectedObjectsQuery(@NotNull @NotNull List<? extends ObjectType> selectedObjects)
Creates a query covering all selected objects (converts list of objects to a multivalued "OID" query).
-
-