Class TreeViewerItem
java.lang.Object
com._1c.g5.v8.dt.rights.ui.sections.TreeViewerItem
- All Implemented Interfaces:
Comparable<TreeViewerItem>
The tree viewer item.
-
Constructor Summary
ConstructorsConstructorDescriptionTreeViewerItem
(org.eclipse.xtext.naming.IQualifiedNameProvider qualifiedNameProvider) Creates a new instance ofTreeViewerItem
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Tells whether the role is editable.int
compareTo
(TreeViewerItem item) boolean
Gets the navigator adapter.Returns the child items.org.eclipse.emf.ecore.EObject
Gets the eObject.Gets the eObject name.List<org.eclipse.emf.common.util.Diagnostic>
Gets the item validation diagnostics.Gets the item parent.Gets the item rights.getRole()
Gets the role.Gets the role description.Gets the role name.Gets the top parent in the UI tree.int
hashCode()
boolean
Is item contains Rls.boolean
isTop()
Checks whether the item is top.void
setAdapter
(NavigatorAdapterBase adapter) Sets adapter.void
setCanEditRole
(boolean canEditRole) Sets whether the role is editable.void
setChildItems
(List<TreeViewerItem> childItems) Sets the child items.void
setContainsRls
(boolean containsRls) Sets the 'containsRls' flag.void
setEObject
(org.eclipse.emf.ecore.EObject eObject) Sets the eObject.void
setEObjectName
(String eObjectName) Sets the eObject name.void
setParent
(TreeViewerItem parent) Sets the item parent.void
setRights
(Map<String, RightValue> rights) Set the rights.void
Sets the role.void
setRoleDescription
(RoleDescription roleDescription) Sets the role description.void
setRoleName
(String roleName) Sets the role name.
-
Constructor Details
-
TreeViewerItem
public TreeViewerItem(org.eclipse.xtext.naming.IQualifiedNameProvider qualifiedNameProvider) Creates a new instance ofTreeViewerItem
.- Parameters:
qualifiedNameProvider
- the qualified name provider, can not benull
-
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable<TreeViewerItem>
-
equals
-
hashCode
public int hashCode() -
getAdapter
Gets the navigator adapter.- Returns:
- the navigator adapter, may be
null
-
getChildItems
Returns the child items.- Returns:
- the child items, may be
null
if child items are not created yet
-
getEObject
public org.eclipse.emf.ecore.EObject getEObject()Gets the eObject.- Returns:
- the eObject, may be
null
-
getEObjectName
Gets the eObject name.- Returns:
- the eObject name, can not be
null
-
getErrorMessages
Gets the item validation diagnostics.- Returns:
- the item validation diagnostics, can not be
null
-
getParent
Gets the item parent.- Returns:
- the item parent, may be
null
-
getRights
Gets the item rights. The key of the map is the right name, the value is the rights value.- Returns:
- the item rights, can not be
null
-
getRoleDescription
Gets the role description.- Returns:
- the role description, may be
null
-
getRole
Gets the role.- Returns:
- the role, may be
null
-
getRoleName
Gets the role name.- Returns:
- the role name, can not be
null
-
getTopParent
Gets the top parent in the UI tree.- Returns:
- the top parent, can not be
null
-
isContainsRls
public boolean isContainsRls()Is item contains Rls.- Returns:
true
if has item contains Rls andfalse
otherwise
-
isTop
public boolean isTop()Checks whether the item is top.- Returns:
true
if the item is top andfalse
otherwise
-
canEditRole
public boolean canEditRole()Tells whether the role is editable.- Returns:
true
if the role is editable,false
otherwise
-
setChildItems
Sets the child items.- Parameters:
childItems
- the child items to set, may benull
if it is needed to create child items again
-
setContainsRls
public void setContainsRls(boolean containsRls) Sets the 'containsRls' flag.- Parameters:
containsRls
- the 'containsRls' flag value
-
setEObject
public void setEObject(org.eclipse.emf.ecore.EObject eObject) Sets the eObject.- Parameters:
eObject
- the eObject to set, can not benull
-
setEObjectName
Sets the eObject name.- Parameters:
objectName
- the eObject name to set, may benull
-
setParent
Sets the item parent.- Parameters:
parent
- the parent to set, can not benull
-
setRights
Set the rights. The key of the map is the right name, the value is the rights value.- Parameters:
rights
- the rights to set, can not benull
-
setRoleDescription
Sets the role description. The old role and role name will be erased.- Parameters:
roleDescription
- the roleDescription to set, can not benull
-
setRole
Sets the role. The role name will be erased.- Parameters:
role
- the role to set, can not benull
-
setRoleName
Sets the role name.- Parameters:
roleName
- the role name to set, may benull
-
setCanEditRole
public void setCanEditRole(boolean canEditRole) Sets whether the role is editable.- Parameters:
canEditRole
-true
if the role is editable,false
otherwise
-