Class StudioUtils


  • public abstract class StudioUtils
    extends Object
    • Constructor Detail

      • StudioUtils

        public StudioUtils()
    • Method Detail

      • getMimeType

        public static String getMimeType​(String filename)
      • getSiteId

        public static String getSiteId()
        Obtains the siteId from the current request, always fails if called out of a request context
        Returns:
        the siteId
      • matchesPatterns

        public static boolean matchesPatterns​(String path,
                                              List<String> patterns)
      • getTopLevelFolder

        public static String getTopLevelFolder​(String path)
        Gets the top level folder where path is contained. The result will be a value from the list defined at StudioConstants.TOP_LEVEL_FOLDERS, if found, null otherwise.
        Parameters:
        path - the content path
        Returns:
        top level root path, if matched, or null otherwise