public final class ContentFile extends Object
Constructor and Description |
---|
ContentFile(File file,
String path,
String subPath,
ContentFileCache contentFileCache) |
ContentFile(File file,
String path,
String subPath,
ContentFileCache contentFileCache,
org.apache.sling.jcr.contentparser.ContentType contentType) |
Modifier and Type | Method and Description |
---|---|
Iterator<Map.Entry<String,ContentElement>> |
getChildren() |
ContentElement |
getContent()
Content object referenced by sub path.
|
File |
getFile() |
String |
getPath() |
String |
getSubPath() |
org.apache.sling.api.resource.ValueMap |
getValueMap() |
boolean |
hasContent() |
ContentFile |
navigateToAbsolute(String newSubPath)
Navigate to another sub path position in content file.
|
ContentFile |
navigateToRelative(String newSubPath)
Navigate to another sub path position in content file.
|
public ContentFile(File file, String path, String subPath, ContentFileCache contentFileCache)
file
- File with content fragmentpath
- Root path of the content filesubPath
- Relative path addressing content fragment inside filecontentFileCache
- Content file cachepublic ContentFile(File file, String path, String subPath, ContentFileCache contentFileCache, org.apache.sling.jcr.contentparser.ContentType contentType)
file
- File with content fragmentpath
- Root path of the content filesubPath
- Relative path addressing content fragment inside filecontentFileCache
- Content file cachecontentType
- Content typepublic File getFile()
public String getPath()
public String getSubPath()
public ContentElement getContent()
public boolean hasContent()
public org.apache.sling.api.resource.ValueMap getValueMap()
public Iterator<Map.Entry<String,ContentElement>> getChildren()
public ContentFile navigateToAbsolute(String newSubPath)
newSubPath
- New sub path related to root path of content filepublic ContentFile navigateToRelative(String newSubPath)
newSubPath
- New sub path relative to current sub path in content fileCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.