/** * Load the configuration by looking first for the nominal file, and then by looking for the * provided IDs. * * @param xs The XML stream * @param descriptor The descriptor * @param ids The addition IDs */ public static synchronized void load(XStream xs, Descriptor<?> descriptor, String... ids) { // Get the nominal configuration file XmlFile file = getConfigFile(xs, descriptor); // CHeck if this file exists if (file.exists()) { // If exists, load it load(descriptor, file); // No need to continue return; } // If not exists, look for the IDs for (String id : ids) { // Get the configuration file for the ID XmlFile aliasFile = getConfigFile(xs, id); // Check if exists if (aliasFile.exists()) { // If exists load the file load(descriptor, aliasFile); // No need to continue return; } } }
/** Default constructor */ public DescriptorImpl() { // Load saved data on disk (with backward compatibility) DescriptorUtil.load(XSTREAM, this, "jenkins.plugins.shiningpanda.StandardPythonInstallation"); }