Search in sources :

Example 1 with DatatableProperties

use of io.clownfish.clownfish.jdbc.DatatableProperties in project Clownfish by rawdog71.

the class DatabaseUtil method manageTableUpdate.

private boolean manageTableUpdate(Connection con, DatabaseMetaData dmd, String tablename, HashMap<String, DatatableUpdateProperties> datatableproperties, HashMap<String, ArrayList> dbtables, HashMap<String, Object> dbvalues) {
    Statement stmt = null;
    try {
        TableFieldStructure tfs = getTableFieldsList(dmd, tablename, "");
        DatatableUpdateProperties dtup = datatableproperties.get(tablename);
        StringBuilder sql_update_values = new StringBuilder();
        dtup.getValuelist().stream().map((dtuv) -> {
            sql_update_values.append(dtuv.getField());
            return dtuv;
        }).forEach((dtuv) -> {
            sql_update_values.append(" = ");
            String fieldType = getFieldType(tfs.getTableFieldsList(), dtuv.getField());
            if (null != fieldType) {
                if ((fieldType.compareToIgnoreCase("string") == 0) || (fieldType.compareToIgnoreCase("date") == 0)) {
                    sql_update_values.append("'");
                }
                sql_update_values.append(dtuv.getValue());
                if ((fieldType.compareToIgnoreCase("string") == 0) || (fieldType.compareToIgnoreCase("date") == 0)) {
                    sql_update_values.append("'");
                }
                sql_update_values.append(", ");
            }
        });
        sql_update_values.delete(sql_update_values.length() - 2, sql_update_values.length());
        StringBuilder sql_update = new StringBuilder();
        sql_update.append("UPDATE ");
        sql_update.append(tablename);
        sql_update.append(" SET ");
        sql_update.append(sql_update_values);
        StringBuilder sql_condition = new StringBuilder();
        if (null != dtup) {
            sql_condition = buildCondition(dtup.getConditionlist(), tfs.getTableFieldsList());
        }
        sql_update.append(sql_condition);
        stmt = con.createStatement();
        int count = stmt.executeUpdate(sql_update.toString());
        boolean ok = false;
        if (count > 0) {
            ok = true;
        }
        return ok;
    } catch (SQLException ex) {
        LOGGER.error(ex.getMessage());
        return false;
    } finally {
        if (null != stmt) {
            try {
                stmt.close();
            } catch (SQLException ex) {
                LOGGER.error(ex.getMessage());
            }
        }
    }
}
Also used : Connection(java.sql.Connection) Logger(org.slf4j.Logger) LoggerFactory(org.slf4j.LoggerFactory) CfDatasource(io.clownfish.clownfish.dbentities.CfDatasource) Autowired(org.springframework.beans.factory.annotation.Autowired) DatabaseMetaData(java.sql.DatabaseMetaData) HashMap(java.util.HashMap) TableFieldStructure(io.clownfish.clownfish.jdbc.TableFieldStructure) ArrayList(java.util.ArrayList) DatatableUpdateProperties(io.clownfish.clownfish.jdbc.DatatableUpdateProperties) DatatableCondition(io.clownfish.clownfish.jdbc.DatatableCondition) DatatableProperties(io.clownfish.clownfish.jdbc.DatatableProperties) TableField(io.clownfish.clownfish.jdbc.TableField) SQLException(java.sql.SQLException) List(java.util.List) Component(org.springframework.stereotype.Component) JDBCUtil(io.clownfish.clownfish.jdbc.JDBCUtil) ResultSet(java.sql.ResultSet) CfDatasourceService(io.clownfish.clownfish.serviceinterface.CfDatasourceService) Statement(java.sql.Statement) DatatableNewProperties(io.clownfish.clownfish.jdbc.DatatableNewProperties) DatatableDeleteProperties(io.clownfish.clownfish.jdbc.DatatableDeleteProperties) CfSitedatasource(io.clownfish.clownfish.dbentities.CfSitedatasource) TableFieldStructure(io.clownfish.clownfish.jdbc.TableFieldStructure) SQLException(java.sql.SQLException) Statement(java.sql.Statement) DatatableUpdateProperties(io.clownfish.clownfish.jdbc.DatatableUpdateProperties)

Example 2 with DatatableProperties

use of io.clownfish.clownfish.jdbc.DatatableProperties in project Clownfish by rawdog71.

the class ClownfishUtil method getDatatableproperties.

/*
        getDatatableproperties
        Setzt die Properties für ein DB READ Aufruf
    */
public HashMap<String, DatatableProperties> getDatatableproperties(List<JsonFormParameter> postmap) {
    HashMap<String, DatatableProperties> datatableproperties = new HashMap<>();
    if (postmap != null) {
        for (JsonFormParameter jfp : postmap) {
            // Datenbank READ Parameter
            if (jfp.getName().compareToIgnoreCase("db$table") == 0) {
                if (datatableproperties.get(jfp.getValue()) == null) {
                    DatatableProperties dtp = new DatatableProperties();
                    dtp.setTablename(jfp.getValue());
                    datatableproperties.put(jfp.getValue(), dtp);
                }
            }
            if (jfp.getName().startsWith("db$table$")) {
                String rest = jfp.getName().substring(9);
                String[] values = rest.split("\\$");
                if (values[1].compareToIgnoreCase("orderby") == 0) {
                    if (datatableproperties.isEmpty()) {
                        DatatableProperties dtp = new DatatableProperties();
                        dtp.setTablename(values[0]);
                        datatableproperties.put(values[0], dtp);
                    }
                    datatableproperties.get(values[0]).setOrderby(jfp.getValue());
                }
                if (values[1].compareToIgnoreCase("orderdir") == 0) {
                    if (datatableproperties.isEmpty()) {
                        DatatableProperties dtp = new DatatableProperties();
                        dtp.setTablename(values[0]);
                        datatableproperties.put(values[0], dtp);
                    }
                    datatableproperties.get(values[0]).setOrderdir(jfp.getValue());
                }
                if (values[1].compareToIgnoreCase("pagination") == 0) {
                    if (datatableproperties.isEmpty()) {
                        DatatableProperties dtp = new DatatableProperties();
                        dtp.setTablename(values[0]);
                        datatableproperties.put(values[0], dtp);
                    }
                    datatableproperties.get(values[0]).setPagination(Integer.parseInt(jfp.getValue()));
                }
                if (values[1].compareToIgnoreCase("page") == 0) {
                    if (datatableproperties.isEmpty()) {
                        DatatableProperties dtp = new DatatableProperties();
                        dtp.setTablename(values[0]);
                        datatableproperties.put(values[0], dtp);
                    }
                    datatableproperties.get(values[0]).setPage(Integer.parseInt(jfp.getValue()));
                }
                if (values[1].compareToIgnoreCase("groupbycount") == 0) {
                    if (datatableproperties.isEmpty()) {
                        DatatableProperties dtp = new DatatableProperties();
                        dtp.setTablename(values[0]);
                        datatableproperties.put(values[0], dtp);
                    }
                    datatableproperties.get(values[0]).setGroupbycount(jfp.getValue());
                }
                if (values[1].compareToIgnoreCase("groupby") == 0) {
                    if (datatableproperties.isEmpty()) {
                        DatatableProperties dtp = new DatatableProperties();
                        dtp.setTablename(values[0]);
                        datatableproperties.put(values[0], dtp);
                    }
                    datatableproperties.get(values[0]).getGroupbylist().add(jfp.getValue());
                }
                if (values[1].compareToIgnoreCase("condition") == 0) {
                    DatatableCondition dtc = new DatatableCondition();
                    dtc.setField(values[2]);
                    dtc.setOperand(values[3]);
                    dtc.setValue(jfp.getValue());
                    if (datatableproperties.isEmpty()) {
                        DatatableProperties dtp = new DatatableProperties();
                        dtp.setTablename(values[0]);
                        datatableproperties.put(values[0], dtp);
                    }
                    datatableproperties.get(values[0]).getConditionlist().add(dtc);
                }
            }
        }
    }
    return datatableproperties;
}
Also used : HashMap(java.util.HashMap) JsonFormParameter(io.clownfish.clownfish.beans.JsonFormParameter) DatatableProperties(io.clownfish.clownfish.jdbc.DatatableProperties) DatatableCondition(io.clownfish.clownfish.jdbc.DatatableCondition)

