Package org.opencms.ugc
Class CmsUgcConfiguration
- java.lang.Object
-
- org.opencms.ugc.CmsUgcConfiguration
-
public class CmsUgcConfiguration extends java.lang.Object
The configuration for 'user generated content' forms.
-
-
Constructor Summary
Constructors Constructor Description CmsUgcConfiguration(CmsUUID id, com.google.common.base.Optional<CmsUser> userForGuests, CmsGroup projectGroup, java.lang.String resourceType, CmsResource contentParentFolder, java.lang.String namePattern, java.util.Locale locale, com.google.common.base.Optional<CmsResource> uploadParent, com.google.common.base.Optional<java.lang.Long> maxUploadSize, com.google.common.base.Optional<java.lang.Integer> maxContents, com.google.common.base.Optional<java.lang.Long> queueTimeout, com.google.common.base.Optional<java.lang.Integer> maxQueueLength, boolean autoPublish, com.google.common.base.Optional<java.util.List<java.lang.String>> validExtensions)
Creates a new form configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CmsResource
getContentParentFolder()
Returns the folder for XML contents.boolean
getForceUserSubstitution()
Returns the force user substitution flag.CmsUUID
getId()
Gets the id.java.util.Locale
getLocale()
Returns the locale.com.google.common.base.Optional<java.lang.Integer>
getMaxContentNumber()
Returns the maximum number of XML contents.com.google.common.base.Optional<java.lang.Integer>
getMaxQueueLength()
Returns the maximum queue length.com.google.common.base.Optional<java.lang.Long>
getMaxUploadSize()
Returns the maximum upload size.java.lang.String
getNamePattern()
Returns the name pattern for XML contents.java.lang.String
getPath()
Gets the path of the configuration.CmsGroup
getProjectGroup()
Returns the group which should be used as the manager groups for projects based on this configuration.com.google.common.base.Optional<java.lang.Long>
getQueueInterval()
Returns the wait time for acquiring sessions for the same configuration.java.lang.String
getResourceType()
Returns the resource type for XML contents.com.google.common.base.Optional<CmsResource>
getUploadParentFolder()
Returns the folder for uploads.com.google.common.base.Optional<CmsUser>
getUserForGuests()
Returns the user which should be used for VFS operations when guests submit the XML content form.com.google.common.base.Optional<java.util.List<java.lang.String>>
getValidExtensions()
Returns the list of valid extensions for uploads.boolean
isAutoPublish()
Returns true if XML contents should automatically be published.boolean
needsQueue()
Checks if a queue is needed for creating sessions for this configuration.void
setPath(java.lang.String path)
Sets the path.java.lang.String
toString()
-
-
-
Constructor Detail
-
CmsUgcConfiguration
public CmsUgcConfiguration(CmsUUID id, com.google.common.base.Optional<CmsUser> userForGuests, CmsGroup projectGroup, java.lang.String resourceType, CmsResource contentParentFolder, java.lang.String namePattern, java.util.Locale locale, com.google.common.base.Optional<CmsResource> uploadParent, com.google.common.base.Optional<java.lang.Long> maxUploadSize, com.google.common.base.Optional<java.lang.Integer> maxContents, com.google.common.base.Optional<java.lang.Long> queueTimeout, com.google.common.base.Optional<java.lang.Integer> maxQueueLength, boolean autoPublish, com.google.common.base.Optional<java.util.List<java.lang.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 Detail
-
getContentParentFolder
public CmsResource getContentParentFolder()
Returns the folder for XML contents.- Returns:
- the folder for XML contents
-
getForceUserSubstitution
public boolean getForceUserSubstitution()
Returns the force user substitution flag.- Returns:
- the force user substitution flag
-
getId
public CmsUUID getId()
Gets the id.The id is a UUID that should uniquely identify this configuration.
- Returns:
- the id for this configuration
-
getLocale
public java.util.Locale getLocale()
Returns the locale.- Returns:
- the locale
-
getMaxContentNumber
public com.google.common.base.Optional<java.lang.Integer> getMaxContentNumber()
Returns the maximum number of XML contents.- Returns:
- the maximum number of XML contents
-
getMaxQueueLength
public com.google.common.base.Optional<java.lang.Integer> getMaxQueueLength()
Returns the maximum queue length.- Returns:
- the maximum queue length
-
getMaxUploadSize
public com.google.common.base.Optional<java.lang.Long> getMaxUploadSize()
Returns the maximum upload size.- Returns:
- the maximum upload size
-
getNamePattern
public java.lang.String getNamePattern()
Returns the name pattern for XML contents.- Returns:
- the name pattern for XML contents
-
getPath
public java.lang.String getPath()
Gets the path of the configuration.- Returns:
- the path of the configuration
-
getProjectGroup
public CmsGroup 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
public com.google.common.base.Optional<java.lang.Long> getQueueInterval()
Returns the wait time for acquiring sessions for the same configuration.- Returns:
- the wait time
-
getResourceType
public java.lang.String getResourceType()
Returns the resource type for XML contents.- Returns:
- the resource type for XML contents
-
getUploadParentFolder
public com.google.common.base.Optional<CmsResource> getUploadParentFolder()
Returns the folder for uploads.- Returns:
- the folder for uploads
-
getUserForGuests
public com.google.common.base.Optional<CmsUser> 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
public com.google.common.base.Optional<java.util.List<java.lang.String>> getValidExtensions()
Returns the list of valid extensions for uploads.- Returns:
- the list of valid extensions for uploads
-
isAutoPublish
public boolean isAutoPublish()
Returns true if XML contents should automatically be published.- Returns:
- true if XML contents should automatically be published
-
needsQueue
public boolean needsQueue()
Checks if a queue is needed for creating sessions for this configuration.- Returns:
- true if a queue is needed for this configuration
-
setPath
public void setPath(java.lang.String path)
Sets the path.- Parameters:
path
- the path of the configuration.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
-