Package org.auraframework.util.adapter

Examples of org.auraframework.util.adapter.SourceControlAdapter


        }
    }

    protected final void writeGoldFileContent(String content) {
        URL url = getDestUrl();
        SourceControlAdapter sca = AuraUtil.getSourceControlAdapter();
        try {
            File f = new File(url.getFile());
            boolean existed = f.exists();
            if (existed && !f.canWrite() && sca.canCheckout()) {
                sca.checkout(f);
            }
            if (!f.getParentFile().exists()) {
                f.getParentFile().mkdirs();
            }
            OutputStreamWriter fw = new OutputStreamWriter(new FileOutputStream(f), "UTF-8");
            fw.write(content);
            fw.close();

            if (!existed && sca.canCheckout()) {
                sca.add(f);
            }
        } catch (Throwable t) {
            throw new RuntimeException("Failed to write gold file: " + url.toString(), t);
        }
    }
View Full Code Here

TOP

Related Classes of org.auraframework.util.adapter.SourceControlAdapter

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.