Class StudioUtils
java.lang.Object
org.craftercms.studio.api.v2.utils.StudioUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetMimeType(String filename) static StringObtains the siteId from the current request, always fails if called out of a request contextstatic Pathstatic StringgetTopLevelFolder(String path) Gets the top level folder wherepathis contained.static booleanmatchesPatterns(String path, List<String> patterns)
-
Constructor Details
-
StudioUtils
public StudioUtils()
-
-
Method Details
-
getMimeType
-
getSiteId
Obtains the siteId from the current request, always fails if called out of a request context- Returns:
- the siteId
-
matchesPatterns
-
getTopLevelFolder
Gets the top level folder wherepathis 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
-
getStudioTemporaryFilesRoot
-