public class FrameworkContentExporterUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NG_FRAMEWORK_TYPE_ID |
static java.lang.String |
NG_PAGE_RESOURCE_TYPE |
Constructor and Description |
---|
FrameworkContentExporterUtils() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<Page> |
getAllAngularDescendantPages(Page page,
PageFilter pageFilter) |
static java.util.List<Resource> |
getAllAngularPageComponents(Resource pageContentResource)
Returns a list of all the 'angular' components that are descendants of
the given resource.
|
static Resource |
getAncestorTemplateResource(Resource resource,
java.lang.String resourceType)
Determines the nearest ancestor template resource.
|
static java.lang.String |
getJsFriendlyResourceName(java.lang.String resourcePath)
Returns a Javascript-friendly String to identify this resource.
|
static long |
getMillisecondsSinceUnixEpoch()
Returns the number of milliseconds since the UNIX epoch.
|
static java.lang.String |
getPathToAsset(Resource parentResource,
java.lang.String absoluteDescendantAssetPath,
boolean appExport)
Returns a path to the given asset.
|
static java.lang.String |
getRelativeComponentPath(java.lang.String path)
Trims a component path down to the substring following "jcr:content/".
|
static java.lang.String |
getRelativePathToDescendantPath(Resource parentResource,
java.lang.String absoluteDescendantPath)
Returns a relative path from the parentResource to the absoluteDescendantPath
|
static java.lang.String |
getRelativePathToDescendantResource(Resource parentResource,
Resource descendantResource)
Returns a relative path from the parentResource to the descendantResource.
|
static java.lang.String |
getRelativePathToRootLevel(Resource resource)
Returns a relative path to the root level nodes in the repository.
|
static Resource |
getTopLevelAppResource(Resource resource)
Returns a resource that is determined to be the top-level page in an application that resource
is a descendant of.
|
static boolean |
isTopLevelAppResource(Resource resource)
Determines if this resource is the top level app resource.
|
public static final java.lang.String NG_PAGE_RESOURCE_TYPE
public static final java.lang.String NG_FRAMEWORK_TYPE_ID
public static java.lang.String getRelativePathToDescendantResource(Resource parentResource, Resource descendantResource)
parentResource
- resulting path will be relative from this resourcedescendantResource
- descendant resource. Must be a descendant of parentResourcepublic static java.lang.String getRelativePathToDescendantPath(Resource parentResource, java.lang.String absoluteDescendantPath)
parentResource
- resulting path will be relative from this resourceabsoluteDescendantPath
- path to a descendant of parentResourcepublic static java.lang.String getPathToAsset(Resource parentResource, java.lang.String absoluteDescendantAssetPath, boolean appExport)
parentResource
- path will be relative to this resource if appExport is trueabsoluteDescendantAssetPath
- absolute path to a descendant of parentResourceappExport
- if true, content is being exportedpublic static Resource getTopLevelAppResource(Resource resource)
resource
- the resource in questionpublic static boolean isTopLevelAppResource(Resource resource)
resource
- the resource in questionpublic static long getMillisecondsSinceUnixEpoch()
public static java.util.List<Page> getAllAngularDescendantPages(Page page, PageFilter pageFilter)
public static java.lang.String getJsFriendlyResourceName(java.lang.String resourcePath)
resourcePath
- absolute path to the resourcepublic static java.lang.String getRelativePathToRootLevel(Resource resource)
resource
- the resource from which to derive the pathpublic static java.util.List<Resource> getAllAngularPageComponents(Resource pageContentResource)
pageContentResource
- resource to search for componentspublic static Resource getAncestorTemplateResource(Resource resource, java.lang.String resourceType)
resource
- A resource that requires a template to renderpublic static java.lang.String getRelativeComponentPath(java.lang.String path)
path
- "Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"