COLLECTION_RESOURCE_TYPE, COLLECTION_RESOURCE_TYPE_DESC, DEFAULT_COLLECTION_RESOURCE_TYPE, DEFAULT_ENABLED, DEFAULT_RESOURCE_TYPE, DEFAULT_SEARCH_PATH, DEFAULT_SERVER_URL, ENABLED, ENABLED_DESC, EXTERNAL_URL, EXTERNAL_URL_DESC, RESOURCE_TYPE, RESOURCE_TYPE_DESC, SEARCH_PATHS, SEARCH_PATHS_DESC| Constructor and Description |
|---|
HApiUtilImpl() |
| Modifier and Type | Method and Description |
|---|---|
HApiTypesCollection |
collectionFromPath(org.apache.sling.api.resource.ResourceResolver resolver,
String collectionPath)
Get a
HApiTypesCollection object from a path String. |
HApiTypesCollection |
collectionFromResource(org.apache.sling.api.resource.ResourceResolver resolver,
org.apache.sling.api.resource.Resource collectionResource)
Get a
HApiTypesCollection object from a Resource. |
HApiType |
fromNode(org.apache.sling.api.resource.ResourceResolver resolver,
javax.jcr.Node typeNode)
Deprecated.
|
HApiType |
fromPath(org.apache.sling.api.resource.ResourceResolver resolver,
String type)
Get a HApi type object from a type identifier.
|
HApiType |
fromResource(org.apache.sling.api.resource.ResourceResolver resolver,
org.apache.sling.api.resource.Resource typeResource)
Get a HApi type object from the
Resource. |
MicrodataAttributeHelper |
getHelper(org.apache.sling.api.resource.ResourceResolver resolver,
String type)
Get a new instance of AttributeHelper for the type identified by 'type'
|
org.apache.sling.api.resource.Resource |
getTypeCollectionResource(org.apache.sling.api.resource.ResourceResolver resolver,
String collection)
Get a HApi type collection Resource from a collection identifier.
|
javax.jcr.Node |
getTypeNode(org.apache.sling.api.resource.ResourceResolver resolver,
String type)
Deprecated.
|
org.apache.sling.api.resource.Resource |
getTypeResource(org.apache.sling.api.resource.ResourceResolver resolver,
String type)
Get a HApi type Resource from a type identifier.
|
@Deprecated public javax.jcr.Node getTypeNode(org.apache.sling.api.resource.ResourceResolver resolver, String type) throws javax.jcr.RepositoryException
Get a HApi type jcr node from a type identifier.
The JCR node must be [nt:unstructured], a descendant of any of the HAPi search path defined by the
HAPI_PATHS config and the sling:resourceType should be set to the value defined by the HAPI_RESOURCE_TYPE config
The first result is returned
getTypeNode in interface HApiUtilresolver - The sling resource resolver objecttype - The type identifier, which is either in the form of a jcr path,
same as the path for . If the path cannot be resolved, type is treated like
a fully qualified domain name, which has to match the "fqdn" property on the JCR node which represents the type.javax.jcr.RepositoryExceptionpublic org.apache.sling.api.resource.Resource getTypeResource(org.apache.sling.api.resource.ResourceResolver resolver,
String type)
Get a HApi type Resource from a type identifier.
The Resource must be [nt:unstructured], a descendant of any of the HAPi search path defined by the
HAPI_PATHS config and the sling:resourceType should be set to the value defined by the HapiUtil#RESOURCE_TYPE
config
The first result is returned
getTypeResource in interface HApiUtilresolver - The sling resource resolver objecttype - The type identifier, which is either in the form of a jcr path,
same as the path for . If the path cannot be resolved, type is treated like
a fully qualified domain name, which has to match the "fqdn" property on the Resource which represents the type.public org.apache.sling.api.resource.Resource getTypeCollectionResource(org.apache.sling.api.resource.ResourceResolver resolver,
String collection)
Get a HApi type collection Resource from a collection identifier.
The Resource must be [nt:unstructured], a descendant of any of the HAPi search path defined by the
HAPI_PATHS config and the sling:resourceType should be set to the value defined by the
HapiUtil#COLLECTION_RESOURCE_TYPE config
The first result is returned
getTypeCollectionResource in interface HApiUtilresolver - The sling resource resolver objectcollection - The collection identifier, which is either in the form of a jcr path,
same as the path for . If the path cannot be resolved, collection is
treated like a fully qualified domain name, which has to match the "fqdn" property on the Resource which
represents the type.public HApiType fromPath(org.apache.sling.api.resource.ResourceResolver resolver, String type) throws javax.jcr.RepositoryException
Get a HApi type object from a type identifier.
The type identifier is resolved to a Node and then
HApiUtil.fromNode(org.apache.sling.api.resource.ResourceResolver, javax.jcr.Node) is called.
For restrictions on the Node
see HApiUtil.getTypeNode(org.apache.sling.api.resource.ResourceResolver, String)
fromPath in interface HApiUtilresolver - The sling resource resolver objecttype - The type identifier, which is either in the form of a jcr path,
same as the path for. If the path cannot be resolved, type is treated like
a fully qualified domain name, which has to match the "fqdn" property on the JCR node which represents the type.javax.jcr.RepositoryException@Deprecated public HApiType fromNode(org.apache.sling.api.resource.ResourceResolver resolver, javax.jcr.Node typeNode) throws javax.jcr.RepositoryException
Get a HApi type object from the Node.
The properties of this type are defined as children nodes.
The name of property node defines the name of the property for this type.
The children property nodes have the following properties:HApiUtil.getTypeNode(org.apache.sling.api.resource.ResourceResolver, String)
for the format of this valuepublic HApiType fromResource(org.apache.sling.api.resource.ResourceResolver resolver, org.apache.sling.api.resource.Resource typeResource) throws javax.jcr.RepositoryException
Get a HApi type object from the Resource.
The properties of this type are defined as children resources.
The name of property resource defines the name of the property for this type.
The children property nodes have the following properties:HApiUtil.getTypeNode(org.apache.sling.api.resource.ResourceResolver, String)
for the format of this valuefromResource in interface HApiUtilresolver - The resource resolvertypeResource - The sling Resource of the HApi typejavax.jcr.RepositoryExceptionpublic HApiTypesCollection collectionFromResource(org.apache.sling.api.resource.ResourceResolver resolver, org.apache.sling.api.resource.Resource collectionResource) throws javax.jcr.RepositoryException
Get a HApiTypesCollection object from a Resource.
The types collection will be populated with direct child Resources of the {{collectionResource}},
which have the resourceType equal to the value of the HApiUtil.RESOURCE_TYPE property
collectionFromResource in interface HApiUtilresolver - The resource resolvercollectionResource - The sling Resource of the HApi type collectionjavax.jcr.RepositoryExceptionpublic HApiTypesCollection collectionFromPath(org.apache.sling.api.resource.ResourceResolver resolver, String collectionPath) throws javax.jcr.RepositoryException
Get a HApiTypesCollection object from a path String.
collectionFromPath in interface HApiUtilresolver - The resource resolvercollectionPath - The sling resource path of the HApi type collectionjavax.jcr.RepositoryExceptionpublic MicrodataAttributeHelper getHelper(org.apache.sling.api.resource.ResourceResolver resolver, String type) throws javax.jcr.RepositoryException
getHelper in interface HApiUtiltype - See HApiUtil.getTypeNode(org.apache.sling.api.resource.ResourceResolver, String)
for the format of the type identifierjavax.jcr.RepositoryExceptionCopyright © 2007–2017 The Apache Software Foundation. All rights reserved.