com.adobe.dct.service
Interface DataDictionaryUtilService


public interface DataDictionaryUtilService

This defines all the utility API's for Data Dictionary, like, importing and exporting Data Dictionary into supported formats.


Method Summary
 DataDictionaryInstance createDataDictionaryInstance(java.lang.String dataDictionaryName, java.util.Map ddiValues)
          This API creates a data dictionary instance(DDI to be used at runtime) corresponding to a Data Dictionary with data for the fields coming from passed in ddiValues map.
 DataDictionaryInstance createDDInstanceFromPOJO(java.lang.String dataDictionaryId, java.lang.Object pojo)
          This API creates a Data Dictionary Instance (to be used at runtime) corresponding to a Data Dictionary with data for its child elements coming from input POJO.
 DataDictionaryInstance createDDInstanceFromXml(java.lang.String dataDictionaryName, java.lang.String xml)
          This API creates a data dictionary instance(DDI to be used at runtime) corresponding to a Data Dictionary with data for the fields coming from passed XML.
 DataDictionaryInstance createDDInstanceFromXml(java.lang.String dataDictionaryName, java.lang.String xml, DDIOptionsSpec ddiOptionsSpec)
          This API creates a data dictionary instance(DDI to be used at runtime) corresponding to a Data Dictionary with data for the fields coming from passed XML.
 java.lang.String exportDataDictionaryAsFML(java.lang.String dataDictionaryId)
          This API exports a data dictionary into a fiber model which can imported back to obtain the data dictionary.
 byte[] exportLocalizationInformation(DataDictionary dataDictionary)
          Exports the localization information for the given Data Dictionary.
 DataDictionary getDataDictionaryFromFML(java.lang.String dataDictionaryName, java.lang.String fml)
          Deprecated. 
 DataDictionary getDataDictionaryFromFML2(java.lang.String dataDictionaryName, java.lang.String fml, java.lang.String topLevelEntityName, java.lang.String serviceName, java.lang.String operationName)
          This API generates a data dictionary from the passed Fiber Model.
 DataDictionary getDataDictionaryFromXSD(java.lang.String dataDictionaryName, java.lang.String xmlSchema, java.lang.String elementName)
          This API generates a data dictionary from the passed XSD.
 DataDictionaryInstance getDDIFromRemotingService(java.lang.String dataDictionaryId, java.lang.Object[] remotingServiceOperationParams)
          This API uses the LCDS Remoting Service details from the Data Dictionary and connects to the same for making a LCDS Remoting invocation.
 java.util.List getElementsFromComputedDDE(DataDictionaryElement dataDictionaryElement, DataDictionary dataDictionary)
          This API parses the expression in the computed Data Dictionary Element and returns a list of Data Dictionary Elements used within the expression.
 java.lang.String getSampleXMLDataForDD(java.lang.String dataDictionaryId)
          This API generates a sample XML data which can be modified and passed for creating a data dictionary instance.
 boolean hasCommonCollectionHierarchy(java.lang.String dataDictionaryId, java.util.List listHavingListOfDDEDisplayNames)
          This API verifies whether the collection elements are used in appropriate hierarchy.
 DataDictionary importLocalizationInformation(DataDictionary dataDictionary, byte[] data)
          Imports the localization data for given Data Dictionary.
 java.lang.String serializeDDItoXML(DataDictionaryInstance ddi)
          This API generates a XML data representing the input Data Dictionary Instance.
 

Method Detail

createDDInstanceFromXml

DataDictionaryInstance createDDInstanceFromXml(java.lang.String dataDictionaryName,
                                               java.lang.String xml)
                                               throws DCTException
This API creates a data dictionary instance(DDI to be used at runtime) corresponding to a Data Dictionary with data for the fields coming from passed XML.

Parameters:
dataDictionaryName - data dictionary name
xml - xml data
Returns:
data dictionary instance
Throws:
DCTException

createDDInstanceFromXml

DataDictionaryInstance createDDInstanceFromXml(java.lang.String dataDictionaryName,
                                               java.lang.String xml,
                                               DDIOptionsSpec ddiOptionsSpec)
                                               throws DCTException
This API creates a data dictionary instance(DDI to be used at runtime) corresponding to a Data Dictionary with data for the fields coming from passed XML.

Parameters:
dataDictionaryName - data dictionary name
xml - xml data
ddiOptionsSpec - options spec for generating data dictionary innstance
Returns:
data dictionary instance
Throws:
DCTException

createDataDictionaryInstance

DataDictionaryInstance createDataDictionaryInstance(java.lang.String dataDictionaryName,
                                                    java.util.Map ddiValues)
                                                    throws DCTException
This API creates a data dictionary instance(DDI to be used at runtime) corresponding to a Data Dictionary with data for the fields coming from passed in ddiValues map.

Parameters:
dataDictionaryName - data dictionary name
ddiValues - Map containing the reference name versus values of the Data Dictionary elements
Returns:
DataDictionaryInstance
Throws:
DCTException

createDDInstanceFromPOJO

DataDictionaryInstance createDDInstanceFromPOJO(java.lang.String dataDictionaryId,
                                                java.lang.Object pojo)
                                                throws DCTException
This API creates a Data Dictionary Instance (to be used at runtime) corresponding to a Data Dictionary with data for its child elements coming from input POJO.

Parameters:
dataDictionaryId - Id of Data Dictionary for which DDI is to be constructed
pojo - used to instantiate the DDI
Returns:
data dictionary instance
Throws:
DCTException
Since:
10.0.0.0

exportDataDictionaryAsFML

java.lang.String exportDataDictionaryAsFML(java.lang.String dataDictionaryId)
                                           throws DCTException
This API exports a data dictionary into a fiber model which can imported back to obtain the data dictionary.

