Class CmsUgcConfiguration

java.lang.Object
org.opencms.ugc.CmsUgcConfiguration

public class CmsUgcConfiguration extends Object
The configuration for 'user generated content' forms.

  • 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 configuration
      userForGuests - the user to use for VFS operations caused by guests who submit the XML content form
      projectGroup - the group to be used as the manager group for projects based on this configuration
      resourceType - the resource type for new XML contents
      contentParentFolder - the parent folder for XML contents
      namePattern - the name pattern for XML contents
      locale - the locale to use
      uploadParent - the parent folder for uploads
      maxUploadSize - the maximum upload file size
      maxContents - the maximum number of XML contents
      queueTimeout - the wait time for the queue
      maxQueueLength - the maximum queue length
      autoPublish - enables/disables automatic publishing
      validExtensions - the list of valid extensions
  • Method Details

    • 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 Locale getLocale()
      Returns the locale.

      Returns:
      the locale
    • getMaxContentNumber

      public com.google.common.base.Optional<Integer> getMaxContentNumber()
      Returns the maximum number of XML contents.

      Returns:
      the maximum number of XML contents
    • getMaxQueueLength

      public com.google.common.base.Optional<Integer> getMaxQueueLength()
      Returns the maximum queue length.

      Returns:
      the maximum queue length
    • getMaxUploadSize

      public com.google.common.base.Optional<Long> 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

      public String 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

      public com.google.common.base.Optional<Long> 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

      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<List<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(String path)
      Sets the path.

      Parameters:
      path - the path of the configuration.

    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also: