Package cc.concurrent.config.core.model

Examples of cc.concurrent.config.core.model.FilePublished


        filePublishedService = (FilePublishedApi) factory.create(FilePublishedApi.class, remoteUrl);
    }

    @Override
    String getXml(String fileName) throws Exception {
        FilePublished filePublished = filePublishedService.download(appName, fileName);
        checkState(filePublished != null, "loader[%s] appName[%s] fileName[%s] download null", getClass().getSimpleName(), appName, fileName);
        return filePublished.getXml();
    }
View Full Code Here


        checkNotNull(fileHistory);
        checkArgument(!fileHistory.isPublished(), "has published");

        String xml = fileHistory.getXml();
        String md5 = Md5Util.md5(xml);
        FilePublished filePublished = new FilePublished(appName, fileName, version, xml, md5);
        if (filePublishedDao.updateFilePublished(filePublished) == 0) {
            filePublishedDao.addFilePublished(filePublished);
        }

        String username = FlashRequestContext.getCurrentContext().getUsername();
View Full Code Here

    @Override
    public FilePublished download(String appName, String fileName) {
        checkNotNull(appName);
        checkNotNull(fileName);
        FilePublished filePublished = filePublishedDao.getFilePublished(appName, fileName);
        return filePublished;
    }
View Full Code Here

        String sql = "select app_name, file_name, version, xml, md5 from config_file_published " +
                "where app_name=?";
        List<FilePublished> r = getJdbcTemplate().query(sql, new Object[]{appName}, new RowMapper<FilePublished>() {
            @Override
            public FilePublished mapRow(ResultSet rs, int rowNum) throws SQLException {
                return new FilePublished(rs.getString(1), rs.getString(2), rs.getInt(3), rs.getString(4), rs.getString(5));
            }
        });
        return r;
    }
View Full Code Here

        String sql = "select app_name, file_name, version, xml, md5 from config_file_published " +
                "where app_name=? and file_name=?";
        List<FilePublished> r = getJdbcTemplate().query(sql, new Object[]{appName, fileName}, new RowMapper<FilePublished>() {
            @Override
            public FilePublished mapRow(ResultSet rs, int rowNum) throws SQLException {
                return new FilePublished(rs.getString(1), rs.getString(2), rs.getInt(3), rs.getString(4), rs.getString(5));
            }
        });
        return !r.isEmpty() ? r.get(0) : null;
    }
View Full Code Here

TOP

Related Classes of cc.concurrent.config.core.model.FilePublished

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.