Class TreeViewerItem

    • Constructor Detail

      • TreeViewerItem

        public TreeViewerItem​(org.eclipse.xtext.naming.IQualifiedNameProvider qualifiedNameProvider)
        Creates a new instance of TreeViewerItem.
        Parameters:
        qualifiedNameProvider - the qualified name provider, can not be null
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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 and false otherwise
      • isTop

        public boolean isTop()
        Checks whether the item is top.
        Returns:
        true if the item is top and false 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 be null
      • setChildItems

        public void setChildItems​(List<TreeViewerItem> childItems)
        Sets the child items.
        Parameters:
        childItems - the child items to set, may be null 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 be null
      • setEObjectName

        public void setEObjectName​(String eObjectName)
        Sets the eObject name.
        Parameters:
        objectName - the eObject name to set, may be null
      • setParent

        public void setParent​(TreeViewerItem parent)
        Sets the item parent.
        Parameters:
        parent - the parent to set, can not be null
      • 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 be null
      • 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 be null
      • setRole

        public void setRole​(Role role)
        Sets the role. The role name will be erased.
        Parameters:
        role - the role to set, can not be null
      • setRoleName

        public void setRoleName​(String roleName)
        Sets the role name.
        Parameters:
        roleName - the role name to set, may be null
      • setCanEditRole

        public void setCanEditRole​(boolean canEditRole)
        Sets whether the role is editable.
        Parameters:
        canEditRole - true if the role is editable, false otherwise