public interface HApiUtil
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_RESOURCE_TYPE |
| Modifier and Type | Method and Description |
|---|---|
HApiType |
fromNode(ResourceResolver resolver,
Node typeNode)
Get a HApi type object from the
javax.jcr.Node. |
HApiType |
fromPath(ResourceResolver resolver,
java.lang.String type)
Get a HApi type object from a type identifier.
|
MicrodataAttributeHelper |
getHelper(ResourceResolver resolver,
java.lang.String type)
Get a new instance of AttributeHelper for the type identified by 'type'
|
Node |
getTypeNode(ResourceResolver resolver,
java.lang.String type)
Get a HApi type object from a type identifier.
|
static final java.lang.String DEFAULT_RESOURCE_TYPE
Node getTypeNode(ResourceResolver resolver, java.lang.String type) throws RepositoryException
Get a HApi type object 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
resolver - 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.RepositoryExceptionHApiType fromPath(ResourceResolver resolver, java.lang.String type) throws RepositoryException
Get a HApi type object from a type identifier.
The type identifier is resolved to a javax.jcr.Node and then
#fromNode(org.apache.sling.api.resource.ResourceResolver, javax.jcr.Node) is called.
For restrictions on the javax.jcr.Node
see getTypeNode(org.apache.sling.api.resource.ResourceResolver, String)
resolver - 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.RepositoryExceptionRepositoryExceptionHApiType fromNode(ResourceResolver resolver, Node typeNode) throws RepositoryException
Get a HApi type object from the javax.jcr.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:getTypeNode(org.apache.sling.api.resource.ResourceResolver, String)
for the format of this valueresolver - The resource resolvertypeNode - The jcr node of the HApi typeRepositoryExceptionMicrodataAttributeHelper getHelper(ResourceResolver resolver, java.lang.String type) throws RepositoryException
resolver - type - See getTypeNode(org.apache.sling.api.resource.ResourceResolver, String)
for the format of the type identifierRepositoryException"Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"