Interface IRightsEditorController
-
- All Known Implementing Classes:
RightsEditorController
public interface IRightsEditorController
Rights editor controller.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.void
changeAllObjectRights(RightValue value)
Change all object rights value.void
changeRightsDenotationOption(RightsDenotationOption rightsDenotationOption)
Changes rights denotation option.void
collapseAll()
Collapses all nodes in the editor view.void
deleteSelectedObjectCrudRightRlses(org.eclipse.swt.widgets.Shell shell)
Deletes selected object CRUD right RLS'es.void
deleteSelectedObjectRights(org.eclipse.swt.widgets.Shell shell)
Deletes selected objects and them rights from role content.void
dropSearchFilter(SearchFilterWithHistory searchFilter)
Drops the given search filter.void
dropSetFilterByRights()
Drops set editor view filter by rights.void
dropSetObjectsFilter()
Drops set editor view objects filter.void
expandAll()
Expands all nodes in the editor view.List<TreeViewerItem>
getActualItems()
Returns the actual editor visible items with the account of the actual filters.IBmModel
getBmModel()
ReturnsIBmModel
which contains the editor model object.Configuration
getConfiguration()
Gets editor configuration.Set<Right>
getConfigurationRights()
Gets configuration rights.List<Right>
getContainedEClassesRights(Collection<TreeViewerItem> items)
Gets contained objects 'es rights of the given collection ofTreeViewerItem
's.ITreeContentProvider
getContentProvider()
Gets project right supported top md-objects content provider.org.eclipse.ui.navigator.INavigatorContentService
getContentService()
Gets actualINavigatorContentService
.Set<Right>
getEClassRights(org.eclipse.emf.ecore.EClass eClass)
Gets e-class rights.RightsEditorTypes
getEditorType()
Gets editor type.String
getFieldName(DbViewFieldDef field)
Gets field name.List<TreeViewerItem>
getFilteredItems()
Gets the filtered content items.Set<ItemFilter>
getFilters()
Gets all item filters.TreeViewerItem
getFirstSelectedObjectItem()
Gets first selected top object item.List<TreeViewerItem>
getItemChildren(TreeViewerItem item)
Gets item children.List<Rls>
getItemRightRls(Right right, TreeViewerItem item)
Gets item right rls.List<TreeViewerItem>
getItems()
Gets the content items.org.eclipse.emf.ecore.EObject
getModel()
Gets editors model.CheckState
getRightValue(TreeViewerItem item, Right right)
Gets item right value.List<TreeViewerItem>
getSelectedTopViewerItems()
Gets the selected topTreeViewerItem
's.List<TreeViewerItem>
getSelectedViewerItems()
Gets the selectedTreeViewerItem
's.void
goToObjectEditor()
Goes to selected object in the editor view.void
goToRoleEditor()
Goes to selected role in the editor view.void
init(IBmModel bmModel, IBmEditingContext editingContext, org.eclipse.emf.ecore.EObject model, RightsEditorTypes type)
Initializes controller from all rights editor.boolean
isConfigurationAdopted()
Determines whether the configuration is adopted.boolean
isFilterActive(ItemFilter itemFilter)
Checks whether the given item filter active.boolean
isIndependentRightsOfChildObjects()
Gets independent rights of child objects role flag state.boolean
isNonBmObjectsPresents(List<TreeViewerItem> items)
Checks is items contains non-bm objects.boolean
isSetForAttributesByDefault()
Gets set for attributes by default role flag state.boolean
isSetForNewObjects()
Gets set for new objects role flag state.void
onDispose()
Removes listeners and dispose model.void
openAddObjectCrudRightRlsWizard(org.eclipse.swt.widgets.Shell shell)
Opens wizard to add RLS to selected object CRUD right.void
openAddObjectRightsWizard(org.eclipse.swt.widgets.Shell shell)
Opens wizard to add object to role content and set object rights.void
openChangeRightsPropertiesDialog(org.eclipse.swt.widgets.Shell shell)
Opens change rights properties dialog.void
openEditObjectCrudRightRlsWizard(org.eclipse.swt.widgets.Shell shell)
Opens wizard to edit RLS to selected object CRUD right.void
openEditObjectRightsWizard(org.eclipse.swt.widgets.Shell shell)
Opens wizard to edit role object rights.void
openSetFilterByRightsDialog(org.eclipse.swt.widgets.Shell shell)
Opens filter by rights setting dialog and sets the selected filter.void
openSetObjectsFilterDialog(org.eclipse.swt.widgets.Shell shell)
Opens sets filter dialog and sets selected filter.void
setFilterByCurrentValue()
Sets filter by current (selected) object values (md-object and role).void
setIndependentRightsOfChildObjects(boolean newValue)
Changes independent rights of child objects role flag.void
setObjectsSection(ObjectsSection section)
Sets section.void
setRestrictionAccessSection(RestrictionAccessSection section)
Sets section.void
setRightValue(RightValue newValue, TreeViewerItem item, Right right)
Sets item right value.void
setRoleDescriptionSection(RoleDescriptionSection section)
Sets section.void
setSearchFilter(SearchFilterWithHistory searchFilter)
Sets the given search filter.void
setSetRightsForAttributesByDefault(boolean newValue)
Changes set rights for attributes by default role flag.void
setSetRightsForNewObjects(boolean newValue)
Changes set rights for new objects role flag.void
validateTopItem(TreeViewerItem item)
Validates the top item and sets error (warning) markers on item for displays in role content view.
-
-
-
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-objectroleDescription
- the role descriptionright
- the rightcondition
- the conditionselectedFields
- the selected fieldseditingRls
- the editing rls, may benull
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 benull
-
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 benull
-
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
-
getContainedEClassesRights
List<Right> getContainedEClassesRights(Collection<TreeViewerItem> items)
Gets contained objects 'es rights of the given collection ofTreeViewerItem
's.- Parameters:
items
- the given collection ofTreeViewerItem
's, can not benull
- Returns:
- the rights, never
null
-
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, returnnull
- Returns:
- the item or
null
-
getItemChildren
List<TreeViewerItem> getItemChildren(TreeViewerItem item)
Gets item children.- Parameters:
item
- the item- Returns:
- the child items
-
getItemRightRls
List<Rls> getItemRightRls(Right right, TreeViewerItem item)
Gets item right rls.- Parameters:
right
- the rightitem
- 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 benull
right
- the right the value gets for, can not benull
- Returns:
- the check state for obtained item right value, never
null
-
getSelectedTopViewerItems
List<TreeViewerItem> getSelectedTopViewerItems()
Gets the selected topTreeViewerItem
's.- Returns:
- the selected top viewer items, never
null
-
getSelectedViewerItems
List<TreeViewerItem> getSelectedViewerItems()
Gets the selectedTreeViewerItem
's.- Returns:
- the selected 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 benull
editingContext
- the editing context, cannot benull
model
- the editor model, cannot benull
type
- the editor type, cannot benull
-
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 andfalse
otherwise
-
isFilterActive
boolean isFilterActive(ItemFilter itemFilter)
Checks whether the given item filter active.- Parameters:
itemFilter
- the given item filter, can not benull
- Returns:
true
if the given filter is active andfalse
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 benull
-
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 valueitem
- the itemright
- 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 benull
-
getContentService
org.eclipse.ui.navigator.INavigatorContentService getContentService()
Gets actualINavigatorContentService
.- Returns:
- actual
INavigatorContentService
for getting navigator content provider, nevernull
-
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 benull
-
dropSetFilterByRights
void dropSetFilterByRights()
Drops set editor view filter by rights.
-
-