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 booleancanEditRole()Tells whether the role is editable.intcompareTo(TreeViewerItem item)booleanequals(Object obj)NavigatorAdapterBasegetAdapter()Gets the navigator adapter.List<TreeViewerItem>getChildItems()Returns the child items.org.eclipse.emf.ecore.EObjectgetEObject()Gets the eObject.StringgetEObjectName()Gets the eObject name.List<org.eclipse.emf.common.util.Diagnostic>getErrorMessages()Gets the item validation diagnostics.TreeViewerItemgetParent()Gets the item parent.Map<String,RightValue>getRights()Gets the item rights.RolegetRole()Gets the role.RoleDescriptiongetRoleDescription()Gets the role description.StringgetRoleName()Gets the role name.TreeViewerItemgetTopParent()Gets the top parent in the UI tree.inthashCode()booleanisContainsRls()Is item contains Rls.booleanisTop()Checks whether the item is top.voidsetAdapter(NavigatorAdapterBase adapter)Sets adapter.voidsetCanEditRole(boolean canEditRole)Sets whether the role is editable.voidsetChildItems(List<TreeViewerItem> childItems)Sets the child items.voidsetContainsRls(boolean containsRls)Sets the 'containsRls' flag.voidsetEObject(org.eclipse.emf.ecore.EObject eObject)Sets the eObject.voidsetEObjectName(String eObjectName)Sets the eObject name.voidsetParent(TreeViewerItem parent)Sets the item parent.voidsetRights(Map<String,RightValue> rights)Set the rights.voidsetRole(Role role)Sets the role.voidsetRoleDescription(RoleDescription roleDescription)Sets the role description.voidsetRoleName(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:
compareToin 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
nullif 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:
trueif has item contains Rls andfalseotherwise
-
isTop
public boolean isTop()
Checks whether the item is top.- Returns:
trueif the item is top andfalseotherwise
-
canEditRole
public boolean canEditRole()
Tells whether the role is editable.- Returns:
trueif the role is editable,falseotherwise
-
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 benullif 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-trueif the role is editable,falseotherwise
-
-