org.apache.sling.hapi.sightly

## Class HApiUse

- java.lang.Object
- - org.apache.sling.hapi.sightly.HApiUse

All Implemented Interfaces:
  org.apache.sling.scripting.sightly.pojo.Use

    @ProviderType
    public class HApiUse
    extends Object
    implements org.apache.sling.scripting.sightly.pojo.Use

Sightly use class helper to provide the hypermedia API microdata attributes for the type configured throught the 'type' binding.

The type can be a JCR path or a fully qualified domain name like in `HApiUtil.getTypeNode(org.apache.sling.api.resource.ResourceResolver, String)`

The convenience get methods are meant to be used in the 'data-sly-attribute' in the sightly script.

### Constructor Summary

Constructors
Constructor and Description
`HApiUse()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `activate()` Initializes the helper and the attribute maps for the given type though the bindings
`Map<String,Map<String,String>>` `getItemprop()` Get the itemprop attributes map for the type, for each property.
`Map<String,String>` `getItemtype()` Get the itemtype html attributes map for the type
`Map<String,String>` `getProptype()` Get a map of the type for each property name of the type The key is the property name and the value is the type path in JCR
`void` `init(Bindings bindings)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### HApiUse

    public HApiUse()

### Method Detail

#### init

    public void init(Bindings bindings)

Specified by:
  `init` in interface `org.apache.sling.scripting.sightly.pojo.Use`
Parameters:
  `bindings` -

#### activate

    public void activate()
                  throws Exception

Initializes the helper and the attribute maps for the given type though the bindings

Throws:
  `Exception`

#### getItemtype

    public Map<String,String> getItemtype()

Get the itemtype html attributes map for the type

Returns:

#### getItemprop

    public Map<String,Map<String,String>> getItemprop()

Get the itemprop attributes map for the type, for each property. The key is the property name and the value is a map of html attributes for the property

Returns:

#### getProptype

    public Map<String,String> getProptype()

Get a map of the type for each property name of the type The key is the property name and the value is the type path in JCR

Returns: