Package org.apache.sirona.counters

Examples of org.apache.sirona.counters.Unit$Time


    @Regex("/counter/([^/]*)/([^/]*)\\?name=(.*)")
    public Template counterDetail(final String role, final String unit, final String name, final HttpServletRequest request) {
        final Counter counter = Repository.INSTANCE.getCounter(new Counter.Key(new Role(decode(role), Unit.get(unit)), name)); // name is already decoded by servlet container

        final Map<String, String[]> params = request.getParameterMap();
        final Unit timeUnit = timeUnit(params);
        final String format = format(params, HTMLFormat.NUMBER_FORMAT);

        final Map<String, Collection<String>> counters = new TreeMap<String, Collection<String>>();
        if (AggregatedCounter.class.isInstance(counter)) {
            for (final Map.Entry<String, ? extends Counter> marker : AggregatedCounter.class.cast(counter).aggregated().entrySet()) {
View Full Code Here


    private static final String SEPARATOR = Configuration.getProperty(Configuration.CONFIG_PROPERTY_PREFIX + "csv.separator", ";");
    public static final String HEADER = "Monitor" + SEPARATOR + "Role" + SEPARATOR + toCsv(ATTRIBUTES_ORDERED_LIST);

    @Override
    public Template render(final Map<String, ?> params) {
        final Unit timeUnit = timeUnit(params);
        return new Template("/templates/report/report-csv.vm",
                        new MapBuilder<String, Object>()
                        .set("headers", HEADER)
                        .set("separator", SEPARATOR)
                        .set("lines", snapshot(timeUnit, format(params, null)))
View Full Code Here

    }

    public void setNotBefore(
        Date    date)
    {
        tbsGen.setStartDate(new Time(date));
    }
View Full Code Here

    }

    public void setNotAfter(
        Date    date)
    {
        tbsGen.setEndDate(new Time(date));
    }
View Full Code Here

    }

    public void setNotBefore(
        Date    date)
    {
        tbsGen.setStartDate(new Time(date));
    }
View Full Code Here

    }

    public void setNotAfter(
        Date    date)
    {
        tbsGen.setEndDate(new Time(date));
    }
View Full Code Here

    }

    public void setThisUpdate(
        Date    date)
    {
        tbsGen.setThisUpdate(new Time(date));
    }
View Full Code Here

    }

    public void setNextUpdate(
        Date    date)
    {
        tbsGen.setNextUpdate(new Time(date));
    }
View Full Code Here

     * Reason being as indicated by CRLReason, i.e. CRLReason.keyCompromise
     * or 0 if CRLReason is not to be used
     **/
    public void addCRLEntry(BigInteger userCertificate, Date revocationDate, int reason)
    {
        tbsGen.addCRLEntry(new ASN1Integer(userCertificate), new Time(revocationDate), reason);
    }
View Full Code Here

     * Reason being as indicated by CRLReason, i.e. CRLReason.keyCompromise
     * or 0 if CRLReason is not to be used
     **/
    public void addCRLEntry(BigInteger userCertificate, Date revocationDate, int reason, Date invalidityDate)
    {
        tbsGen.addCRLEntry(new ASN1Integer(userCertificate), new Time(revocationDate), reason, new ASN1GeneralizedTime(invalidityDate));
    }
View Full Code Here

TOP

Related Classes of org.apache.sirona.counters.Unit$Time

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.