Package org.opencms.ugc
Class CmsUgcConfiguration
java.lang.Object
org.opencms.ugc.CmsUgcConfiguration
The configuration for 'user generated content' forms.
-
Constructor Summary
ConstructorDescriptionCmsUgcConfiguration
(CmsUUID id, com.google.common.base.Optional<CmsUser> userForGuests, CmsGroup projectGroup, String resourceType, CmsResource contentParentFolder, String namePattern, Locale locale, com.google.common.base.Optional<CmsResource> uploadParent, com.google.common.base.Optional<Long> maxUploadSize, com.google.common.base.Optional<Integer> maxContents, com.google.common.base.Optional<Long> queueTimeout, com.google.common.base.Optional<Integer> maxQueueLength, boolean autoPublish, com.google.common.base.Optional<List<String>> validExtensions) Creates a new form configuration. -
Method Summary
Modifier and TypeMethodDescriptionReturns the folder for XML contents.boolean
Returns the force user substitution flag.getId()
Gets the id.Returns the locale.com.google.common.base.Optional<Integer>
Returns the maximum number of XML contents.com.google.common.base.Optional<Integer>
Returns the maximum queue length.com.google.common.base.Optional<Long>
Returns the maximum upload size.Returns the name pattern for XML contents.getPath()
Gets the path of the configuration.Returns the group which should be used as the manager groups for projects based on this configuration.com.google.common.base.Optional<Long>
Returns the wait time for acquiring sessions for the same configuration.Returns the resource type for XML contents.com.google.common.base.Optional<CmsResource>
Returns the folder for uploads.com.google.common.base.Optional<CmsUser>
Returns the user which should be used for VFS operations when guests submit the XML content form.Returns the list of valid extensions for uploads.boolean
Returns true if XML contents should automatically be published.boolean
Checks if a queue is needed for creating sessions for this configuration.void
Sets the path.toString()
-
Constructor Details
-
CmsUgcConfiguration
public CmsUgcConfiguration(CmsUUID id, com.google.common.base.Optional<CmsUser> userForGuests, CmsGroup projectGroup, String resourceType, CmsResource contentParentFolder, String namePattern, Locale locale, com.google.common.base.Optional<CmsResource> uploadParent, com.google.common.base.Optional<Long> maxUploadSize, com.google.common.base.Optional<Integer> maxContents, com.google.common.base.Optional<Long> queueTimeout, com.google.common.base.Optional<Integer> maxQueueLength, boolean autoPublish, com.google.common.base.Optional<List<String>> validExtensions) Creates a new form configuration.- Parameters:
id
- the id for the form configurationuserForGuests
- the user to use for VFS operations caused by guests who submit the XML content formprojectGroup
- the group to be used as the manager group for projects based on this configurationresourceType
- the resource type for new XML contentscontentParentFolder
- the parent folder for XML contentsnamePattern
- the name pattern for XML contentslocale
- the locale to useuploadParent
- the parent folder for uploadsmaxUploadSize
- the maximum upload file sizemaxContents
- the maximum number of XML contentsqueueTimeout
- the wait time for the queuemaxQueueLength
- the maximum queue lengthautoPublish
- enables/disables automatic publishingvalidExtensions
- the list of valid extensions
-
-
Method Details
-
getContentParentFolder
Returns the folder for XML contents.- Returns:
- the folder for XML contents
-
getForceUserSubstitution
Returns the force user substitution flag.- Returns:
- the force user substitution flag
-
getId
Gets the id.The id is a UUID that should uniquely identify this configuration.
- Returns:
- the id for this configuration
-
getLocale
Returns the locale.- Returns:
- the locale
-
getMaxContentNumber
Returns the maximum number of XML contents.- Returns:
- the maximum number of XML contents
-
getMaxQueueLength
Returns the maximum queue length.- Returns:
- the maximum queue length
-
getMaxUploadSize
Returns the maximum upload size.- Returns:
- the maximum upload size
-
getNamePattern
Returns the name pattern for XML contents.- Returns:
- the name pattern for XML contents
-
getPath
Gets the path of the configuration.- Returns:
- the path of the configuration
-
getProjectGroup
Returns the group which should be used as the manager groups for projects based on this configuration.- Returns:
- the project manager group for this configuration
-
getQueueInterval
Returns the wait time for acquiring sessions for the same configuration.- Returns:
- the wait time
-
getResourceType
Returns the resource type for XML contents.- Returns:
- the resource type for XML contents
-
getUploadParentFolder
Returns the folder for uploads.- Returns:
- the folder for uploads
-
getUserForGuests
Returns the user which should be used for VFS operations when guests submit the XML content form.- Returns:
- the user to use for VFS operations instead of the guest user
-
getValidExtensions
Returns the list of valid extensions for uploads.- Returns:
- the list of valid extensions for uploads
-
isAutoPublish
Returns true if XML contents should automatically be published.- Returns:
- true if XML contents should automatically be published
-
needsQueue
Checks if a queue is needed for creating sessions for this configuration.- Returns:
- true if a queue is needed for this configuration
-
setPath
Sets the path.- Parameters:
path
- the path of the configuration.
-
toString
-