Class ContentFile
java.lang.Object
org.apache.sling.fsprovider.internal.mapper.ContentFile
Reference to a file that contains a content fragment (e.g. JSON, JCR XML).
-
Constructor Summary
ConstructorsConstructorDescriptionContentFile
(File file, String path, String subPath, ContentFileCache contentFileCache) ContentFile
(File file, String path, String subPath, ContentFileCache contentFileCache, ContentType contentType) -
Method Summary
Modifier and TypeMethodDescriptionContent object referenced by sub path.getFile()
getPath()
boolean
navigateToAbsolute
(String newSubPath) Navigate to another sub path position in content file.navigateToRelative
(String newSubPath) Navigate to another sub path position in content file.
-
Constructor Details
-
ContentFile
- Parameters:
file
- File with content fragmentpath
- Root path of the content filesubPath
- Relative path addressing content fragment inside filecontentFileCache
- Content file cache
-
ContentFile
public ContentFile(File file, String path, String subPath, ContentFileCache contentFileCache, ContentType contentType) - Parameters:
file
- File with content fragmentpath
- Root path of the content filesubPath
- Relative path addressing content fragment inside filecontentFileCache
- Content file cachecontentType
- Content type
-
-
Method Details
-
getFile
- Returns:
- File with content fragment
-
getPath
- Returns:
- Root path of content file
-
getSubPath
- Returns:
- Relative path addressing content fragment inside file
-
getContent
Content object referenced by sub path.- Returns:
- Map if resource, property value if property.
-
hasContent
public boolean hasContent()- Returns:
- true if any content was found.
-
getValueMap
- Returns:
- ValueMap for resource. Never null.
-
getChildren
- Returns:
- Child maps.
-