Package net.sourceforge.processdash.tool.export.impl

Examples of net.sourceforge.processdash.tool.export.impl.ExternalResourceManifestXMLv1$MappingEntry


    public void loadDefaultMappings() {
        String setting = System.getProperty(DEFAULT_MAP_DATA_SOURCE_PROPERTY);
        if (StringUtils.hasValue(setting)) {
            File mapDataSource = new File(setting);
            ExternalResourceManifestXMLv1 loader = new ExternalResourceManifestXMLv1();
            loadMappings(loader.load(mapDataSource));
        }
    }
View Full Code Here


        mapper = ExternalLocationMapper.getInstance();

        if (INITIALIZATION_MODE_ARCHIVE.equalsIgnoreCase(setting)) {
            // if this data was extracted from a ZIP File, check to see if
            // external resources were included in that ZIP.
            ExternalResourceManifestXMLv1 loader = new ExternalResourceManifestXMLv1();
            if (mapper.loadMappings(loader.load(baseDir))) {
                defaultMapDataSource = baseDir;
            } else {
                // the zip file did not contain any archived external resources.
                // this might mean it wasn't created by the FileBackupManager,
                // but by an individual zipping up a set of team data
                // directories. Fall back to the auto-search mode.
                setting = INITIALIZATION_MODE_AUTO;
            }
        }

        if (INITIALIZATION_MODE_AUTO.equalsIgnoreCase(setting)) {
            final ExternalResourceAutoLocator loader = new ExternalResourceAutoLocator();
            dispatchAllImportInstructions(new ImportInstructionDispatcher() {
                public Object dispatch(ImportDirectoryInstruction instr) {
                    String directory = instr.getDirectory();
                    if (directory != null && directory.length() > 0)
                        loader.addImportedPath(directory);
                    return null;
                }});
            mapper.loadMappings(loader.load(baseDir));
            // NOTE: this style of resource mapping is not supported by the
            // "default map data source" functionality at this time.
        }
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.tool.export.impl.ExternalResourceManifestXMLv1$MappingEntry

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.