Package hudson

Examples of hudson.XmlFile


    public String getVersion() {
        return Hudson.getInstance().getPluginManager().getPlugin(WallDisplayPlugin.class).getVersion();
    }

    protected Configuration loadConfiguration() throws IOException {
        XmlFile xmlFile = getConfigXml();
        Configuration config = null;
        if (xmlFile.exists()) {
            config = (Configuration) xmlFile.read();
            LOGGER.info(String.format("Loaded configuration data: %s", config.toString()));
        } else {
            LOGGER.info("Could not find configuration file, creating empty object");
            config = new Configuration();
        }
View Full Code Here


        getConfigXml().write(config);
    }

    @Override
    protected XmlFile getConfigXml() {
        return new XmlFile(Hudson.XSTREAM,
                new File(Hudson.getInstance().getRootDir(),
                        WallDisplayPlugin.class.getName() + ".xml"));
    }
View Full Code Here

        return XSTREAM;
    }


    private XmlFile getSourceConfigFile(XStream XSTREAM) {
        return new XmlFile(XSTREAM, sourceConfigFile);
    }
View Full Code Here

    private XmlFile getSourceConfigFile(XStream XSTREAM) {
        return new XmlFile(XSTREAM, sourceConfigFile);
    }

    private XmlFile getTargetConfigFile(XStream XSTREAM) {
        return new XmlFile(XSTREAM, targetConfigFile);
    }
View Full Code Here

        getTargetConfigFile(XSTREAM).write(item);
        getTargetConfigFile(XSTREAM).read();
    }

    private XmlFile getSourceConfigFile(XStream XSTREAM) {
        return new XmlFile(XSTREAM, sourceConfigFile);
    }
View Full Code Here

    private XmlFile getSourceConfigFile(XStream XSTREAM) {
        return new XmlFile(XSTREAM, sourceConfigFile);
    }
    private XmlFile getTargetConfigFile(XStream XSTREAM) {
        return new XmlFile(XSTREAM, targetConfigFile);
    }
View Full Code Here

        ensureSerialization("project.ser.xml");
    }

    @Override
    protected XmlFile createXmlFile(final File file) {
        return new XmlFile(XSTREAM, file);
    }
View Full Code Here

    public Map<String,Map<String,Long>> getSlaveWorkspacesUsage(){
        return Maps.newHashMap(slaveWorkspacesUsage);
    }
           
     public XmlFile getConfigFile(){
        return new XmlFile(new File(job.getRootDir(), "disk-usage.xml"));
    }
View Full Code Here

        property.checkWorkspaces(true);
        save();
    }
   
    public synchronized void load(){
            XmlFile file = getConfigFile();
            if(!file.getFile().exists()){
                return;
            }
            try {
                file.unmarshal(this);
            } catch (IOException e) {
                Logger.getLogger(getClass().getName()).log(Level.WARNING, "Failed to load "+file, e);
            }
//        if(buildDiskUsage==null){
//             //seems like it needs load old data
View Full Code Here

                    return;
                for(String path : paths.split(",")){
                    path = path.trim();
                    try {
                        File file = new File(home,path);
                        XmlFile xmlFile = new XmlFile(file);
                        String content = xmlFile.asString();
                        content = content.replace("${JENKINS_HOME}", home.getAbsolutePath());
                        PrintStream stream = new PrintStream(file);
                        stream.print(content);
                        stream.close();
                    } catch (IOException ex) {
View Full Code Here

TOP

Related Classes of hudson.XmlFile

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.