Package com.alibaba.antx.config

Examples of com.alibaba.antx.config.ConfigException


        File logbase = logfile.getParentFile();

        logbase.mkdirs();

        if (!logbase.isDirectory()) {
            throw new ConfigException("Could not create directory: " + logbase.getAbsolutePath());
        }

        try {
            ostream = new BufferedOutputStream(new FileOutputStream(logfile), 8192);
        } catch (FileNotFoundException e) {
            throw new ConfigException(e);
        }

        generator.getSession().setOutputStream(ostream);
    }
View Full Code Here


        ExtendedProperties props = new ExtendedProperties();

        try {
            props.load(istream, propsCharset, url);
        } catch (IOException e) {
            throw new ConfigException(e);
        } finally {
            if (istream != null) {
                try {
                    istream.close();
                } catch (IOException e) {
View Full Code Here

        if (propsFile.exists()) {
            try {
                props.load(propsFile.toURI().toURL(), propsCharset);
            } catch (IOException e) {
                throw new ConfigException(e);
            }
        }

        return props;
    }
View Full Code Here

        assertFile();

        try {
            return StreamUtil.readBytes(getInputStream(), true).toByteArray();
        } catch (IOException e) {
            throw new ConfigException(e);
        }
    }
View Full Code Here

        assertFile();

        try {
            return channel.get(getURI().getPath());
        } catch (SftpException e) {
            throw new ConfigException(e);
        }
    }
View Full Code Here

        assertFile();

        try {
            return channel.put(getURI().getPath());
        } catch (SftpException e) {
            throw new ConfigException(e);
        }
    }
View Full Code Here

        List entries;

        try {
            entries = channel.ls(getURI().getPath());
        } catch (SftpException e) {
            throw new ConfigException(e);
        }

        List result = new ArrayList(entries.size());

        for (Iterator i = entries.iterator(); i.hasNext();) {
View Full Code Here

            return new SshResource(this, channel, uri, stat);
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
            throw new ConfigException(e);
        }
    }
View Full Code Here

                    // �ɹ���������Ա����ظ���ʾ��������
                    ResourceContext.get().getVisitedURIs().remove(new ResourceKey(new ResourceURI(uri.getURI())));
                } catch (RuntimeException e) {
                    throw e;
                } catch (Exception e) {
                    throw new ConfigException(e);
                } finally {
                    ResourceContext.get().setCurrentURI(null);
                }
            }
        }
View Full Code Here

     */
    public boolean generate(String template, ConfigGeneratorCallback callback) {
        List<ConfigGenerate> generates = generator.generateTemplateFilesIncludingMetaInfos.get(template);

        if (generates == null || generates.isEmpty()) {
            throw new ConfigException("No defined template " + template);
        }

        boolean allSuccess = true;

        for (ConfigGenerate generate : generates) {
View Full Code Here

TOP

Related Classes of com.alibaba.antx.config.ConfigException

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.