Package com.adobe.aemds.guide.service
Interface GuideModelImporter
-
public interface GuideModelImporter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
createFormJsonFromSchema(SchemaImportOptions schemaImportOptions)
Returns JSON String of the schema depending on the schemaImportOptions.java.lang.String
createFragmentJsonFromSchema(SchemaImportOptions schemaImportOptions)
java.lang.String
getDefinitionOfElement(GuideSchemaType schemaType, java.lang.String schemaRef, java.lang.String rootName, java.lang.String bindRef)
Returns the definition of the element at the end of the bindRef.java.lang.String
getJSONHTMLFragmentOrForm(LazyLoadingOptions lazyLoadingOptions)
This API would return JSON or HTML for a on demand fragment panel or a list of JSON or HTML of all the on demand components of an AF The API is to be user with the following flags set in lazyLoadingOptions // Todo THIS API has to be marked private GET_CHILD_PANEL_JSON- GET_CHILD_FORM_JSON- GET_JSON_FOR_ALL_LAZY_CHILDERN- GET_CHILD_PANEL_HTML- GET_CHILD_FORM_HTML- GET_HTML_FOR_ALL_LAZY_CHILDREN- GET_RENDER_JSON_FOR_PARENT_FORM- GET_RENDER_HTML_FOR_PARENT_FORM - GET_PIGGY_BANKED_JSONjava.util.List<java.lang.String>
getLazyChildren(Resource guideContainer)
JSONArray
getRootElementsFromSchema(GuideSchemaType schemaType, java.lang.String schemaPath)
Depending on the schema Type, the API returns JSONArray containing root Elements of the XSD, Form Data Model or JSON SchemaJSONArray
getSchemaDefinitions(GuideSchemaType schemaType, java.lang.String schemaPath)
JSONObject
getSchemaJson(Resource guideContainerResource)
This API converts the XSD into a JSON representation that contains the values of minOccur, type, bindRef, defaultValue, maxOccur and nillable property for every Node.java.lang.String
getTypeOfElement(java.lang.String xsdRef, java.lang.String rootName, java.lang.String xPath)
JSONArray
getXDPFragmentSubForms(java.lang.String xfaPath)
JSONArray
getXSDComplexTypes(java.lang.String xsdPath)
JSONArray
getXSDRootElements(java.lang.String xsdPath)
java.lang.String
importFromDataDictionary(java.lang.String ddRef)
java.lang.String
importFromDataDictionary(Resource guideContainer)
java.util.Hashtable<java.lang.String,java.lang.Object>
importFromXFA(java.lang.String xfaFormdomJson, boolean saveXFAObjects)
java.lang.String
importFromXFA(Resource guideContainer)
java.lang.String
importFromXSD(java.io.InputStream xsdStream, java.lang.String rootElName, java.lang.String rootElNamespace)
java.lang.String
importFromXSD(java.lang.String xsdPath, java.lang.String elementName, java.lang.String elementNameSpace)
java.lang.String
importFromXSD(Resource guideContainer)
java.lang.String
importFromXSDForFragment(Resource guideContainer)
boolean
isSchemaValid(GuideSchemaType schemaType, java.lang.String schemaPath)
-
-
-
Method Detail
-
createFormJsonFromSchema
java.lang.String createFormJsonFromSchema(SchemaImportOptions schemaImportOptions) throws GuideException
Returns JSON String of the schema depending on the schemaImportOptions.- Parameters:
schemaImportOptions
-- Returns:
- Throws:
GuideException
-
createFragmentJsonFromSchema
java.lang.String createFragmentJsonFromSchema(SchemaImportOptions schemaImportOptions) throws GuideException
- Throws:
GuideException
-
importFromXSD
java.lang.String importFromXSD(Resource guideContainer) throws GuideException
- Throws:
GuideException
-
importFromXSD
java.lang.String importFromXSD(java.io.InputStream xsdStream, java.lang.String rootElName, java.lang.String rootElNamespace) throws GuideException
- Throws:
GuideException
-
getRootElementsFromSchema
JSONArray getRootElementsFromSchema(GuideSchemaType schemaType, java.lang.String schemaPath)
Depending on the schema Type, the API returns JSONArray containing root Elements of the XSD, Form Data Model or JSON Schema- Parameters:
schemaType
-schemaPath
-- Returns:
- Throws:
GuideException
-
importFromXFA
java.lang.String importFromXFA(Resource guideContainer) throws GuideException, DoRTemplateParsingException
-
importFromXFA
java.util.Hashtable<java.lang.String,java.lang.Object> importFromXFA(java.lang.String xfaFormdomJson, boolean saveXFAObjects) throws GuideException
- Throws:
GuideException
-
getXSDRootElements
JSONArray getXSDRootElements(java.lang.String xsdPath) throws GuideException
- Throws:
GuideException
-
importFromXSD
java.lang.String importFromXSD(java.lang.String xsdPath, java.lang.String elementName, java.lang.String elementNameSpace) throws GuideException
- Throws:
GuideException
-
getSchemaDefinitions
JSONArray getSchemaDefinitions(GuideSchemaType schemaType, java.lang.String schemaPath) throws GuideException
- Throws:
GuideException
-
isSchemaValid
boolean isSchemaValid(GuideSchemaType schemaType, java.lang.String schemaPath) throws GuideException
- Throws:
GuideException
-
importFromDataDictionary
java.lang.String importFromDataDictionary(Resource guideContainer) throws GuideException
- Throws:
GuideException
-
importFromDataDictionary
java.lang.String importFromDataDictionary(java.lang.String ddRef) throws GuideException
- Throws:
GuideException
-
getXDPFragmentSubForms
JSONArray getXDPFragmentSubForms(java.lang.String xfaPath) throws GuideException
- Throws:
GuideException
-
getXSDComplexTypes
JSONArray getXSDComplexTypes(java.lang.String xsdPath) throws GuideException
- Throws:
GuideException
-
importFromXSDForFragment
java.lang.String importFromXSDForFragment(Resource guideContainer) throws GuideException
- Throws:
GuideException
-
getTypeOfElement
java.lang.String getTypeOfElement(java.lang.String xsdRef, java.lang.String rootName, java.lang.String xPath) throws org.xml.sax.SAXException, JSONException
- Throws:
org.xml.sax.SAXException
JSONException
-
getJSONHTMLFragmentOrForm
java.lang.String getJSONHTMLFragmentOrForm(LazyLoadingOptions lazyLoadingOptions) throws GuideException
This API would return JSON or HTML for a on demand fragment panel or a list of JSON or HTML of all the on demand components of an AF The API is to be user with the following flags set in lazyLoadingOptions // Todo THIS API has to be marked private GET_CHILD_PANEL_JSON- GET_CHILD_FORM_JSON- GET_JSON_FOR_ALL_LAZY_CHILDERN- GET_CHILD_PANEL_HTML- GET_CHILD_FORM_HTML- GET_HTML_FOR_ALL_LAZY_CHILDREN- GET_RENDER_JSON_FOR_PARENT_FORM- GET_RENDER_HTML_FOR_PARENT_FORM - GET_PIGGY_BANKED_JSON- Parameters:
lazyLoadingOptions
-- Returns:
- string representing JSON or HTML for the on demand fragment
- Throws:
GuideException
-
getLazyChildren
java.util.List<java.lang.String> getLazyChildren(Resource guideContainer) throws GuideException
- Throws:
GuideException
-
getSchemaJson
JSONObject getSchemaJson(Resource guideContainerResource) throws GuideException
This API converts the XSD into a JSON representation that contains the values of minOccur, type, bindRef, defaultValue, maxOccur and nillable property for every Node.- Parameters:
guideContainerResource
-- Returns:
- JSONObject representing the XSD
- Throws:
GuideException
-
getDefinitionOfElement
java.lang.String getDefinitionOfElement(GuideSchemaType schemaType, java.lang.String schemaRef, java.lang.String rootName, java.lang.String bindRef) throws GuideException
Returns the definition of the element at the end of the bindRef. eg- if bindRef is a/b/c , it will return the type of c.- Parameters:
schemaType
- - type of schemaschemaRef
- - path of schema on CRXrootName
- - String, Name of the root element.bindRef
- - bindRef of the element.- Returns:
- String
- Throws:
GuideException
-
-