Class DefaultUIAccessRightService

    • Constructor Detail

      • DefaultUIAccessRightService

        public DefaultUIAccessRightService()
    • Method Detail

      • canRead

        public boolean canRead​(UserModel user,
                               java.lang.String componentCode)
        Description copied from interface: UIAccessRightService
        Returns whether a specific user has read access to a specific Cockpit component or not.
        Specified by:
        canRead in interface UIAccessRightService
        Parameters:
        user - the user to check access for
        componentCode - the unique code of the component
        Returns:
        true if the user has read access to the specified component, otherwise false
      • canWrite

        public boolean canWrite​(UserModel user,
                                java.lang.String componentCode)
        Description copied from interface: UIAccessRightService
        Returns whether a specific user has write access to a specific Cockpit component or not.
        Specified by:
        canWrite in interface UIAccessRightService
        Parameters:
        user - the user to check access for
        componentCode - the unique code of the component
        Returns:
        true if the user has write access to the specified component, otherwise false
      • setUserService

        public void setUserService​(UserService userService)
      • isReadable

        public boolean isReadable​(ObjectType type)
        Description copied from interface: UIAccessRightService
        Returns whether the current user has read access to the specified type.
        Specified by:
        isReadable in interface UIAccessRightService
        Parameters:
        type - the type to check access for
        Returns:
        true if user has read access, false otherwise
      • isReadable

        public boolean isReadable​(ObjectType type,
                                  PropertyDescriptor propDescr,
                                  boolean creationMode)
        Description copied from interface: UIAccessRightService
        Returns whether the current user has read access to the specified property.
        Specified by:
        isReadable in interface UIAccessRightService
        Parameters:
        type - item type
        propDescr - item attribute to check access for
        creationMode - creation mode or not
        Returns:
        true if user has read access, false otherwise
      • isWritable

        public boolean isWritable​(ObjectType type)
        Description copied from interface: UIAccessRightService
        Returns whether the current user has write access to the specified type.
        Specified by:
        isWritable in interface UIAccessRightService
        Parameters:
        type - the type to check access for
        Returns:
        true if user has write access, false otherwise
      • isWritable

        public boolean isWritable​(ObjectType type,
                                  TypedObject item)
        Description copied from interface: UIAccessRightService
        Returns whether the current user has write access to the specified item.
        Specified by:
        isWritable in interface UIAccessRightService
        Parameters:
        type - item type
        item - the item instance to check access for
        Returns:
        true if user has write access, false otherwise
      • isWritable

        public boolean isWritable​(ObjectType type,
                                  TypedObject item,
                                  PropertyDescriptor propDescr,
                                  boolean creationMode)
        Description copied from interface: UIAccessRightService
        Returns whether the current user has write access to the specified item property.
        Specified by:
        isWritable in interface UIAccessRightService
        Parameters:
        type - item type
        item - item instance
        propDescr - item attribute to check access for
        creationMode - creation mode or not
        Returns:
        true if user has write access, false otherwise
      • isWritable

        public boolean isWritable​(ObjectType type,
                                  PropertyDescriptor propDescr,
                                  boolean creationMode)
        Description copied from interface: UIAccessRightService
        Returns whether the current user has write access to the specified item property.
        Specified by:
        isWritable in interface UIAccessRightService
        Parameters:
        type - item type
        propDescr - item attribute to check access for
        creationMode - creation mode or not
        Returns:
        true if user has write access, false otherwise
      • setSystemService

        public void setSystemService​(SystemService systemService)
      • canWrite

        public boolean canWrite​(UserModel user,
                                CatalogVersionModel catVersion)
        Description copied from interface: UIAccessRightService
        Returns whether a specific user has write access to a specific catalog version or not.
        Specified by:
        canWrite in interface UIAccessRightService
        Parameters:
        user - the user to check access for
        catVersion - the catalog version
        Returns:
        true if the user has write access, false otherwise