Package net.sourceforge.processdash.data

Examples of net.sourceforge.processdash.data.DateData


        SimpleData d = data.getSimpleValue(dataName);
        if (d == null && s == null)
            return;

        assertTrue(d instanceof DateData);
        DateData w = (DateData) d;
        assertEquals(s, w.getValue());
    }
View Full Code Here


                (fullName, DATE_COMPLETED_DATA_NAME);

            // save the Date object to the data repository
            if (aValue instanceof Date) {
                dateCompleted = (Date) aValue;
                data.userPutValue(dataName, new DateData(dateCompleted, true));
            } else {
                dateCompleted = null;
                data.userPutValue(dataName, null);
            }
        } else if (getNumChildren() == 1) {
View Full Code Here

        add(new PushConstant(new ImmutableStringData(stringVal))); }


    public void caseTDateLiteral(TDateLiteral node) {
        try {
            add(new PushConstant(new DateData(node.getText())));
        } catch (Exception mve) {
            throw new CompilationException
                ("Couldn't parse date literal '" + node.getText() + "'.");
        }
    }
View Full Code Here

            return maxDateOf(arguments, context);
    }

    private Object maxDateFor(List arguments, ExpressionContext context)
    {
        DateData result = null;
        Object val;

        String name = asString(getArg(arguments, 0));
        if (name == null) return null;

        Iterator i = collapseLists(arguments, 1).iterator();
        String path, dataName;
        while (i.hasNext()) {
            path = asStringVal(i.next());
            if (path == null) continue;

            dataName = DataRepository.createDataName(path, name);
            val = context.get(dataName);
            if (val == null)
                return null;
            if (val instanceof DateData &&
                (result == null || result.lessThan((DateData) val)))
                result = (DateData) val;
        }
        return result;
    }
View Full Code Here

        return result;
    }

    private Object maxDateOf(List arguments, ExpressionContext context)
    {
        DateData result = null;
        Object val;

        Iterator i = collapseLists(arguments, 0).iterator();
        while (i.hasNext()) {
            val = i.next();
            if (val == null)
                return null;
            if (val instanceof DateData &&
                (result == null || result.lessThan((DateData) val)))
                result = (DateData) val;
        }
        return result;
    }
View Full Code Here

        // have been marked complete.
        StringBuffer effectivePath = new StringBuffer(taskPath);
        Object completionDate = data.getInheritableValue(effectivePath,
            "Completed");
        if (completionDate instanceof DateData) {
            DateData dd = (DateData) completionDate;

            // if the user hasn't already given us the OK to log time
            // to this path, display a message.
            String completedPath = effectivePath.toString();
            if (pathsToIgnore.contains(completedPath) == false)
                showCompletedTaskTimeLoggingAlert(completedPath, dd.getValue());
        }
    }
View Full Code Here

        }
    }

    private static class DateDataHandler extends AbstractDataHandler {
        SimpleData parse(String value) throws MalformedValueException {
            DateData result = DateData.create(value);
            result.setEditable(false);
            return result;
        }
View Full Code Here

    super(r, name, readOnly);
  }


  public void setBoolean(Boolean b) {
    value = (b.booleanValue() ? new DateData() : null);
  }
View Full Code Here

    private void maybeSaveMaxActivityDate() {
        if (maxActivityDate != null && filter.size() == 1) {
            String path = (String) filter.iterator().next();
            String dataName = DataRepository.createDataName(path,
                DATA_TIMESTAMP_NAME);
            DateData timestamp = new DateData(maxActivityDate, true);
            ctx.getData().putValue(dataName, timestamp);
        }
    }
View Full Code Here

     * Register a user notification if requested by the client.
     */
    private void maybeShowNotification(SizeMetricApiRequestData request,
            String dataPrefix) {
        if ("true".equals(request.params.get("notify"))) {
            DateData timestamp = new DateData();
            writeHighlightFlags(request, dataPrefix, timestamp);
            addNotification(request, timestamp);
        }
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.data.DateData

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.