Class TreeViewerItem
- java.lang.Object
-
- com._1c.g5.v8.dt.rights.ui.sections.TreeViewerItem
-
- All Implemented Interfaces:
Comparable<TreeViewerItem>
public class TreeViewerItem extends Object implements Comparable<TreeViewerItem>
The tree viewer item.
-
-
Constructor Summary
Constructors Constructor Description TreeViewerItem(org.eclipse.xtext.naming.IQualifiedNameProvider qualifiedNameProvider)
Creates a new instance ofTreeViewerItem
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canEditRole()
Tells whether the role is editable.int
compareTo(TreeViewerItem item)
boolean
equals(Object obj)
NavigatorAdapterBase
getAdapter()
Gets the navigator adapter.List<TreeViewerItem>
getChildItems()
Returns the child items.org.eclipse.emf.ecore.EObject
getEObject()
Gets the eObject.String
getEObjectName()
Gets the eObject name.List<org.eclipse.emf.common.util.Diagnostic>
getErrorMessages()
Gets the item validation diagnostics.TreeViewerItem
getParent()
Gets the item parent.Map<String,RightValue>
getRights()
Gets the item rights.Role
getRole()
Gets the role.RoleDescription
getRoleDescription()
Gets the role description.String
getRoleName()
Gets the role name.TreeViewerItem
getTopParent()
Gets the top parent in the UI tree.int
hashCode()
boolean
isContainsRls()
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
setRole(Role role)
Sets the role.void
setRoleDescription(RoleDescription roleDescription)
Sets the role description.void
setRoleName(String roleName)
Sets the role name.
-
-
-
Constructor Detail
-
TreeViewerItem
public TreeViewerItem(org.eclipse.xtext.naming.IQualifiedNameProvider qualifiedNameProvider)
Creates a new instance ofTreeViewerItem
.- Parameters:
qualifiedNameProvider
- the qualified name provider, can not benull
-
-
Method Detail
-
compareTo
public int compareTo(TreeViewerItem item)
- Specified by:
compareTo
in interfaceComparable<TreeViewerItem>
-
getAdapter
public NavigatorAdapterBase getAdapter()
Gets the navigator adapter.- Returns:
- the navigator adapter, may be
null
-
getChildItems
public List<TreeViewerItem> 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
public String getEObjectName()
Gets the eObject name.- Returns:
- the eObject name, can not be
null
-
getErrorMessages
public List<org.eclipse.emf.common.util.Diagnostic> getErrorMessages()
Gets the item validation diagnostics.- Returns:
- the item validation diagnostics, can not be
null
-
getParent
public TreeViewerItem getParent()
Gets the item parent.- Returns:
- the item parent, may be
null
-
getRights
public Map<String,RightValue> 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
public RoleDescription getRoleDescription()
Gets the role description.- Returns:
- the role description, may be
null
-
getRole
public Role getRole()
Gets the role.- Returns:
- the role, may be
null
-
getRoleName
public String getRoleName()
Gets the role name.- Returns:
- the role name, can not be
null
-
getTopParent
public TreeViewerItem 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
-
setAdapter
public void setAdapter(NavigatorAdapterBase adapter)
Sets adapter.- Parameters:
adapter
- the navigator adapter to set, can not benull
-
setChildItems
public void setChildItems(List<TreeViewerItem> childItems)
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
public void setEObjectName(String eObjectName)
Sets the eObject name.- Parameters:
objectName
- the eObject name to set, may benull
-
setParent
public void setParent(TreeViewerItem parent)
Sets the item parent.- Parameters:
parent
- the parent to set, can not benull
-
setRights
public void setRights(Map<String,RightValue> rights)
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
public void setRoleDescription(RoleDescription roleDescription)
Sets the role description. The old role and role name will be erased.- Parameters:
roleDescription
- the roleDescription to set, can not benull
-
setRole
public void setRole(Role role)
Sets the role. The role name will be erased.- Parameters:
role
- the role to set, can not benull
-
setRoleName
public void setRoleName(String roleName)
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
-
-