Interface IRightsEditorController

  • All Known Implementing Classes:
    RightsEditorController

    public interface IRightsEditorController
    Rights editor controller.
    • Method Detail

      • addOrEditObjectCrudRightRls

        void addOrEditObjectCrudRightRls​(org.eclipse.emf.ecore.EObject eObject,
                                         RoleDescription roleDescription,
                                         Right right,
                                         String condition,
                                         Collection<DbViewFieldDef> selectedFields,
                                         Rls editingRls)
        Adds or edits object crud right rls in performs finish wizard.
        Parameters:
        eObject - the e-object
        roleDescription - the role description
        right - the right
        condition - the condition
        selectedFields - the selected fields
        editingRls - the editing rls, may be null if new rls adds
      • changeAllObjectRights

        void changeAllObjectRights​(RightValue value)
        Change all object rights value.
        Parameters:
        value - the new value
      • changeRightsDenotationOption

        void changeRightsDenotationOption​(RightsDenotationOption rightsDenotationOption)
        Changes rights denotation option.
        Parameters:
        rightsDenotationOption - the rights denotation option, cannot be null
      • collapseAll

        void collapseAll()
        Collapses all nodes in the editor view.
      • deleteSelectedObjectCrudRightRlses

        void deleteSelectedObjectCrudRightRlses​(org.eclipse.swt.widgets.Shell shell)
        Deletes selected object CRUD right RLS'es.
        Parameters:
        shell - the shell
      • deleteSelectedObjectRights

        void deleteSelectedObjectRights​(org.eclipse.swt.widgets.Shell shell)
        Deletes selected objects and them rights from role content.
        Parameters:
        shell - the shell
      • dropSetObjectsFilter

        void dropSetObjectsFilter()
        Drops set editor view objects filter.
      • dropSearchFilter

        void dropSearchFilter​(SearchFilterWithHistory searchFilter)
        Drops the given search filter.
        Parameters:
        searchFilter - the given search filter, can not be null
      • expandAll

        void expandAll()
        Expands all nodes in the editor view.
      • getConfiguration

        Configuration getConfiguration()
        Gets editor configuration.
        Returns:
        the editor configuration
      • getConfigurationRights

        Set<Right> getConfigurationRights()
        Gets configuration rights.
        Returns:
        the rights
      • getContentProvider

        ITreeContentProvider getContentProvider()
        Gets project right supported top md-objects content provider.
        Returns:
        the contentProvider
      • getEClassRights

        Set<Right> getEClassRights​(org.eclipse.emf.ecore.EClass eClass)
        Gets e-class rights.
        Parameters:
        eClass - the e-class
        Returns:
        the rights
      • getEditorType

        RightsEditorTypes getEditorType()
        Gets editor type.
        Returns:
        the editor type
      • getFieldName

        String getFieldName​(DbViewFieldDef field)
        Gets field name.
        Parameters:
        field - the field
        Returns:
        the name
      • getFirstSelectedObjectItem

        TreeViewerItem getFirstSelectedObjectItem()
        Gets first selected top object item. If selected top object items is empty, return null
        Returns:
        the item or null
      • getItemRightRls

        List<Rls> getItemRightRls​(Right right,
                                  TreeViewerItem item)
        Gets item right rls.
        Parameters:
        right - the right
        item - the item
        Returns:
        the rls
      • getItems

        List<TreeViewerItem> getItems()
        Gets the content items.
        Returns:
        the content items, never null
      • getFilteredItems

        List<TreeViewerItem> getFilteredItems()
        Gets the filtered content items.
        Returns:
        the filtered content items, never null
      • getActualItems

        List<TreeViewerItem> getActualItems()
        Returns the actual editor visible items with the account of the actual filters.
        Returns:
        the actual editor visible items, never null
      • getModel

        org.eclipse.emf.ecore.EObject getModel()
        Gets editors model.
        Returns:
        the editors model, can't be null
      • getRightValue

        CheckState getRightValue​(TreeViewerItem item,
                                 Right right)
        Gets item right value.
        Parameters:
        item - the tree viewer item, can not be null
        right - the right the value gets for, can not be null
        Returns:
        the check state for obtained item right value, never null
      • getSelectedTopViewerItems

        List<TreeViewerItem> getSelectedTopViewerItems()
        Gets the selected top TreeViewerItem's.
        Returns:
        the selected top viewer items, never null
      • getFilters

        Set<ItemFilter> getFilters()
        Gets all item filters.
        Returns:
        the set of item filters, never null
      • goToObjectEditor

        void goToObjectEditor()
        Goes to selected object in the editor view.
      • goToRoleEditor

        void goToRoleEditor()
        Goes to selected role in the editor view.
      • init

        void init​(IBmModel bmModel,
                  IBmEditingContext editingContext,
                  org.eclipse.emf.ecore.EObject model,
                  RightsEditorTypes type)
        Initializes controller from all rights editor.
        Parameters:
        bmModel - the editor BM model, cannot be null
        editingContext - the editing context, cannot be null
        model - the editor model, cannot be null
        type - the editor type, cannot be null
      • isIndependentRightsOfChildObjects

        boolean isIndependentRightsOfChildObjects()
        Gets independent rights of child objects role flag state.
        Returns:
        true if independent.
      • isNonBmObjectsPresents

        boolean isNonBmObjectsPresents​(List<TreeViewerItem> items)
        Checks is items contains non-bm objects.
        Parameters:
        items - the items
        Returns:
        true if contains
      • isSetForAttributesByDefault

        boolean isSetForAttributesByDefault()
        Gets set for attributes by default role flag state.
        Returns:
        true if set.
      • isSetForNewObjects

        boolean isSetForNewObjects()
        Gets set for new objects role flag state.
        Returns:
        true if set.
      • isConfigurationAdopted

        boolean isConfigurationAdopted()
        Determines whether the configuration is adopted.
        Returns:
        true if the configuration is adopted and false otherwise
      • isFilterActive

        boolean isFilterActive​(ItemFilter itemFilter)
        Checks whether the given item filter active.
        Parameters:
        itemFilter - the given item filter, can not be null
        Returns:
        true if the given filter is active and false otherwise
      • onDispose

        void onDispose()
        Removes listeners and dispose model.
      • openAddObjectCrudRightRlsWizard

        void openAddObjectCrudRightRlsWizard​(org.eclipse.swt.widgets.Shell shell)
        Opens wizard to add RLS to selected object CRUD right.
        Parameters:
        shell - the shell
      • openAddObjectRightsWizard

        void openAddObjectRightsWizard​(org.eclipse.swt.widgets.Shell shell)
        Opens wizard to add object to role content and set object rights.
        Parameters:
        shell - the shell
      • openChangeRightsPropertiesDialog

        void openChangeRightsPropertiesDialog​(org.eclipse.swt.widgets.Shell shell)
        Opens change rights properties dialog.
        Parameters:
        shell - the shell
      • openEditObjectCrudRightRlsWizard

        void openEditObjectCrudRightRlsWizard​(org.eclipse.swt.widgets.Shell shell)
        Opens wizard to edit RLS to selected object CRUD right.
        Parameters:
        shell - the shell
      • openEditObjectRightsWizard

        void openEditObjectRightsWizard​(org.eclipse.swt.widgets.Shell shell)
        Opens wizard to edit role object rights.
        Parameters:
        shell - the shell
      • openSetObjectsFilterDialog

        void openSetObjectsFilterDialog​(org.eclipse.swt.widgets.Shell shell)
        Opens sets filter dialog and sets selected filter.
        Parameters:
        shell - the shell
      • setFilterByCurrentValue

        void setFilterByCurrentValue()
        Sets filter by current (selected) object values (md-object and role).
      • setSearchFilter

        void setSearchFilter​(SearchFilterWithHistory searchFilter)
        Sets the given search filter.
        Parameters:
        searchFilter - the given search filter, can not be null
      • setIndependentRightsOfChildObjects

        void setIndependentRightsOfChildObjects​(boolean newValue)
        Changes independent rights of child objects role flag.
        Parameters:
        selection -
      • setObjectsSection

        void setObjectsSection​(ObjectsSection section)
        Sets section.
        Parameters:
        section - the section
      • setRestrictionAccessSection

        void setRestrictionAccessSection​(RestrictionAccessSection section)
        Sets section.
        Parameters:
        section - the section
      • setRightValue

        void setRightValue​(RightValue newValue,
                           TreeViewerItem item,
                           Right right)
        Sets item right value.
        Parameters:
        newValue - the new value
        item - the item
        right - the right
      • setRoleDescriptionSection

        void setRoleDescriptionSection​(RoleDescriptionSection section)
        Sets section.
        Parameters:
        section - the section
      • setSetRightsForAttributesByDefault

        void setSetRightsForAttributesByDefault​(boolean newValue)
        Changes set rights for attributes by default role flag.
        Parameters:
        newValue - the new value
      • setSetRightsForNewObjects

        void setSetRightsForNewObjects​(boolean newValue)
        Changes set rights for new objects role flag.
        Parameters:
        newValue - the new value
      • validateTopItem

        void validateTopItem​(TreeViewerItem item)
        Validates the top item and sets error (warning) markers on item for displays in role content view.
        Parameters:
        item - the top tree viewer item to validate, can not be null
      • getContentService

        org.eclipse.ui.navigator.INavigatorContentService getContentService()
        Gets actual INavigatorContentService.
        Returns:
        actual INavigatorContentService for getting navigator content provider, never null
      • openSetFilterByRightsDialog

        void openSetFilterByRightsDialog​(org.eclipse.swt.widgets.Shell shell)
        Opens filter by rights setting dialog and sets the selected filter.
        Parameters:
        shell - the shell, cannot be null
      • dropSetFilterByRights

        void dropSetFilterByRights()
        Drops set editor view filter by rights.
      • getBmModel

        IBmModel getBmModel()
        Returns IBmModel which contains the editor model object.
        Returns:
        IBmModel which contains the editor model object, never null