Example 3 with DatatableProperties

use of io.clownfish.clownfish.jdbc.DatatableProperties in project Clownfish by rawdog71.

the class DatabaseUtil method manageTableRead.

private void manageTableRead(Connection con, DatabaseMetaData dmd, String tablename, HashMap<String, DatatableProperties> datatableproperties, HashMap<String, ArrayList> dbtables, HashMap<String, Object> dbvalues) {
    Statement stmt = null;
    ResultSet result = null;
    try {
        long low_limit = 1;
        long high_limit = 50;
        // System.out.println(con.getMetaData().getDriverName());
        String default_order = "";
        TableFieldStructure tfs = getTableFieldsList(dmd, tablename, default_order);
        default_order = tfs.getDefault_order();
        String default_direction = "ASC";
        DatatableProperties dtp = datatableproperties.get(tablename);
        if (dtp != null) {
            if (dtp.getOrderby() != null) {
                default_order = datatableproperties.get(tablename).getOrderby();
            }
            if (dtp.getOrderdir() != null) {
                default_direction = datatableproperties.get(tablename).getOrderdir();
            }
            low_limit = 1L + (long) ((dtp.getPage() - 1) * dtp.getPagination());
            if (con.getMetaData().getDriverName().contains("MS SQL")) {
                high_limit = (long) dtp.getPage() * (long) dtp.getPagination();
            }
            if (con.getMetaData().getDriverName().contains("MySQL")) {
                high_limit = dtp.getPagination();
            }
        }
        StringBuilder sql_count = new StringBuilder();
        StringBuilder sql_outer = new StringBuilder();
        StringBuilder sql_inner = new StringBuilder();
        if (con.getMetaData().getDriverName().contains("MS SQL")) {
            sql_outer.append("SELECT ");
            sql_inner.append("SELECT ");
            sql_count.append("SELECT COUNT(*) AS count FROM ");
            if ((dtp != null) && (!dtp.getGroupbylist().isEmpty())) {
                sql_outer.append("count(*) AS groupbycount, ");
                tfs.getTableFieldsList().stream().filter((tf) -> (dtp.getGroupbylist().contains(tf.getName()))).map((tf) -> {
                    sql_outer.append(tf.getName());
                    return tf;
                }).map((tf) -> {
                    sql_outer.append(", ");
                    sql_inner.append(tf.getName());
                    return tf;
                }).forEach((_item) -> {
                    sql_inner.append(", ");
                });
            } else {
                tfs.getTableFieldsList().stream().map((tf) -> {
                    sql_outer.append(tf.getName());
                    return tf;
                }).map((tf) -> {
                    sql_outer.append(", ");
                    sql_inner.append(tf.getName());
                    return tf;
                }).forEach((_item) -> {
                    sql_inner.append(", ");
                });
            }
            sql_count.append(tablename);
            sql_outer.delete(sql_outer.length() - 2, sql_outer.length());
            sql_outer.append(" FROM (");
            sql_inner.append("ROW_NUMBER() OVER (ORDER BY ");
            sql_inner.append(default_order);
            sql_inner.append(" ");
            sql_inner.append(default_direction);
            sql_inner.append(" ) AS rownumber FROM ");
            sql_inner.append(tablename);
            StringBuilder sql_condition = null;
            if (dtp != null) {
                sql_condition = buildCondition(dtp.getConditionlist(), tfs.getTableFieldsList());
            }
            sql_inner.append(sql_condition);
            sql_count.append(sql_condition);
            StringBuilder sql_groupby = null;
            if (dtp != null) {
                sql_groupby = buildGroupBy(dtp.getGroupbylist());
            }
            sql_inner.append(sql_groupby);
            if (dtp != null) {
                if (!dtp.getGroupbycount().isEmpty()) {
                    sql_inner.append(" ,");
                    sql_inner.append(dtp.getGroupbycount());
                }
            }
            sql_count.append(sql_groupby);
            sql_outer.append(sql_inner);
            sql_outer.append(") orderedselection WHERE rownumber between ");
            sql_outer.append(low_limit);
            sql_outer.append(" AND ");
            sql_outer.append(high_limit);
            sql_outer.append(sql_groupby);
        }
        if (con.getMetaData().getDriverName().contains("MySQL")) {
            sql_outer.append("SELECT ");
            sql_count.append("SELECT COUNT(*) AS count FROM ");
            if ((dtp != null) && (!dtp.getGroupbylist().isEmpty())) {
                sql_outer.append("count(*) AS groupbycount, ");
                tfs.getTableFieldsList().stream().filter((tf) -> (dtp.getGroupbylist().contains(tf.getName()))).map((tf) -> {
                    sql_outer.append(tf.getName());
                    return tf;
                }).forEach((_item) -> {
                    sql_outer.append(", ");
                });
            } else {
                tfs.getTableFieldsList().stream().map((tf) -> {
                    sql_outer.append(tf.getName());
                    return tf;
                }).forEach((_item) -> {
                    sql_outer.append(", ");
                });
            }
            sql_count.append(tablename);
            sql_outer.delete(sql_outer.length() - 2, sql_outer.length());
            sql_outer.append(" FROM ");
            sql_outer.append(tablename);
            StringBuilder sql_condition = null;
            if (dtp != null) {
                sql_condition = buildCondition(dtp.getConditionlist(), tfs.getTableFieldsList());
            }
            sql_outer.append(sql_condition);
            sql_count.append(sql_condition);
            StringBuilder sql_groupby = null;
            if (dtp != null) {
                sql_groupby = buildGroupBy(dtp.getGroupbylist());
            }
            sql_outer.append(sql_groupby);
            if (dtp != null) {
                if (!dtp.getGroupbycount().isEmpty()) {
                    sql_outer.append(" ,");
                    sql_outer.append(dtp.getGroupbycount());
                }
            }
            sql_count.append(sql_groupby);
            sql_outer.append(" LIMIT ");
            sql_outer.append(low_limit - 1);
            sql_outer.append(", ");
            sql_outer.append(high_limit);
            sql_outer.append(sql_groupby);
        }
        if (dtp != null) {
            if (!dtp.getGroupbycount().isEmpty()) {
                TableField groupbycountfield = new TableField();
                groupbycountfield.setName("groupbycount");
                groupbycountfield.setType("INT");
                tfs.getTableFieldsList().add(groupbycountfield);
            }
        }
        stmt = con.createStatement();
        result = stmt.executeQuery(sql_outer.toString());
        ArrayList<HashMap> tablevalues = new ArrayList<>();
        while (result.next()) {
            HashMap<String, String> dbexportvalues = new HashMap<>();
            for (TableField tf : tfs.getTableFieldsList()) {
                try {
                    String value = result.getString(tf.getName());
                    dbexportvalues.put(tf.getName(), value);
                } catch (java.sql.SQLException ex) {
                }
            }
            tablevalues.add(dbexportvalues);
        }
        dbtables.put(tablename, tablevalues);
        try {
            result.close();
        } catch (SQLException ex) {
            LOGGER.error(ex.getMessage());
        }
        result = stmt.executeQuery(sql_count.toString());
        HashMap<String, String> dbexportvalues = new HashMap<>();
        while (result.next()) {
            String value = result.getString("count");
            dbexportvalues.put("count", value);
        }
        dbvalues.put(tablename, dbexportvalues);
    } catch (SQLException ex) {
        LOGGER.error(ex.getMessage());
    } finally {
        if (null != stmt) {
            try {
                stmt.close();
            } catch (SQLException ex) {
                LOGGER.error(ex.getMessage());
            }
        }
        if (null != result) {
            try {
                result.close();
            } catch (SQLException ex) {
                LOGGER.error(ex.getMessage());
            }
        }
    }
}
Also used : Connection(java.sql.Connection) Logger(org.slf4j.Logger) LoggerFactory(org.slf4j.LoggerFactory) CfDatasource(io.clownfish.clownfish.dbentities.CfDatasource) Autowired(org.springframework.beans.factory.annotation.Autowired) DatabaseMetaData(java.sql.DatabaseMetaData) HashMap(java.util.HashMap) TableFieldStructure(io.clownfish.clownfish.jdbc.TableFieldStructure) ArrayList(java.util.ArrayList) DatatableUpdateProperties(io.clownfish.clownfish.jdbc.DatatableUpdateProperties) DatatableCondition(io.clownfish.clownfish.jdbc.DatatableCondition) DatatableProperties(io.clownfish.clownfish.jdbc.DatatableProperties) TableField(io.clownfish.clownfish.jdbc.TableField) SQLException(java.sql.SQLException) List(java.util.List) Component(org.springframework.stereotype.Component) JDBCUtil(io.clownfish.clownfish.jdbc.JDBCUtil) ResultSet(java.sql.ResultSet) CfDatasourceService(io.clownfish.clownfish.serviceinterface.CfDatasourceService) Statement(java.sql.Statement) DatatableNewProperties(io.clownfish.clownfish.jdbc.DatatableNewProperties) DatatableDeleteProperties(io.clownfish.clownfish.jdbc.DatatableDeleteProperties) CfSitedatasource(io.clownfish.clownfish.dbentities.CfSitedatasource) TableFieldStructure(io.clownfish.clownfish.jdbc.TableFieldStructure) HashMap(java.util.HashMap) SQLException(java.sql.SQLException) Statement(java.sql.Statement) DatatableProperties(io.clownfish.clownfish.jdbc.DatatableProperties) ArrayList(java.util.ArrayList) TableField(io.clownfish.clownfish.jdbc.TableField) SQLException(java.sql.SQLException) ResultSet(java.sql.ResultSet)

