Class DtoToSchema


  • public class DtoToSchema
    extends Object
    Assembles the DIF schema from the DTOs provided by the service tier.
    Author:
    Martin Adamek
    • Constructor Summary

      Constructors 
      Constructor Description
      DtoToSchema​(org.springframework.beans.factory.ListableBeanFactory beanFactory, Properties props, boolean adminRole)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void addChildVertex​(com.chemaxon.dif.db.api.schema.DBSchemaImpl schema, com.im.df.api.ddl.DFDataTree.Vertex parent, com.im.ijcs.api.ddl.dto.DataTreeInfo.ChildVertexDTO childBean, com.im.commons.progress.DFEnvironmentRW env)  
      static com.chemaxon.dif.db.api.datatree.DataTreeImpl createDataTreeFromDTO​(com.chemaxon.dif.db.api.schema.DBSchemaImpl schema, com.im.ijcs.api.ddl.dto.ModelInfo modelInfo, com.im.ijcs.api.ddl.dto.ItemPersistentInfo dto, Map<String,​com.im.df.api.support.SortDirective> initialSortDirectives, com.im.commons.progress.DFEnvironmentRW env)  
      static com.im.df.api.ddl.DFExportTemplate createExportTemplateFromDTO​(String username, com.im.df.api.ddl.DFDataTree dataTree, com.im.ijcs.api.ddl.dto.ExportTemplateInfo exportTemplateInfo)
      Creates DFExportTemplate from ExportTemplateInfo.
      static com.im.df.api.ddl.DFField createFieldFromDTO​(String username, com.chemaxon.dif.db.api.entity.DBEntityAbstractImpl entity, com.im.ijcs.api.ddl.dto.ModelInfo modelInfo, com.im.ijcs.api.ddl.dto.AbstractFieldInfo dto, com.im.commons.progress.DFEnvironmentRW env)  
      static com.chemaxon.dif.db.api.query.QueryImpl createQueryFromDTO​(String username, com.im.df.api.ddl.DFDataTree parent, com.im.ijcs.api.ddl.dto.QueryInfo qInfo, com.im.commons.progress.DFEnvironmentRW env)  
      static com.im.df.api.ddl.DFRelationship createRelationshipFromDTO​(com.chemaxon.dif.db.api.schema.DBSchemaImpl parent, com.im.ijcs.api.ddl.dto.ItemPersistentInfo dto, com.im.commons.progress.DFEnvironmentRW env)  
      static com.chemaxon.dif.db.api.script.ScriptImpl createScriptFromDTO​(String username, com.im.df.api.ddl.DFScriptParent scriptParent, com.im.ijcs.api.ddl.dto.ModelInfo modelInfo, com.im.ijcs.api.ddl.dto.ItemPersistentInfo dto, com.im.commons.progress.DFEnvironmentRW env)  
      static com.im.df.api.dml.DFTermExpression deserializeQueryContents​(com.im.df.api.ddl.DFSchema schema, String xml)  
      static com.chemaxon.dif.db.api.datatree.DataTreeImpl initAndRegisterDataTree​(com.chemaxon.dif.db.api.schema.DBSchemaImpl schema, String id, String name, String description, com.im.df.api.ddl.DFEntity rootEntity, Map<String,​com.im.df.api.support.SortDirective> initialSortDirectives, com.im.commons.progress.DFEnvironmentRW env)  
      static com.chemaxon.dif.db.api.script.ScriptImpl initAndRegisterScript​(com.im.df.api.ddl.DFScriptParent scriptParent, String id, String name, String description, int sharingCode, String owner, boolean iAmOwner, com.im.ijcs.api.ddl.dto.ScriptXml scriptXml, com.im.commons.progress.DFEnvironmentRW env)  
      com.chemaxon.dif.db.spi.ddl.DFSchemaAccess readSchema​(com.im.ijcs.api.ddl.dto.ModelInfo modelInfo, boolean ddlEditorRole, boolean dmlEditorRole, com.im.commons.progress.DFEnvironmentRO env)  
    • Constructor Detail

      • DtoToSchema

        public DtoToSchema​(org.springframework.beans.factory.ListableBeanFactory beanFactory,
                           Properties props,
                           boolean adminRole)
    • Method Detail

      • readSchema

        public com.chemaxon.dif.db.spi.ddl.DFSchemaAccess readSchema​(com.im.ijcs.api.ddl.dto.ModelInfo modelInfo,
                                                                     boolean ddlEditorRole,
                                                                     boolean dmlEditorRole,
                                                                     com.im.commons.progress.DFEnvironmentRO env)
                                                              throws IOException
        Throws:
        IOException
      • createScriptFromDTO

        public static com.chemaxon.dif.db.api.script.ScriptImpl createScriptFromDTO​(String username,
                                                                                    com.im.df.api.ddl.DFScriptParent scriptParent,
                                                                                    com.im.ijcs.api.ddl.dto.ModelInfo modelInfo,
                                                                                    com.im.ijcs.api.ddl.dto.ItemPersistentInfo dto,
                                                                                    com.im.commons.progress.DFEnvironmentRW env)
      • initAndRegisterScript

        public static com.chemaxon.dif.db.api.script.ScriptImpl initAndRegisterScript​(com.im.df.api.ddl.DFScriptParent scriptParent,
                                                                                      String id,
                                                                                      String name,
                                                                                      String description,
                                                                                      int sharingCode,
                                                                                      String owner,
                                                                                      boolean iAmOwner,
                                                                                      com.im.ijcs.api.ddl.dto.ScriptXml scriptXml,
                                                                                      com.im.commons.progress.DFEnvironmentRW env)
      • createExportTemplateFromDTO

        public static com.im.df.api.ddl.DFExportTemplate createExportTemplateFromDTO​(String username,
                                                                                     com.im.df.api.ddl.DFDataTree dataTree,
                                                                                     com.im.ijcs.api.ddl.dto.ExportTemplateInfo exportTemplateInfo)
        Creates DFExportTemplate from ExportTemplateInfo.
        Parameters:
        username - name of user
        dataTree - data tree
        exportTemplateInfo - info object with data for export template
        Returns:
        DFExportTemplate object or will throw IllegalStateException if the conversion of XML content from ExportTemplateInfo fails
      • createQueryFromDTO

        public static com.chemaxon.dif.db.api.query.QueryImpl createQueryFromDTO​(String username,
                                                                                 com.im.df.api.ddl.DFDataTree parent,
                                                                                 com.im.ijcs.api.ddl.dto.QueryInfo qInfo,
                                                                                 com.im.commons.progress.DFEnvironmentRW env)
      • deserializeQueryContents

        public static com.im.df.api.dml.DFTermExpression deserializeQueryContents​(com.im.df.api.ddl.DFSchema schema,
                                                                                  String xml)
                                                                           throws IOException
        Throws:
        IOException
      • createFieldFromDTO

        public static com.im.df.api.ddl.DFField createFieldFromDTO​(String username,
                                                                   com.chemaxon.dif.db.api.entity.DBEntityAbstractImpl entity,
                                                                   com.im.ijcs.api.ddl.dto.ModelInfo modelInfo,
                                                                   com.im.ijcs.api.ddl.dto.AbstractFieldInfo dto,
                                                                   com.im.commons.progress.DFEnvironmentRW env)
      • createRelationshipFromDTO

        public static com.im.df.api.ddl.DFRelationship createRelationshipFromDTO​(com.chemaxon.dif.db.api.schema.DBSchemaImpl parent,
                                                                                 com.im.ijcs.api.ddl.dto.ItemPersistentInfo dto,
                                                                                 com.im.commons.progress.DFEnvironmentRW env)
      • createDataTreeFromDTO

        public static com.chemaxon.dif.db.api.datatree.DataTreeImpl createDataTreeFromDTO​(com.chemaxon.dif.db.api.schema.DBSchemaImpl schema,
                                                                                          com.im.ijcs.api.ddl.dto.ModelInfo modelInfo,
                                                                                          com.im.ijcs.api.ddl.dto.ItemPersistentInfo dto,
                                                                                          Map<String,​com.im.df.api.support.SortDirective> initialSortDirectives,
                                                                                          com.im.commons.progress.DFEnvironmentRW env)
      • initAndRegisterDataTree

        public static com.chemaxon.dif.db.api.datatree.DataTreeImpl initAndRegisterDataTree​(com.chemaxon.dif.db.api.schema.DBSchemaImpl schema,
                                                                                            String id,
                                                                                            String name,
                                                                                            String description,
                                                                                            com.im.df.api.ddl.DFEntity rootEntity,
                                                                                            Map<String,​com.im.df.api.support.SortDirective> initialSortDirectives,
                                                                                            com.im.commons.progress.DFEnvironmentRW env)
      • addChildVertex

        public static void addChildVertex​(com.chemaxon.dif.db.api.schema.DBSchemaImpl schema,
                                          com.im.df.api.ddl.DFDataTree.Vertex parent,
                                          com.im.ijcs.api.ddl.dto.DataTreeInfo.ChildVertexDTO childBean,
                                          com.im.commons.progress.DFEnvironmentRW env)