Class AttachmentSettings
- java.lang.Object
-
- org.silverpeas.core.contribution.attachment.util.AttachmentSettings
-
public class AttachmentSettings extends Object
Handled the settings around the attachments.- Author:
- Yohann Chastagnier
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_REORDER_START
static int
YOUNGEST_TO_OLDEST_MANUAL_REORDER_START
static int
YOUNGEST_TO_OLDEST_MANUAL_REORDER_THRESHOLD
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
defaultValueOfDisplayableAsContentBehavior()
Gets the default value of the JCR flag which indicates if a document is displayable as content.static boolean
defaultValueOfEditableSimultaneously()
Gets the default value of the JCR flag which indicates if a document is editable simultaneously.static Stream<String>
displayableAsContentComponentNames()
Gets the stream of component name for which the the displaying as content is enabled.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.static boolean
isDisplayableAsContentForComponentInstanceId(String componentInstanceId)
Indicates if the displaying as content is enabled for a component instance represented by the given identifier.static boolean
isUseFileMetadataForAttachmentDataEnabled()
Indicates if metadata of a file, if any, can be used to fill data (title & description) of an attachment.static boolean
listFromYoungestToOldestAdd()
Indicates the order the methods in charge of returning list of documents must apply.
-
-
-
Field Detail
-
DEFAULT_REORDER_START
public static final int DEFAULT_REORDER_START
- See Also:
- Constant Field Values
-
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.
-
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.
-
-