/** * Loads a {@link Item} from a config file. * * @param dir * The directory that contains the config file, not the config file itself. */ public static Item load(ItemGroup parent, File dir) throws IOException { Item item = (Item)getConfigFile(dir).read(); item.onLoad(parent,dir.getName()); return item; }
public static ProxyConfiguration load() throws IOException { XmlFile f = getXmlFile(); if(f.exists()) return (ProxyConfiguration) f.read(); else return null; }
Object loaded = configFile.read(); if (!(loaded instanceof Fingerprint)) { throw new IOException("Unexpected Fingerprint type. Expected " + Fingerprint.class + " or subclass but got "
XmlFile xmlFile = new XmlFile(Jenkins.XSTREAM, new File(subdir, "config.xml")); if (xmlFile.exists()) { Node node = (Node) xmlFile.read(); newNodes.put(node.getNodeName(), node);
queueFile = getXMLQueueFile(); if (queueFile.exists()) { Object unmarshaledObj = new XmlFile(XSTREAM, queueFile).read(); List items;
/** * Loads a {@link Item} from a config file. * * @param dir * The directory that contains the config file, not the config file itself. */ public static Item load(ItemGroup parent, File dir) throws IOException { Item item = (Item)getConfigFile(dir).read(); item.onLoad(parent,dir.getName()); return item; }
/** * Loads a {@link Item} from a config file. * * @param dir * The directory that contains the config file, not the config file itself. */ public static Item load(ItemGroup parent, File dir) throws IOException { Item item = (Item)getConfigFile(dir).read(); item.onLoad(parent,dir.getName()); return item; }
/** * Loads a {@link Item} from a config file. * * @param dir * The directory that contains the config file, not the config file itself. */ public static Item load(ItemGroup parent, File dir) throws IOException { Item item = (Item)getConfigFile(dir).read(); item.onLoad(parent,dir.getName()); return item; }
/** * Loads a {@link Item} from a config file. * * @param dir * The directory that contains the config file, not the config file itself. */ public static Item load(ItemGroup parent, File dir) throws IOException { Item item = (Item)getConfigFile(dir).read(); item.onLoad(parent,dir.getName()); return item; }
public static ProxyConfiguration load() throws IOException { XmlFile f = getXmlFile(); if(f.exists()) return (ProxyConfiguration) f.read(); else return null; }
public static ProxyConfiguration load() throws IOException { XmlFile f = getXmlFile(); if(f.exists()) return (ProxyConfiguration) f.read(); else return null; }
public static ProxyConfiguration load() throws IOException { XmlFile f = getXmlFile(); if(f.exists()) return (ProxyConfiguration) f.read(); else return null; }
public static ProxyConfiguration load() throws IOException { XmlFile f = getXmlFile(); if(f.exists()) return (ProxyConfiguration) f.read(); else return null; }
/** * Loads a {@link TestResult} from disk. */ private TestResult load() { TestResult r; try { r = (TestResult)getDataFile().read(); } catch (IOException e) { logger.log(Level.WARNING, "Failed to load "+getDataFile(),e); r = new TestResult(); // return a dummy } r.freeze(this); return r; }
/** * Loads a {@link TestResult} from disk. */ private TestResult load() { TestResult r; try { r = (TestResult) getDataFile().read(); } catch (IOException e) { LOGGER.log(Level.WARNING, "Failed to load " + getDataFile(), e); r = new TestResult(); // return a dummy } r.freeze(this); return r; }
/** * Loads a {@link TestResult} from disk. */ private TestResult load() { TestResult r; try { r = (TestResult)getDataFile().read(); } catch (IOException e) { logger.log(Level.WARNING, "Failed to load "+getDataFile(),e); r = new TestResult(); // return a dummy } r.freeze(this); return r; }
/** * Loads a {@link TestResult} from disk. */ private TestResult load() { TestResult r; try { r = (TestResult)getDataFile().read(); } catch (IOException e) { logger.log(Level.WARNING, "Failed to load "+getDataFile(),e); r = new TestResult(); // return a dummy } r.freeze(this); return r; }
/** * Loads a {@link TestResult} from disk. */ private TestResult load() { TestResult r; try { r = (TestResult)getDataFile().read(); } catch (IOException e) { logger.log(Level.WARNING, "Failed to load "+getDataFile(),e); r = new TestResult(); // return a dummy } r.freeze(this); return r; }
public static ScriptlerConfiguration load() throws IOException { XmlFile f = getXmlFile(); if (f.exists()) { // As it might be that we have an unsorted set, we ensure the // sorting at load time. ScriptlerConfiguration sc = (ScriptlerConfiguration) f.read(); SortedSet<Script> sorted = new TreeSet<Script>(new ByIdSorter()); sorted.addAll(sc.getScripts()); sc.setScripts(sorted); return sc; } else { return null; } }
public <T> T roundtripXStream(T cx) throws Exception { XmlFile x = new XmlFile(Run.XSTREAM, tmp.newFile()); x.write(cx); return (T)x.read(); }