Interface B2BPermissionFacade

    • Method Detail

      • getPermissionDetails

        B2BPermissionData getPermissionDetails​(java.lang.String permissionCode)
        Returns B2BPermissionData for a given unique id.
        Parameters:
        permissionCode - the code of the permission code
        Returns:
        B2BPermissionData for the given uid.
      • updatePermissionDetails

        void updatePermissionDetails​(B2BPermissionData b2BPermissionData)
        Updates an existing B2B permission.
        Parameters:
        b2BPermissionData - B2BPermissionData holding the update information.
      • enableDisablePermission

        void enableDisablePermission​(java.lang.String permissionCode,
                                     boolean enable)
        Enable/disable a permission. active set to true denotes enabling permission and vice versa.
        Parameters:
        permissionCode - the code of the permission
        enable - true to enable the permission, false to disable it
      • addPermission

        void addPermission​(B2BPermissionData b2BPermissionData)
        Creates a new B2B permission based on the data passed in the B2BPermissionData parameter.
        Parameters:
        b2BPermissionData - B2BPermissionData object holding the data for the permission to be created.
      • getPagedPermissionsForCustomer

        SearchPageData<B2BPermissionData> getPagedPermissionsForCustomer​(PageableData pageableData,
                                                                         java.lang.String customerUid)
        Gets the list of permissions of the customers.
        Parameters:
        pageableData - PageableData object defining the paging properties
        customerUid - the uid of the customer
        Returns:
        the SearchPageData
      • addPermissionToCustomer

        B2BSelectionData addPermissionToCustomer​(java.lang.String customerUid,
                                                 java.lang.String permissionCode)
        Adds a permission to a customer.
        Parameters:
        customerUid - the uid of the customer
        permissionCode - the code of the permission
        Returns:
        the B2BSelectionData
      • removePermissionFromCustomer

        B2BSelectionData removePermissionFromCustomer​(java.lang.String customerUid,
                                                      java.lang.String permissionCode)
        Removes a permission from a customer.
        Parameters:
        customerUid - the uid of the customer
        permissionCode - the code of the permission
        Returns:
        Returns the B2BSelectionData
      • getPagedPermissionsForUserGroup

        SearchPageData<B2BPermissionData> getPagedPermissionsForUserGroup​(PageableData pageableData,
                                                                          java.lang.String userGroupUid)
        Returns a paginated list of permissions associated to a B2BUserGroupModel.
        Parameters:
        pageableData - PageableData object defining the paging properties
        userGroupUid - the uid of the user group
        Returns:
        a paginated list of permissions
      • addPermissionToUserGroup

        B2BSelectionData addPermissionToUserGroup​(java.lang.String userGroupUid,
                                                  java.lang.String permissionCode)
        Adds a permission to a B2BUserGroupModel.
        Parameters:
        userGroupUid - the uid of the user group
        permissionCode - the code of the permission
        Returns:
        a data object with information about the selected permission
      • removePermissionFromUserGroup

        B2BSelectionData removePermissionFromUserGroup​(java.lang.String userGroupUid,
                                                       java.lang.String permissionCode)
        Removes a permission from a B2BUserGroupModel.
        Parameters:
        userGroupUid - the uid of the user group
        permissionCode - the code of the permission
        Returns:
        a data object with information about the deselected permission