Class PermissionData


  • public class PermissionData
    extends java.lang.Object
    Simple data object to wrap a Permissions instance.
    Since:
    3.0-M3
    • Constructor Summary

      Constructors 
      Constructor Description
      PermissionData()
      Creates a new instance.
      PermissionData​(omero.model.Permissions permissions)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getPermissionsLevel()
      Returns the permissions level.
      boolean isGroupAnnotate()
      Returns true if the group has annotate access i.e.
      boolean isGroupRead()
      Returns true if the group has read access i.e.
      boolean isGroupWrite()
      Returns true if the group has write access i.e.
      boolean isUserRead()
      Returns true if the user has read access, false otherwise.
      boolean isUserWrite()
      Returns true if the user has write access, false otherwise.
      boolean isWorldRead()
      Returns true if the world has read access, false otherwise.
      boolean isWorldWrite()
      Returns true if the world has write access, false otherwise.
      void setGroupAnnotate​(boolean groupAnnotate)
      Sets to true if the group has annotate access, false otherwise.
      void setGroupRead​(boolean groupRead)
      Sets to true if the group has read access, false otherwise.
      void setGroupWrite​(boolean groupWrite)
      Sets to true if the group has write access, false otherwise.
      void setUserRead​(boolean userRead)
      Sets to true if the user has read access, false otherwise.
      void setUserWrite​(boolean userWrite)
      Sets to true if the user has write access, false otherwise.
      void setWorldRead​(boolean worldRead)
      Sets to true if the world has read access, false otherwise.
      void setWorldWrite​(boolean worldWrite)
      Sets to true if the world has write access, false otherwise.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PermissionData

        public PermissionData()
        Creates a new instance.
      • PermissionData

        public PermissionData​(omero.model.Permissions permissions)
        Creates a new instance.
        Parameters:
        permissions - The value to set.
    • Method Detail

      • getPermissionsLevel

        public int getPermissionsLevel()
        Returns the permissions level.
        Returns:
        See above.
      • isGroupRead

        public boolean isGroupRead()
        Returns true if the group has read access i.e. RWR---, false otherwise.
        Returns:
        See above.
      • isGroupAnnotate

        public boolean isGroupAnnotate()
        Returns true if the group has annotate access i.e. RWRA--, false otherwise.
        Returns:
        See above.
      • isGroupWrite

        public boolean isGroupWrite()
        Returns true if the group has write access i.e. RWRW--, false otherwise.
        Returns:
        See above.
      • isUserRead

        public boolean isUserRead()
        Returns true if the user has read access, false otherwise.
        Returns:
        See above.
      • isUserWrite

        public boolean isUserWrite()
        Returns true if the user has write access, false otherwise.
        Returns:
        See above.
      • isWorldRead

        public boolean isWorldRead()
        Returns true if the world has read access, false otherwise.
        Returns:
        See above.
      • isWorldWrite

        public boolean isWorldWrite()
        Returns true if the world has write access, false otherwise.
        Returns:
        See above.
      • setGroupRead

        public void setGroupRead​(boolean groupRead)
        Sets to true if the group has read access, false otherwise.
        Parameters:
        groupRead - The value to set.
      • setGroupAnnotate

        public void setGroupAnnotate​(boolean groupAnnotate)
        Sets to true if the group has annotate access, false otherwise.
        Parameters:
        groupAnnotate - The value to set.
      • setGroupWrite

        public void setGroupWrite​(boolean groupWrite)
        Sets to true if the group has write access, false otherwise.
        Parameters:
        groupWrite - The value to set.
      • setUserRead

        public void setUserRead​(boolean userRead)
        Sets to true if the user has read access, false otherwise.
        Parameters:
        userRead - The value to set.
      • setUserWrite

        public void setUserWrite​(boolean userWrite)
        Sets to true if the user has write access, false otherwise.
        Parameters:
        userWrite - The value to set.
      • setWorldRead

        public void setWorldRead​(boolean worldRead)
        Sets to true if the world has read access, false otherwise.
        Parameters:
        worldRead - The value to set.
      • setWorldWrite

        public void setWorldWrite​(boolean worldWrite)
        Sets to true if the world has write access, false otherwise.
        Parameters:
        worldWrite - The value to set.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object