Class AttachmentSettings


  • public class AttachmentSettings
    extends Object
    Handled the settings around the attachments.
    Author:
    Yohann Chastagnier
    • Field Detail

      • YOUNGEST_TO_OLDEST_MANUAL_REORDER_START

        public static final int YOUNGEST_TO_OLDEST_MANUAL_REORDER_START
        See Also:
        Constant Field Values
      • YOUNGEST_TO_OLDEST_MANUAL_REORDER_THRESHOLD

        public static final int YOUNGEST_TO_OLDEST_MANUAL_REORDER_THRESHOLD
        See Also:
        Constant Field Values
    • Method Detail

      • getDelayInPercentAfterWhichReservedFileAlertMustBeSent

        public static int getDelayInPercentAfterWhichReservedFileAlertMustBeSent()
        Gets the delay in percent after which an alert MUST be sent to the owner in order to remind it to release the reserved file.
        Returns:
        an integer representing a percentage, -1 means no value.
      • listFromYoungestToOldestAdd

        public static boolean listFromYoungestToOldestAdd()
        Indicates the order the methods in charge of returning list of documents must apply.
        Returns:
        false to list from oldest to youngest, true to list from the youngest to the oldest.
      • isUseFileMetadataForAttachmentDataEnabled

        public static boolean isUseFileMetadataForAttachmentDataEnabled()
        Indicates if metadata of a file, if any, can be used to fill data (title & description) of an attachment. (defined in properties by attachment.data.fromMetadata)
        Returns:
        true if they must be used, false otherwise.
      • displayableAsContentComponentNames

        public static Stream<String> displayableAsContentComponentNames()
        Gets the stream of component name for which the the displaying as content is enabled.
        Returns:
        Stream of component name as String.
      • defaultValueOfDisplayableAsContentBehavior

        public static boolean defaultValueOfDisplayableAsContentBehavior()
        Gets the default value of the JCR flag which indicates if a document is displayable as content.
        Returns:
        true of displayable as content, false otherwise.
      • isDisplayableAsContentForComponentInstanceId

        public static boolean isDisplayableAsContentForComponentInstanceId​(String componentInstanceId)
        Indicates if the displaying as content is enabled for a component instance represented by the given identifier.
        Parameters:
        componentInstanceId - identifier of a component instance.
        Returns:
        true if activated, false otherwise.
      • defaultValueOfEditableSimultaneously

        public static boolean defaultValueOfEditableSimultaneously()
        Gets the default value of the JCR flag which indicates if a document is editable simultaneously.
        Returns:
        true if editable simultaneously, false otherwise.