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 TypeMethodDescriptionbooleanTells whether the role is editable.intcompareTo(TreeViewerItem item) booleanGets the navigator adapter.Returns the child items.org.eclipse.emf.ecore.EObjectGets 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.inthashCode()booleanIs 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.voidSets the role.voidsetRoleDescription(RoleDescription roleDescription) Sets the role description.voidsetRoleName(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:
compareToin 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
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
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:
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
-
setChildItems
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
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-trueif the role is editable,falseotherwise
-