Parameters:
dataDictionaryId - data dictionary identifier
Returns:
exported Fiber Model corresponding to Data Dictionary
Throws:
DCTException

getDataDictionaryFromXSD

DataDictionary getDataDictionaryFromXSD(java.lang.String dataDictionaryName,
                                        java.lang.String xmlSchema,
                                        java.lang.String elementName)
                                        throws DCTException
This API generates a data dictionary from the passed XSD.

Parameters:
dataDictionaryName - name by which the data dictionary is to be generated
xmlSchema - XSD for creating data dictionary
elementName - the top level element to be picked from XSD for creating data dictionary
Returns:
data dictionary
Throws:
DCTException

getDataDictionaryFromFML

@Deprecated
DataDictionary getDataDictionaryFromFML(java.lang.String dataDictionaryName,
                                                   java.lang.String fml)
                                        throws DCTException
Deprecated. 

This API generates a data dictionary from the passed Fiber Model. It only supports the FML files which has been previously exported from the Data Dictionary building block. If any other FML is passed as input then this API throws appropriate exception. This API has been marked @deprecated as newer API getDataDictionaryFromFML2 has been introduced which also supports FML files retrieved from the Flash Builder.

Parameters:
dataDictionaryName - name by which the data dictionary is to be generated
fml - Fiber Model for creating data dictionary
Returns:
data dictionary
Throws:
DCTException

getDataDictionaryFromFML2

DataDictionary getDataDictionaryFromFML2(java.lang.String dataDictionaryName,
                                         java.lang.String fml,
                                         java.lang.String topLevelEntityName,
                                         java.lang.String serviceName,
                                         java.lang.String operationName)
                                         throws DCTException
This API generates a data dictionary from the passed Fiber Model.

Parameters:
dataDictionaryName - name by which the data dictionary is to be generated
fml - Fiber Model for creating data dictionary
topLevelEntityName - the top level entity to be picked from FML for creating data dictionary
serviceName - is used to select the Service if there are more then one services defined in the FML.
operationName - is used to select the Operation if there are more then one operations available in the selected Service..
Returns:
data dictionary
Throws:
DCTException
Since:
10.0.0.0

getSampleXMLDataForDD

java.lang.String getSampleXMLDataForDD(java.lang.String dataDictionaryId)
                                       throws DCTException
This API generates a sample XML data which can be modified and passed for creating a data dictionary instance.

Parameters:
dataDictionaryId - data dictionary identifier
Returns:
sample XML corresponding to data dictionary
Throws:
DCTException

serializeDDItoXML

java.lang.String serializeDDItoXML(DataDictionaryInstance ddi)
                                   throws DCTException
This API generates a XML data representing the input Data Dictionary Instance.

Parameters:
ddi - Data Dictionary Instance that is to be serialized to XML.
Returns:
XML representing the Data Dictionary Instance
Throws:
DCTException

hasCommonCollectionHierarchy

boolean hasCommonCollectionHierarchy(java.lang.String dataDictionaryId,
                                     java.util.List listHavingListOfDDEDisplayNames)
                                     throws DCTException
This API verifies whether the collection elements are used in appropriate hierarchy. Two important rules are applied in order to verify the same. First one is make sure that all collection elements at the same level have a common collection hierarchy. Second one is that the collection elements used at higher levels should extend the deepest element (as per Data Dictionary hierarchy) of the lower level.

Parameters:
dataDictionaryId - is the ID of Data Dictionary for which the elements are to be validated
listHavingListsOfDDEDisplayNames - list containing lists of DDE display names (at different levels)
Returns:
boolean specifying whether the collection elements are used in appropriate hierarchy
Throws:
DCTException

getDDIFromRemotingService

DataDictionaryInstance getDDIFromRemotingService(java.lang.String dataDictionaryId,
                                                 java.lang.Object[] remotingServiceOperationParams)
                                                 throws DCTException
This API uses the LCDS Remoting Service details from the Data Dictionary and connects to the same for making a LCDS Remoting invocation. The POJO instance obtained from the invocation is then used to create a Data Dictionary Instance.

Parameters:
dataDictionaryId - Data Dictionary Id for which the Data Dictionary Instance is to be retrieved.
remotingServiceOperationParams - These parameters are passed to the LCDS Remoting operation.
Returns:
DataDictionaryInstance constructed using POJO instance obtained from remoting invocation.
Throws:
DCTException
Since:
10.0.0.0

getElementsFromComputedDDE

java.util.List getElementsFromComputedDDE(DataDictionaryElement dataDictionaryElement,
                                          DataDictionary dataDictionary)
                                          throws DCTException
This API parses the expression in the computed Data Dictionary Element and returns a list of Data Dictionary Elements used within the expression.

Parameters:
dataDictionaryElement - Computed Data Dictionary Element for which the expression is parsed
Returns:
List of Data Dictionary Elements used within the expression
Throws:
DCTException

exportLocalizationInformation

byte[] exportLocalizationInformation(DataDictionary dataDictionary)
                                     throws DCTException
Exports the localization information for the given Data Dictionary. The information is written into resource bundle files which are then packaged into a zip. This zip is the returned as byte array.

Parameters:
dataDictionary - Data Dictionary for which localization information is retrieved
Returns:
byte array containing localization information in form of zip file
Throws:
DCTException

importLocalizationInformation

DataDictionary importLocalizationInformation(DataDictionary dataDictionary,
                                             byte[] data)
                                             throws DCTException
Imports the localization data for given Data Dictionary. This localization information is bytes of zip file containing resource bundles

Parameters:
dataDictionary - Data Dictionary to localize
data - bytes of zip file containing resource bundles
Returns:
dataDictionary containing updated localization information
Throws:
DCTException


[an error occurred while processing this directive] [an error occurred while processing this directive]