Class PlatformFileType

    • Field Detail

      • RUNTIME_FILTER

        private static final QueryRuntimeFilter RUNTIME_FILTER
        This filter will only return items if the logged in user has generic read permission to platforms.
    • Constructor Detail

      • PlatformFileType

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

      • getQuery

        public static ItemQuery<PlatformFileType> getQuery​(Platform platform,
                                                           PlatformVariant variant,
                                                           boolean restrict)
        Get the file types that have been registered for a specific platform and variant. If the restrict parameter is TRUE the query will be restricted to return fewer items. It works like this:
        • It has no meaning if both platform and variant is null
        • If variant is null, the query will return file types the platform and all variants if restrict=false. If restrict=true the query will only return items registered directly with the platform
        • If variant isn't null, the query will return file types that have been registered for that variant plus file types registered with the platform if restrict=false. If restrict=true the query will only return file types registered for that particular variant.
        Note! If a variant is given but no platform, the platform will automatically be set from the variant.
        Parameters:
        platform - A platform object or null to return items for all platforms
        variant - A platform variant or null to return items for all variants
        restrict - Indicates if the query should be restricted to inlcude fewer items
        Returns:
        A query returning PlatformFileType items
      • 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.
        Specified by:
        getType in interface Identifiable
        Returns:
        A value indicating the type of item
      • getParentType

        Item getParentType()
        Description copied from class: BasicChildItem
        Get the type of item that is the parent of this item.
        Specified by:
        getParentType in class BasicChildItem
        Returns:
        The item type of the parent item
      • getPlatform

        public Platform getPlatform()
        Get the platform.
        Returns:
        A platform item
      • getVariant

        public PlatformVariant getVariant()
        Get the platform variant.
        Returns:
        A platform variant item, or null if this file type is associated with all variants of the platform
      • isRequired

        public boolean isRequired()
        Check if a file of this type is required or not. Note! The requirement is not enforced by the core. It should be used as a hint to client applications so they can create a proper GUI. To check if a FileSet contains all files that have been marked as required use FileSet.hasAllRequiredFiles().
        Specified by:
        isRequired in interface UsableDataFileType
      • setRequired

        public void setRequired​(boolean required)
        Set the required flag for this file type.
      • getAllowMultiple

        public boolean getAllowMultiple()
        Check if more than one file of this type is allowed in a file set or not. Note! The requirement is not enforced by the core. It should be used as a hint to client applications so they can create a proper GUI.
        Specified by:
        getAllowMultiple in interface UsableDataFileType
      • setAllowMultiple

        public void setAllowMultiple​(boolean multiple)
        Allow or disallow multiple files of this file type in a file set.