Class SchemaFormHelper


  • public class SchemaFormHelper
    extends Object
    this is an internal class to be used by dam code.
    • Constructor Detail

      • SchemaFormHelper

        public SchemaFormHelper()
    • Method Detail

      • getMasterForms

        @Deprecated
        public static List<Resource> getMasterForms​(Resource currentForm,
                                                    String formsBaseDirPath)
                                             throws RepositoryException
        Deprecated.
        Use getMasterForms(Resource resource) instead
        Given current form, returns a list of master. Looks for master forms up in the path heirarchy, while traversing it takes into account any override available in apps
        Parameters:
        currentForm - current form resource
        Returns:
        list of master form resource, empty list if no master is found
        Throws:
        RepositoryException
      • getBaseFormPaths

        public static String[] getBaseFormPaths​(ResourceResolver resourceResolver)
        Returns:
        Metadata Schema provides a OOTB form. And User can overlay this form as per use case. It returns list of form path homes (Overlay, OOTB) in the order. e.g. [/conf/metdataschema, /libs/metadataschema]
      • getMasterForms

        public static List<Resource> getMasterForms​(Resource currentForm)
                                             throws RepositoryException
        Given current form, returns a list of master. Looks for master forms up in the path heirarchy, while traversing it takes into account any override available in apps
        Parameters:
        currentForm - current form resource
        Returns:
        list of master form resource, empty list if no master is found
        Throws:
        RepositoryException
        NullPointerException
      • mergeFormTabResource

        public static Resource mergeFormTabResource​(Resource oneTabList,
                                                    Resource otherTabList)
        Merge two list of tabs i.e. form/items/tabs
        Parameters:
        oneTabList - resource representing one tab list
        otherTabList - resource representing other tab list
        Returns:
        merged tab list resource