Class HApiUse

    • Constructor Detail

      • HApiUse

        public HApiUse()
    • Method Detail

      • init

        public void init​(Bindings bindings)

        Called to initialize the Java object with the current Java Scripting API bindings.

        This method is called only if the object has been instantiated by HTL as part of processing the data-sly-use attribute. The Java Scripting API bindings provide all the global variables known to a script being executed.

        Specified by:
        init in interface 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: