public class FrameworkContentExporterUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
NG_FRAMEWORK_TYPE_ID |
static String |
NG_PAGE_RESOURCE_TYPE |
static String |
NG_REDIRECT_RESOURCE_TYPE |
Constructor and Description |
---|
FrameworkContentExporterUtils() |
Modifier and Type | Method and Description |
---|---|
static List<Page> |
getAllAngularDescendantPages(Page page,
PageFilter pageFilter) |
static 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,
String resourceType)
Determines the nearest ancestor template resource.
|
static String |
getJsFriendlyResourceName(String resourcePath)
Returns a Javascript-friendly String to identify this resource.
|
static long |
getMillisecondsSinceUnixEpoch()
Returns the number of milliseconds since the UNIX epoch.
|
static String |
getPathToAsset(Resource parentResource,
String absoluteDescendantAssetPath,
boolean appExport)
Returns a path to the given asset.
|
static String |
getRelativeComponentPath(String path)
Trims a component path down to the substring following "jcr:content/".
|
static String |
getRelativePathToDescendantPath(Resource parentResource,
String absoluteDescendantPath)
Returns a relative path from the parentResource to the absoluteDescendantPath
|
static String |
getRelativePathToDescendantResource(Resource parentResource,
Resource descendantResource)
Returns a relative path from the parentResource to the descendantResource.
|
static 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 String NG_PAGE_RESOURCE_TYPE
public static final String NG_REDIRECT_RESOURCE_TYPE
public static final String NG_FRAMEWORK_TYPE_ID
public static String getRelativePathToDescendantResource(Resource parentResource, Resource descendantResource)
parentResource
- resulting path will be relative from this resourcedescendantResource
- descendant resource. Must be a descendant of parentResourcepublic static String getRelativePathToDescendantPath(Resource parentResource, String absoluteDescendantPath)
parentResource
- resulting path will be relative from this resourceabsoluteDescendantPath
- path to a descendant of parentResourcepublic static String getPathToAsset(Resource parentResource, 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 List<Page> getAllAngularDescendantPages(Page page, PageFilter pageFilter)
public static String getJsFriendlyResourceName(String resourcePath)
resourcePath
- absolute path to the resourcepublic static String getRelativePathToRootLevel(Resource resource)
resource
- the resource from which to derive the pathpublic static List<Resource> getAllAngularPageComponents(Resource pageContentResource)
pageContentResource
- resource to search for componentspublic static Resource getAncestorTemplateResource(Resource resource, String resourceType)
resource
- A resource that requires a template to render"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"