Class CmsUgcSessionSecurityUtil


  • public class CmsUgcSessionSecurityUtil
    extends java.lang.Object
    Helper class which implements some of the security checks for user generated content creation.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void checkCreateContent​(CmsObject cms, CmsUgcConfiguration config)
      Checks whether a new XML content may be created and throws an exception if this is not the case.
      static void checkCreateUpload​(CmsObject cms, CmsUgcConfiguration config, java.lang.String name, long size)
      Checks whether an uploaded file can be created in the VFS, and throws an exception otherwise.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • checkCreateUpload

        public static void checkCreateUpload​(CmsObject cms,
                                             CmsUgcConfiguration config,
                                             java.lang.String name,
                                             long size)
                                      throws CmsUgcException
        Checks whether an uploaded file can be created in the VFS, and throws an exception otherwise.
        Parameters:
        cms - the current CMS context
        config - the form configuration
        name - the file name of the uploaded file
        size - the size of the uploaded file
        Throws:
        CmsUgcException - if something goes wrong