Package net.sourceforge.processdash.data.repository

Examples of net.sourceforge.processdash.data.repository.DataRepository$AllDataNamesIterator


            ExternalResourceManager.getInstance().initializeMappings(
                dataDirectory,
                ExternalResourceManager.INITIALIZATION_MODE_ARCHIVE);

        // create the data repository.
        data = new DataRepository();
        DashHierarchy templates = TemplateLoader.loadTemplates(data);
        data.setDatafileSearchURLs(TemplateLoader.getTemplateURLs());

        // open and load the the user's work breakdown structure
        hierarchy = new DashHierarchy(null);
View Full Code Here


        }
        pt.click("Started web server");


        // create the data repository.
        data = new DataRepository();
        if ("true".equalsIgnoreCase(Settings.getVal("dataFreezing.disabled")))
            data.disableFreezing();
        data.addGlobalDefineDeclarations("#define AUTO_INDIV_ROOT_TAG t");
        pt.click("Created Data Repository");
        templates = TemplateLoader.loadTemplates(data);
View Full Code Here

    private void handleRegistration() throws IOException {
        log.entering("HandleForm", "handleRegistration");
        log.finer("query=" + env.get("QUERY_STRING"));

        DataRepository data = getDataRepository();
        String prefix = getDataPrefix();
        boolean unlocked = getUnlocked();
        if (!requiredTagOK(data, prefix)) {
            data = null;
            prefix = "No such project OR project/process mismatch";
View Full Code Here

        out.print("'></head><body>&nbsp;</body></html>");
    }


    protected void showListOfDefinedStandards() throws IOException {
        DataRepository data = getDataRepository();
        String[] standards = DefectTypeStandard.getDefinedStandards(data);

        String defaultName = DefectTypeStandard.get("", data).getName();

        writeHTMLHeader();
View Full Code Here

        DashHierarchy result = new DashHierarchy(getPSPProperties().dataPath);
        result.copy(getPSPProperties());

        // find the leaves in the hierarchy, and augment each leaf with
        // supplementary children provided from data element specifications
        DataRepository data = getDataRepository();
        Enumeration<PropertyKey> leaves = result.getLeaves(PropertyKey.ROOT);
        while (leaves.hasMoreElements()) {
            PropertyKey leaf = leaves.nextElement();
            augmentHierarchy(result, leaf, data);
        }
View Full Code Here

public class RollupDatasetSelectElem extends TinyCGIBase {
   
    private static Resources resources = Resources.getDashBundle("Templates");

    protected void writeContents() throws IOException {
        DataRepository data = getDataRepository();   if (data == null) return;
        init(data);

        // get the [Use_Rollup] data element for the current
        // project. If it is null, return immediately.
        String prefix = getPrefix();   if (prefix == null) return;
View Full Code Here

        if (value == null) value = "";
        putValue(name, new ImmutableStringData(value));
    }

    protected void putValue(String name, SimpleData dataValue) {
        DataRepository data = getDataRepository();
        String prefix = getPrefix();
        if (prefix == null) prefix = "";
        String dataName = DataRepository.createDataName(prefix, name);
        data.putValue(dataName, dataValue);
    }
View Full Code Here

        data.putValue(dataName, dataValue);
    }

    /** Get a value from the data repository. */
    protected String getValue(String name) {
        DataRepository data = getDataRepository();
        String prefix = getPrefix();
        if (prefix == null) prefix = "";
        String dataName = DataRepository.createDataName(prefix, name);
        SimpleData d = data.getSimpleValue(dataName);
        return (d == null ? null : d.format());
    }
View Full Code Here

            this(name, name, null, null); }
        public PathVariable(String name, String metaName, String impliedPath,
                            String defaultValue) {
            this.metaName = metaName;
            SaveableData val = null;
            DataRepository data = getDataRepository();

            if (name.startsWith("/")) {
                // The name is absolute - look it up in the data repository.
                val = data.getSimpleValue(dataName = name);

            } else {
                // Look for an inheritable value with this name in the data
                // repository.
                StringBuffer prefix = new StringBuffer(getPrefix());
                val = data.getInheritableValue(prefix, name);
                if (val != null && !(val instanceof SimpleData))
                    val = val.getSimpleValue();
                dataName = DataRepository.createDataName(prefix.toString(), name);
            }

            // Check to see if a value was POSTed to this CGI script for this
            // data element.  If so, it would override any previous value.
            String postedValue = getParameter(name);
            if (postedValue != null && checkPostToken()) {
                value = postedValue;
                if (pathStartsWith(value, impliedPath)) {
                    // the user supplied an absolute path.  Rewrite it so it
                    // is relative to the impliedPath.
                    value = value.substring(impliedPath.length());
                    if (value.startsWith(File.separator))
                        value = value.substring(1);
                }
                if (! pathEqual(value, defaultValue)) {
                    // Save this user-specified value in the repository.
                    // (Default values are not saved to the repository.)
                    data.userPutValue(dataName, StringData.create(value));
                }

            } else if (val instanceof SimpleData)
                value = ((SimpleData) val).format();
View Full Code Here

    private static final String DEFAULT_PREFIX = "/To Date/PSP/All";
    private static final String DEST_URL = "//reports/table.class?qf=hist.rpt";

    /** Write the CGI header. */
    protected void writeHeader() {
        DataRepository data = getDataRepository();
        String prefix = getPrefix();
        String dataName = DataRepository.createDataName(prefix, DATA_NAME);
        SimpleData d = data.getSimpleValue(dataName);
        String subsetPrefix = null;
        if (d != null) subsetPrefix = d.format();
        if (subsetPrefix == null || subsetPrefix.length() == 0)
            subsetPrefix = DEFAULT_PREFIX;

View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.data.repository.DataRepository$AllDataNamesIterator

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.