Class 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()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 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 Detail

      • 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<CmsResourcegetUploadParentFolder()
        Returns the folder for uploads.

        Returns:
        the folder for uploads
      • getUserForGuests

        public com.google.common.base.Optional<CmsUsergetUserForGuests()
        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 class java.lang.Object
        See Also:
        Object.toString()