Class FileSetMember

  • All Implemented Interfaces:
    AccessControlled, Identifiable

    public class FileSetMember
    extends BasicItem
    This class represents a file that is member of a file set.
    Version:
    2.5
    Author:
    Nicklas
    Last modified
    $Date: 2015-04-20 11:08:18 +0200 (må, 20 apr 2015) $
    • Field Detail

      • RUNTIME_FILTER

        private static final QueryRuntimeFilter RUNTIME_FILTER
        This filter gives everybody read permission to file set members.
    • Constructor Detail

      • FileSetMember

        FileSetMember​(FileSetMemberData data)
        Creates a new member item from the given data.
        Parameters:
        data - the data.
    • Method Detail

      • getType

        public Item getType()
        Description copied from interface: Identifiable
        Get the type of item represented by the object. The returned value is one of the values defined in the Item enumeration.
        Returns:
        A value indicating the type of item
      • initPermissions

        void initPermissions​(int granted,
                             int denied)
                      throws BaseException
        READ permission is granted to all users. CREATE, WRITE and DELETE permissions are granted if the logged in user has WRITE permission on the associated file set.
        Overrides:
        initPermissions in class BasicItem
        Parameters:
        granted - Permissions that have been granted by the subclass
        denied - Permissions that have been denied by the subclass
        Throws:
        BaseException - If the permissions couldn't be initialised
      • getFileSet

        public FileSet getFileSet()
        Get the file set the file is a member of.
        Returns:
        A file set item
      • getFile

        public File getFile()
        Get the file this item is representing in the file set.
        Returns:
        A file item
      • getDataFileType

        public DataFileType getDataFileType()
        Get the type of the file.
        Returns:
        A file set member type item
      • isValid

        public Boolean isValid()
        Check if the file has been validated and if it passed or not.
        Returns:
        NULL if the file hasn't been validated, TRUE or FALSE to indicate the result of the validation
      • setValid

        public void setValid​(Boolean valid,
                             String errorMessage)
        Set the validation status of this member.
        Parameters:
        valid - If the member file is valid or not, use null to indicate that no validation has been performed
        errorMessage - The error message if the validation failes
      • getErrorMessage

        public String getErrorMessage()
        Get the error message if the validation failed.
        Returns:
        The error message or null if the file is valid or if it hasn't been validated
      • isPlatformFile

        public boolean isPlatformFile()
        Checks if this file is part of the platform/variant the parent item belongs to.
        Returns:
        TRUE if the file is part of the platform, FALSE otherwise
        Since:
        2.10