Example 4 with DatatableProperties

use of io.clownfish.clownfish.jdbc.DatatableProperties in project Clownfish by rawdog71.

the class Clownfish method makeResponse.

/**
 * makeResponse
 *
 * @param name
 * @param postmap
 * @param urlParams
 * @param makestatic
 * @return
 * @throws io.clownfish.clownfish.exceptions.PageNotFoundException
 */
@Async
public Future<ClownfishResponse> makeResponse(String name, List<JsonFormParameter> postmap, List urlParams, boolean makestatic) throws PageNotFoundException {
    ClownfishResponse cfresponse = new ClownfishResponse();
    try {
        List<CfSitedatasource> sitedatasourcelist = null;
        // Freemarker Template
        freemarker.template.Template fmTemplate = null;
        Map fmRoot = null;
        // Velocity Template
        org.apache.velocity.VelocityContext velContext = null;
        org.apache.velocity.Template velTemplate = null;
        // fetch parameter list
        Map parametermap = clownfishutil.getParametermap(postmap);
        // manage urlParams
        clownfishutil.addUrlParams(parametermap, urlParams);
        preview = false;
        if (parametermap.containsKey("preview")) {
            // check mode for display (preview or productive)
            if (parametermap.get("preview").toString().compareToIgnoreCase("true") == 0) {
                preview = true;
            }
        }
        if (parametermap.containsKey("modus")) {
            // check mode for display (staging or dev)
            if (parametermap.get("modus").toString().compareToIgnoreCase("dev") == 0) {
                modus = DEVELOPMENT;
            }
        }
        // fetch site by name or aliasname
        CfSite cfsite = null;
        try {
            cfsite = cfsiteService.findByName(name);
        } catch (Exception ex) {
            try {
                cfsite = cfsiteService.findByAliaspath(name);
            } catch (Exception e1) {
                throw new PageNotFoundException("PageNotFound Exception: " + name);
            }
        }
        // Site has not job flag
        if (!cfsite.isJob()) {
            // increment site hitcounter
            if ((!preview) && (modus == STAGING)) {
                long hitcounter = cfsite.getHitcounter().longValue();
                cfsite.setHitcounter(BigInteger.valueOf(hitcounter + 1));
                cfsiteService.edit(cfsite);
            }
            // Site has static flag
            if ((cfsite.isStaticsite()) && (!makestatic) && (!preview)) {
                if ((cfsite.getContenttype() != null)) {
                    if (!cfsite.getContenttype().isEmpty()) {
                        this.contenttype = cfsite.getContenttype();
                    }
                }
                if ((cfsite.getCharacterencoding() != null)) {
                    if (!cfsite.getCharacterencoding().isEmpty()) {
                        this.characterencoding = cfsite.getCharacterencoding();
                    }
                }
                if ((cfsite.getLocale() != null)) {
                    if (!cfsite.getLocale().isEmpty()) {
                        this.locale = cfsite.getLocale();
                    }
                }
                cfresponse = getStaticSite(name);
                if (0 == cfresponse.getErrorcode()) {
                    return new AsyncResult<>(cfresponse);
                } else {
                    Future<ClownfishResponse> cfStaticResponse = makeResponse(name, postmap, urlParams, true);
                    try {
                        String aliasname = cfsite.getAliaspath();
                        StaticSiteUtil.generateStaticSite(name, aliasname, cfStaticResponse.get().getOutput(), cfassetService, folderUtil);
                        return makeResponse(name, postmap, urlParams, false);
                    } catch (InterruptedException | ExecutionException ex) {
                        LOGGER.error(ex.getMessage());
                        return makeResponse(name, postmap, urlParams, false);
                    }
                }
            } else {
                if ((cfsite.getContenttype() != null)) {
                    if (!cfsite.getContenttype().isEmpty()) {
                        this.contenttype = cfsite.getContenttype();
                    }
                }
                if ((cfsite.getCharacterencoding() != null)) {
                    if (!cfsite.getCharacterencoding().isEmpty()) {
                        this.characterencoding = cfsite.getCharacterencoding();
                    }
                }
                if ((cfsite.getLocale() != null)) {
                    if (!cfsite.getLocale().isEmpty()) {
                        this.locale = cfsite.getLocale();
                    }
                }
                try {
                    CfTemplate cftemplate = cftemplateService.findById(cfsite.getTemplateref().longValue());
                    // fetch the dependend template
                    boolean isScripted = false;
                    switch(cftemplate.getScriptlanguage()) {
                        case // FREEMARKER
                        0:
                            fmRoot = new LinkedHashMap();
                            freemarkerTemplateloader.setModus(modus);
                            freemarkerCfg = new freemarker.template.Configuration();
                            freemarkerCfg.setDefaultEncoding("UTF-8");
                            freemarkerCfg.setTemplateLoader(freemarkerTemplateloader);
                            freemarkerCfg.setLocalizedLookup(false);
                            freemarkerCfg.setLocale(Locale.GERMANY);
                            fmTemplate = freemarkerCfg.getTemplate(cftemplate.getName());
                            isScripted = true;
                            break;
                        case // VELOCITY
                        1:
                            velContext = new org.apache.velocity.VelocityContext();
                            velTemplate = new org.apache.velocity.Template();
                            org.apache.velocity.runtime.RuntimeServices runtimeServices = org.apache.velocity.runtime.RuntimeSingleton.getRuntimeServices();
                            String templateContent;
                            if (DEVELOPMENT == modus) {
                                templateContent = cftemplate.getContent();
                            } else {
                                long currentTemplateVersion;
                                try {
                                    currentTemplateVersion = cftemplateversionService.findMaxVersion(cftemplate.getId());
                                } catch (NullPointerException ex) {
                                    currentTemplateVersion = 0;
                                }
                                templateContent = templateUtil.getVersion(cftemplate.getId(), currentTemplateVersion);
                            }
                            templateContent = templateUtil.fetchIncludes(templateContent, modus);
                            StringReader reader = new StringReader(templateContent);
                            velTemplate.setRuntimeServices(runtimeServices);
                            velTemplate.setData(runtimeServices.parse(reader, velTemplate));
                            velTemplate.initDocument();
                            isScripted = true;
                            break;
                        default:
                            break;
                    }
                    String gzip = propertyUtil.getPropertySwitch("html_gzip", cfsite.getGzip());
                    if (gzip.compareToIgnoreCase("on") == 0) {
                        gzipswitch.setGzipon(true);
                    }
                    String htmlcompression = propertyUtil.getPropertySwitch("html_compression", cfsite.getHtmlcompression());
                    HtmlCompressor htmlcompressor = new HtmlCompressor();
                    htmlcompressor.setRemoveSurroundingSpaces(HtmlCompressor.BLOCK_TAGS_MAX);
                    htmlcompressor.setPreserveLineBreaks(false);
                    Writer out = new StringWriter();
                    // fetch the dependend stylesheet, if available
                    String cfstylesheet = "";
                    if (cfsite.getStylesheetref() != null) {
                        cfstylesheet = ((CfStylesheet) cfstylesheetService.findById(cfsite.getStylesheetref().longValue())).getContent();
                        if (htmlcompression.compareToIgnoreCase("on") == 0) {
                            htmlcompressor.setCompressCss(true);
                            cfstylesheet = htmlcompressor.compress(cfstylesheet);
                        }
                    }
                    // fetch the dependend javascript, if available
                    String cfjavascript = "";
                    if (cfsite.getJavascriptref() != null) {
                        cfjavascript = ((CfJavascript) cfjavascriptService.findById(cfsite.getJavascriptref().longValue())).getContent();
                        if (htmlcompression.compareToIgnoreCase("on") == 0) {
                            htmlcompressor.setCompressJavaScript(true);
                            cfjavascript = htmlcompressor.compress(cfjavascript);
                        }
                    }
                    if (!cftemplate.isLayout()) {
                        // NORMAL Template
                        // fetch the dependend content
                        List<CfSitecontent> sitecontentlist = new ArrayList<>();
                        sitecontentlist.addAll(cfsitecontentService.findBySiteref(cfsite.getId()));
                        sitecontentmap = siteutil.getSitecontentmapList(sitecontentlist);
                        // fetch the dependend datalists, if available
                        sitecontentmap = siteutil.getSitelist_list(cfsite, sitecontentmap);
                        // fetch the site assetlibraries
                        sitecontentmap = siteutil.getSiteAssetlibrary(cfsite, sitecontentmap);
                        // fetch the site keywordlibraries
                        sitecontentmap = siteutil.getSiteKeywordlibrary(cfsite, sitecontentmap);
                    } else {
                        // LAYOUT Template
                        // Fetch the dependent content
                        List<CfLayoutcontent> layoutcontentlist = cflayoutcontentService.findBySiteref(cfsite.getId());
                        List<CfLayoutcontent> contentlist = layoutcontentlist.stream().filter(lc -> lc.getCfLayoutcontentPK().getContenttype().compareToIgnoreCase("C") == 0).collect(Collectors.toList());
                        List<CfClasscontent> classcontentlist = new ArrayList<>();
                        for (CfLayoutcontent layoutcontent : contentlist) {
                            if (preview) {
                                if (layoutcontent.getPreview_contentref().longValue() > 0) {
                                    classcontentlist.add(cfclasscontentService.findById(layoutcontent.getPreview_contentref().longValue()));
                                }
                            } else {
                                if ((null != layoutcontent.getContentref()) && (layoutcontent.getContentref().longValue() > 0)) {
                                    classcontentlist.add(cfclasscontentService.findById(layoutcontent.getContentref().longValue()));
                                }
                            }
                        }
                        sitecontentmap = siteutil.getClasscontentmapList(classcontentlist);
                        // fetch the dependend datalists, if available
                        contentlist = layoutcontentlist.stream().filter(lc -> lc.getCfLayoutcontentPK().getContenttype().compareToIgnoreCase("DL") == 0).collect(Collectors.toList());
                        List<CfList> sitelist = new ArrayList<>();
                        for (CfLayoutcontent layoutcontent : contentlist) {
                            if (preview) {
                                if (layoutcontent.getPreview_contentref().longValue() > 0) {
                                    sitelist.add(cflistService.findById(layoutcontent.getPreview_contentref().longValue()));
                                }
                            } else {
                                if ((null != layoutcontent.getContentref()) && (layoutcontent.getContentref().longValue() > 0)) {
                                    sitelist.add(cflistService.findById(layoutcontent.getContentref().longValue()));
                                }
                            }
                        }
                        sitecontentmap = siteutil.getSitelist_list(sitelist, sitecontentmap);
                        // fetch the dependend assetlibraries, if available
                        contentlist = layoutcontentlist.stream().filter(lc -> lc.getCfLayoutcontentPK().getContenttype().compareToIgnoreCase("AL") == 0).collect(Collectors.toList());
                        List<CfAssetlist> assetlibrary_list = new ArrayList<>();
                        for (CfLayoutcontent layoutcontent : contentlist) {
                            if (preview) {
                                if (layoutcontent.getPreview_contentref().longValue() > 0) {
                                    assetlibrary_list.add(cfassetlistService.findById(layoutcontent.getPreview_contentref().longValue()));
                                }
                            } else {
                                if ((null != layoutcontent.getContentref()) && (layoutcontent.getContentref().longValue() > 0)) {
                                    assetlibrary_list.add(cfassetlistService.findById(layoutcontent.getContentref().longValue()));
                                }
                            }
                        }
                        sitecontentmap = siteutil.getAssetlibrary(assetlibrary_list, sitecontentmap);
                        // fetch the site keywordlibraries
                        contentlist = layoutcontentlist.stream().filter(lc -> lc.getCfLayoutcontentPK().getContenttype().compareToIgnoreCase("KL") == 0).collect(Collectors.toList());
                        List<CfKeywordlist> keywordlibrary_list = new ArrayList<>();
                        for (CfLayoutcontent layoutcontent : contentlist) {
                            if (preview) {
                                if (layoutcontent.getPreview_contentref().longValue() > 0) {
                                    keywordlibrary_list.add(cfkeywordlistService.findById(layoutcontent.getPreview_contentref().longValue()));
                                }
                            } else {
                                if ((null != layoutcontent.getContentref()) && (layoutcontent.getContentref().longValue() > 0)) {
                                    keywordlibrary_list.add(cfkeywordlistService.findById(layoutcontent.getContentref().longValue()));
                                }
                            }
                        }
                        sitecontentmap = siteutil.getSiteKeywordlibrary(keywordlibrary_list, sitecontentmap);
                    }
                    // manage parameters
                    HashMap<String, DatatableProperties> datatableproperties = clownfishutil.getDatatableproperties(postmap);
                    EmailProperties emailproperties = clownfishutil.getEmailproperties(postmap);
                    HashMap<String, DatatableNewProperties> datatablenewproperties = clownfishutil.getDatatablenewproperties(postmap);
                    HashMap<String, DatatableDeleteProperties> datatabledeleteproperties = clownfishutil.getDatatabledeleteproperties(postmap);
                    HashMap<String, DatatableUpdateProperties> datatableupdateproperties = clownfishutil.getDatatableupdateproperties(postmap);
                    manageSessionVariables(postmap);
                    writeSessionVariables(parametermap);
                    // fetch the dependend datasources
                    sitedatasourcelist = new ArrayList<>();
                    sitedatasourcelist.addAll(cfsitedatasourceService.findBySiteref(cfsite.getId()));
                    HashMap<String, HashMap> dbexport = databaseUtil.getDbexport(sitedatasourcelist, datatableproperties, datatablenewproperties, datatabledeleteproperties, datatableupdateproperties);
                    sitecontentmap.put("db", dbexport);
                    // Put meta info to sitecontentmap
                    metainfomap.put("title", cfsite.getTitle());
                    metainfomap.put("description", cfsite.getDescription());
                    metainfomap.put("name", cfsite.getName());
                    metainfomap.put("encoding", cfsite.getCharacterencoding());
                    metainfomap.put("contenttype", cfsite.getContenttype());
                    metainfomap.put("locale", cfsite.getLocale());
                    metainfomap.put("alias", cfsite.getAliaspath());
                    // instantiate Template Beans
                    networkbean = new NetworkTemplateBean();
                    webservicebean = new WebServiceTemplateBean();
                    emailbean = new EmailTemplateBean();
                    emailbean.init(propertyUtil.getPropertymap(), mailUtil, propertyUtil);
                    // send a mail, if email properties are set
                    if (emailproperties != null) {
                        try {
                            sendRespondMail(emailproperties.getSendto(), emailproperties.getSubject(), emailproperties.getBody());
                        } catch (Exception ex) {
                            LOGGER.error(ex.getMessage());
                        }
                    }
                    if (sapSupport) {
                        List<CfSitesaprfc> sitesaprfclist = new ArrayList<>();
                        sitesaprfclist.addAll(cfsitesaprfcService.findBySiteref(cfsite.getId()));
                        sapbean = new SAPTemplateBean();
                        sapbean.init(sapc, sitesaprfclist, rpytableread, postmap);
                    }
                    databasebean = new DatabaseTemplateBean();
                    importbean = new ImportTemplateBean();
                    pdfbean = new PDFTemplateBean();
                    pdfbean.init(pdfUtil);
                    if (!sitedatasourcelist.isEmpty()) {
                        databasebean.init(sitedatasourcelist, cfdatasourceService);
                        importbean.init(sitedatasourcelist, cfdatasourceService);
                    }
                    externalclassproviderbean = new ExternalClassProvider(cfclassCompiler);
                    if (isScripted) {
                        // NORMAL Template
                        switch(cftemplate.getScriptlanguage()) {
                            case // FREEMARKER
                            0:
                                if (null != fmRoot) {
                                    fmRoot.put("css", cfstylesheet);
                                    fmRoot.put("js", cfjavascript);
                                    fmRoot.put("sitecontent", sitecontentmap);
                                    fmRoot.put("metainfo", metainfomap);
                                    fmRoot.put("property", propertyUtil.getPropertymap());
                                    fmRoot.put("emailBean", emailbean);
                                    if (sapSupport) {
                                        fmRoot.put("sapBean", sapbean);
                                    }
                                    fmRoot.put("databaseBean", databasebean);
                                    fmRoot.put("importBean", importbean);
                                    fmRoot.put("networkBean", networkbean);
                                    fmRoot.put("webserviceBean", webservicebean);
                                    fmRoot.put("pdfBean", pdfbean);
                                    fmRoot.put("classBean", externalclassproviderbean);
                                    fmRoot.put("parameter", parametermap);
                                    if (!searchmetadata.isEmpty()) {
                                        fmRoot.put("searchmetadata", searchmetadata);
                                    }
                                    if (!searchcontentmap.isEmpty()) {
                                        fmRoot.put("searchcontentlist", searchcontentmap);
                                    }
                                    if (!searchassetmap.isEmpty()) {
                                        fmRoot.put("searchassetlist", searchassetmap);
                                    }
                                    if (!searchassetmetadatamap.isEmpty()) {
                                        fmRoot.put("searchassetmetadatalist", searchassetmetadatamap);
                                    }
                                    if (!searchclasscontentmap.isEmpty()) {
                                        fmRoot.put("searchclasscontentlist", searchclasscontentmap);
                                    }
                                    for (Class<?> tpbc : beanUtil.getLoadabletemplatebeans()) {
                                        Constructor<?> ctor;
                                        try {
                                            ctor = tpbc.getConstructor();
                                            Object object = ctor.newInstance();
                                            fmRoot.put(tpbc.getName().replaceAll("\\.", "_"), object);
                                        } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
                                            LOGGER.error(ex.getMessage());
                                        }
                                    }
                                    /*
                                        for (Class<?> c : classpathUtil.getClass_set()) {
                                            Constructor<?> ctor;
                                            try {
                                                if (!Modifier.isInterface(c.getModifiers()) && !Modifier.isAbstract(c.getModifiers()) && !Modifier.isFinal(c.getModifiers()))
                                                {
                                                    ctor = c.getConstructor();
                                                    Object object = ctor.newInstance();
                                                    fmRoot.put(c.getName().replaceAll("\\.", "_"), object);
                                                }
                                            } catch (NoClassDefFoundError | NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
                                                if (ex instanceof NoSuchMethodException || ex instanceof IllegalAccessException || ex instanceof InvocationTargetException || ex instanceof NoClassDefFoundError)
                                                    continue;

                                                LOGGER.error(ex.getMessage());
                                            }
                                        }
                                        */
                                    Map finalFmRoot = fmRoot;
                                    cfclassCompiler.getClassMethodMap().forEach((k, v) -> {
                                        Constructor<?> ctor;
                                        try {
                                            ctor = k.getConstructor();
                                            Object object = ctor.newInstance();
                                            finalFmRoot.put(k.getName().replaceAll("\\.", "_"), object);
                                        } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
                                            LOGGER.error(ex.getMessage());
                                        }
                                    });
                                    try {
                                        if (null != fmTemplate) {
                                            if (cftemplate.isLayout()) {
                                                String output = manageLayout(cfsite, cftemplate.getName(), cftemplate.getContent(), cfstylesheet, cfjavascript, parametermap);
                                                output = interpretscript(output, cftemplate, cfstylesheet, cfjavascript, parametermap);
                                                out.write(output);
                                            } else {
                                                freemarker.core.Environment env = fmTemplate.createProcessingEnvironment(fmRoot, out);
                                                env.process();
                                            }
                                        }
                                    } catch (freemarker.template.TemplateException ex) {
                                        LOGGER.error(ex.getMessage());
                                    }
                                }
                                break;
                            case // VELOCITY
                            1:
                                if (null != velContext) {
                                    velContext.put("css", cfstylesheet);
                                    velContext.put("js", cfjavascript);
                                    velContext.put("sitecontent", sitecontentmap);
                                    velContext.put("metainfo", metainfomap);
                                    velContext.put("emailBean", emailbean);
                                    if (sapSupport) {
                                        velContext.put("sapBean", sapbean);
                                    }
                                    velContext.put("databaseBean", databasebean);
                                    velContext.put("importBean", importbean);
                                    velContext.put("networkBean", networkbean);
                                    velContext.put("webserviceBean", webservicebean);
                                    velContext.put("pdfBean", pdfbean);
                                    velContext.put("classBean", externalclassproviderbean);
                                    velContext.put("parameter", parametermap);
                                    velContext.put("property", propertyUtil.getPropertymap());
                                    if (!searchmetadata.isEmpty()) {
                                        velContext.put("searchmetadata", searchmetadata);
                                    }
                                    if (!searchcontentmap.isEmpty()) {
                                        velContext.put("searchcontentlist", searchcontentmap);
                                    }
                                    if (!searchassetmap.isEmpty()) {
                                        velContext.put("searchassetlist", searchassetmap);
                                    }
                                    if (!searchassetmetadatamap.isEmpty()) {
                                        velContext.put("searchassetmetadatalist", searchassetmetadatamap);
                                    }
                                    if (!searchclasscontentmap.isEmpty()) {
                                        velContext.put("searchclasscontentlist", searchclasscontentmap);
                                    }
                                    for (Class tpbc : beanUtil.getLoadabletemplatebeans()) {
                                        Constructor<?> ctor;
                                        try {
                                            ctor = tpbc.getConstructor();
                                            Object object = ctor.newInstance(new Object[] {});
                                            velContext.put(tpbc.getName().replaceAll("\\.", "_"), object);
                                        } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
                                            LOGGER.error(ex.getMessage());
                                        }
                                    }
                                    /*
                                        for (Class<?> c : classpathUtil.getClass_set()) {
                                            Constructor<?> ctor;
                                            try {
                                                if (!Modifier.isInterface(c.getModifiers()) && !Modifier.isAbstract(c.getModifiers()) && !Modifier.isFinal(c.getModifiers()))
                                                {
                                                    ctor = c.getConstructor();
                                                    Object object = ctor.newInstance();
                                                    velContext.put(c.getName().replaceAll("\\.", "_"), object);
                                                }
                                            } catch (NoClassDefFoundError | NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
                                                if (ex instanceof NoSuchMethodException || ex instanceof IllegalAccessException || ex instanceof InvocationTargetException || ex instanceof NoClassDefFoundError)
                                                    continue;

                                                LOGGER.error(ex.getMessage());
                                            }
                                        }
                                        */
                                    org.apache.velocity.VelocityContext finalvelContext = velContext;
                                    cfclassCompiler.getClassMethodMap().forEach((k, v) -> {
                                        Constructor<?> ctor;
                                        try {
                                            ctor = k.getConstructor();
                                            Object object = ctor.newInstance();
                                            finalvelContext.put(k.getName().replaceAll("\\.", "_"), object);
                                        } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
                                            LOGGER.error(ex.getMessage());
                                        }
                                    });
                                    if (null != velTemplate) {
                                        if (cftemplate.isLayout()) {
                                            String output = manageLayout(cfsite, cftemplate.getName(), cftemplate.getContent(), cfstylesheet, cfjavascript, parametermap);
                                            output = interpretscript(output, cftemplate, cfstylesheet, cfjavascript, parametermap);
                                            out.write(output);
                                        } else {
                                            velTemplate.merge(velContext, out);
                                        }
                                    }
                                }
                                break;
                            // HTML
                            default:
                        }
                    } else {
                        // LAYOUT Template
                        if (cftemplate.isLayout()) {
                            String output = manageLayout(cfsite, cftemplate.getName(), cftemplate.getContent(), cfstylesheet, cfjavascript, parametermap);
                            out.write(output);
                            out.flush();
                            out.close();
                        } else {
                            out.write(cftemplate.getContent());
                            out.flush();
                            out.close();
                        }
                    }
                    if (htmlcompression.compareToIgnoreCase("on") == 0) {
                        htmlcompressor.setCompressCss(false);
                        htmlcompressor.setCompressJavaScript(false);
                        cfresponse.setErrorcode(0);
                        cfresponse.setOutput(htmlcompressor.compress(out.toString()));
                        // LOGGER.info("END makeResponse: " + name);
                        return new AsyncResult<>(cfresponse);
                    } else {
                        cfresponse.setErrorcode(0);
                        cfresponse.setOutput(out.toString());
                        // LOGGER.info("END makeResponse: " + name);
                        return new AsyncResult<>(cfresponse);
                    }
                } catch (NoResultException ex) {
                    LOGGER.info("Exception: " + ex);
                    cfresponse.setErrorcode(1);
                    cfresponse.setOutput("No template");
                    // LOGGER.info("END makeResponse: " + name);
                    return new AsyncResult<>(cfresponse);
                }
            }
        } else {
            cfresponse.setErrorcode(2);
            cfresponse.setOutput("Only for Job calling");
            return new AsyncResult<>(cfresponse);
        }
    } catch (IOException | org.apache.velocity.runtime.parser.ParseException ex) {
        cfresponse.setErrorcode(1);
        cfresponse.setOutput(ex.getMessage());
        // LOGGER.info("END makeResponse: " + name);
        return new AsyncResult<>(cfresponse);
    }
}
Also used : TypeToken(com.google.gson.reflect.TypeToken) LoggerFactory(org.slf4j.LoggerFactory) CfClassCompiler(io.clownfish.clownfish.compiler.CfClassCompiler) Autowired(org.springframework.beans.factory.annotation.Autowired) DefaultPropertiesPersister(org.springframework.util.DefaultPropertiesPersister) NoResultException(javax.persistence.NoResultException) AuthTokenList(io.clownfish.clownfish.datamodels.AuthTokenList) DatatableProperties(io.clownfish.clownfish.jdbc.DatatableProperties) Future(java.util.concurrent.Future) CfClassLoader(io.clownfish.clownfish.compiler.CfClassLoader) Gson(com.google.gson.Gson) Element(org.jsoup.nodes.Element) BigInteger(java.math.BigInteger) SAPConnection(de.destrukt.sapconnection.SAPConnection) DatatableNewProperties(io.clownfish.clownfish.jdbc.DatatableNewProperties) AsyncResult(org.springframework.scheduling.annotation.AsyncResult) HttpSession(javax.servlet.http.HttpSession) io.clownfish.clownfish.serviceinterface(io.clownfish.clownfish.serviceinterface) Context(javax.ws.rs.core.Context) DEVELOPMENT(io.clownfish.clownfish.constants.ClownfishConst.ViewModus.DEVELOPMENT) STAGING(io.clownfish.clownfish.constants.ClownfishConst.ViewModus.STAGING) EmailProperties(io.clownfish.clownfish.mail.EmailProperties) XmlPullParserException(org.codehaus.plexus.util.xml.pull.XmlPullParserException) Collectors(java.util.stream.Collectors) MalformedTemplateNameException(freemarker.template.MalformedTemplateNameException) InvocationTargetException(java.lang.reflect.InvocationTargetException) Configuration(org.springframework.context.annotation.Configuration) ServerInfo(org.apache.catalina.util.ServerInfo) HandlerMapping(org.springframework.web.servlet.HandlerMapping) GREEN(org.fusesource.jansi.Ansi.Color.GREEN) Document(org.jsoup.nodes.Document) org.springframework.web.bind.annotation(org.springframework.web.bind.annotation) PostConstruct(javax.annotation.PostConstruct) Jsoup(org.jsoup.Jsoup) Elements(org.jsoup.select.Elements) MavenXpp3Reader(org.apache.maven.model.io.xpp3.MavenXpp3Reader) ClownfishResponse(io.clownfish.clownfish.datamodels.ClownfishResponse) Model(org.apache.maven.model.Model) io.clownfish.clownfish.lucene(io.clownfish.clownfish.lucene) PageNotFoundException(io.clownfish.clownfish.exceptions.PageNotFoundException) ParseException(org.apache.lucene.queryparser.classic.ParseException) Async(org.springframework.scheduling.annotation.Async) Setter(lombok.Setter) java.util(java.util) Getter(lombok.Getter) PropertySource(org.springframework.context.annotation.PropertySource) CfLayout(io.clownfish.clownfish.datamodels.CfLayout) PropertySources(org.springframework.context.annotation.PropertySources) Constructor(java.lang.reflect.Constructor) StringTemplateLoader(freemarker.cache.StringTemplateLoader) DatatableUpdateProperties(io.clownfish.clownfish.jdbc.DatatableUpdateProperties) Value(org.springframework.beans.factory.annotation.Value) HttpServletRequest(javax.servlet.http.HttpServletRequest) HtmlCompressor(com.googlecode.htmlcompressor.compressor.HtmlCompressor) CfTemplateLoaderImpl(io.clownfish.clownfish.serviceimpl.CfTemplateLoaderImpl) FacesContext(javax.faces.context.FacesContext) ServletOutputStream(javax.servlet.ServletOutputStream) DatatableDeleteProperties(io.clownfish.clownfish.jdbc.DatatableDeleteProperties) io.clownfish.clownfish.templatebeans(io.clownfish.clownfish.templatebeans) org.quartz(org.quartz) Ansi.ansi(org.fusesource.jansi.Ansi.ansi) io.clownfish.clownfish.dbentities(io.clownfish.clownfish.dbentities) GzipSwitch(io.clownfish.clownfish.interceptor.GzipSwitch) Logger(org.slf4j.Logger) EnableAutoConfiguration(org.springframework.boot.autoconfigure.EnableAutoConfiguration) CfDiv(io.clownfish.clownfish.datamodels.CfDiv) HibernateJpaAutoConfiguration(org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration) RED(org.fusesource.jansi.Ansi.Color.RED) HttpServletResponse(javax.servlet.http.HttpServletResponse) CronScheduleBuilder.cronSchedule(org.quartz.CronScheduleBuilder.cronSchedule) ExecutionException(java.util.concurrent.ExecutionException) io.clownfish.clownfish.utils(io.clownfish.clownfish.utils) Component(org.springframework.stereotype.Component) AnsiConsole(org.fusesource.jansi.AnsiConsole) java.io(java.io) ClownfishConst(io.clownfish.clownfish.constants.ClownfishConst) HibernateInit(io.clownfish.clownfish.datamodels.HibernateInit) io.clownfish.clownfish.beans(io.clownfish.clownfish.beans) RPY_TABLE_READ(io.clownfish.clownfish.sap.RPY_TABLE_READ) DatatableNewProperties(io.clownfish.clownfish.jdbc.DatatableNewProperties) DatatableProperties(io.clownfish.clownfish.jdbc.DatatableProperties) InvocationTargetException(java.lang.reflect.InvocationTargetException) PageNotFoundException(io.clownfish.clownfish.exceptions.PageNotFoundException) DatatableDeleteProperties(io.clownfish.clownfish.jdbc.DatatableDeleteProperties) DatatableUpdateProperties(io.clownfish.clownfish.jdbc.DatatableUpdateProperties) NoResultException(javax.persistence.NoResultException) HtmlCompressor(com.googlecode.htmlcompressor.compressor.HtmlCompressor) ExecutionException(java.util.concurrent.ExecutionException) EmailProperties(io.clownfish.clownfish.mail.EmailProperties) ClownfishResponse(io.clownfish.clownfish.datamodels.ClownfishResponse) NoResultException(javax.persistence.NoResultException) XmlPullParserException(org.codehaus.plexus.util.xml.pull.XmlPullParserException) MalformedTemplateNameException(freemarker.template.MalformedTemplateNameException) InvocationTargetException(java.lang.reflect.InvocationTargetException) PageNotFoundException(io.clownfish.clownfish.exceptions.PageNotFoundException) ParseException(org.apache.lucene.queryparser.classic.ParseException) ExecutionException(java.util.concurrent.ExecutionException) ParseException(org.apache.lucene.queryparser.classic.ParseException) AsyncResult(org.springframework.scheduling.annotation.AsyncResult) Async(org.springframework.scheduling.annotation.Async)

