Class 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 Detail

      • MemberOperationsHelper

        public MemberOperationsHelper()
    • 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 unassigned
        scope - What members should be processed (selected / all / all deeply), seemingly used only for task name creation
        memberType - Type of members to be processed
        memberQuery - Query selecting members that are to be processed
        relations - Relations to unassign. Not null, not empty.
      • createAndSubmitAssignMembersTask

        public static void createAndSubmitAssignMembersTask​(AbstractRoleType targetObject,
                                                            QName memberType,
                                                            ObjectQuery memberQuery,
                                                            @NotNull
                                                            @NotNull QName relation,
                                                            org.apache.wicket.ajax.AjaxRequestTarget target,
                                                            PageBase pageBase)
      • 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).