Aggregations

DatatableProperties (io.clownfish.clownfish.jdbc.DatatableProperties)4 DatatableCondition (io.clownfish.clownfish.jdbc.DatatableCondition)3 DatatableDeleteProperties (io.clownfish.clownfish.jdbc.DatatableDeleteProperties)3 DatatableNewProperties (io.clownfish.clownfish.jdbc.DatatableNewProperties)3 DatatableUpdateProperties (io.clownfish.clownfish.jdbc.DatatableUpdateProperties)3 Logger (org.slf4j.Logger)3 LoggerFactory (org.slf4j.LoggerFactory)3 Autowired (org.springframework.beans.factory.annotation.Autowired)3 Component (org.springframework.stereotype.Component)3 CfDatasource (io.clownfish.clownfish.dbentities.CfDatasource)2 CfSitedatasource (io.clownfish.clownfish.dbentities.CfSitedatasource)2 JDBCUtil (io.clownfish.clownfish.jdbc.JDBCUtil)2 TableField (io.clownfish.clownfish.jdbc.TableField)2 TableFieldStructure (io.clownfish.clownfish.jdbc.TableFieldStructure)2 CfDatasourceService (io.clownfish.clownfish.serviceinterface.CfDatasourceService)2 HashMap (java.util.HashMap)2 Gson (com.google.gson.Gson)1 TypeToken (com.google.gson.reflect.TypeToken)1 HtmlCompressor (com.googlecode.htmlcompressor.compressor.HtmlCompressor)1 SAPConnection (de.destrukt.sapconnection.SAPConnection)1