Examples of DateTimeService


Examples of com.vaadin.terminal.gwt.client.DateTimeService

    private boolean showISOWeekNumbers = false;

    public VDateField() {
        setStyleName(CLASSNAME);
        dts = new DateTimeService();
        sinkEvents(VTooltip.TOOLTIP_EVENTS);
    }
View Full Code Here

Examples of com.vaadin.terminal.gwt.client.DateTimeService

            return DateTimeService.getMilliseconds(value);
        }

        private DateTimeService getDateTimeService() {
            if (dateTimeService == null) {
                dateTimeService = new DateTimeService();
            }
            return dateTimeService;
        }
View Full Code Here

Examples of com.vaadin.terminal.gwt.client.DateTimeService

    private boolean showISOWeekNumbers = false;

    public VDateField() {
        setStyleName(CLASSNAME);
        dts = new DateTimeService();
        sinkEvents(VTooltip.TOOLTIP_EVENTS);
    }
View Full Code Here

Examples of com.vaadin.terminal.gwt.client.DateTimeService

            return DateTimeService.getMilliseconds(value);
        }

        private DateTimeService getDateTimeService() {
            if (dateTimeService == null) {
                dateTimeService = new DateTimeService();
            }
            return dateTimeService;
        }
View Full Code Here

Examples of org.kuali.rice.core.api.datetime.DateTimeService

    final String dtFormat = "dd MMM yyyy hh:mm a";
    when(config.getProperty(CoreConstants.STRING_TO_DATE_FORMATS))
        .thenReturn(dtFormat);
    ConfigContext.overrideConfig(Thread.currentThread()
        .getContextClassLoader(), config);
    DateTimeService dtSvc = mock(DateTimeService.class);
    SimpleDateFormat sdf = new SimpleDateFormat(dtFormat);
    when(dtSvc.toDateTimeString(date)).thenReturn(sdf.format(date));
    attributeValueReader.setDateTimeService(dtSvc);
    // create allowed formats
    List<String> allowedFormats = new ArrayList<String>();
    allowedFormats.add(dtFormat);
    allowedFormats.add("d MMM yyyy hh:mm a");
View Full Code Here

Examples of org.kuali.rice.core.api.datetime.DateTimeService

    event.setType(eventType);
   
    SimpleDateFormat sdf = new SimpleDateFormat(MartinlawConstants.DEFAULT_TIMESTAMP_FORMAT);
    final String formattedDate = sdf.format(event.getStartDate());
   
    DateTimeService dtSvc = mock(DateTimeService.class);
    when(dtSvc.toDateTimeString(same(event.getStartDate()))).thenReturn(formattedDate);
    event.setDateTimeService(dtSvc);
   
    return event;
  }
View Full Code Here

Examples of org.rhq.server.metrics.DateTimeService

        }
        metricsServer = new MetricsServer();
        metricsServer.setDAO(metricsDAO);
        metricsServer.setConfiguration(metricsConfiguration);

        DateTimeService dateTimeService = new DateTimeService();
        dateTimeService.setConfiguration(metricsConfiguration);
        metricsServer.setDateTimeService(dateTimeService);
        metricsServer.init();
    }
View Full Code Here

Examples of org.rhq.server.metrics.DateTimeService

    @BeforeClass
    public void initClass() {
        MetricsConfiguration configuration = new MetricsConfiguration();

        dateTimeService = new DateTimeService();
        dateTimeService.setConfiguration(configuration);

        dao = new MetricsDAO(storageSession, configuration);
    }
View Full Code Here

Examples of org.rhq.server.metrics.DateTimeService

        ObjectMapper mapper = new ObjectMapper(jsonFactory);
        JsonNode root = mapper.readTree(jsonFile);
        SimulationPlan simulation = new SimulationPlan();

        simulation.setIntervalType(SimulationPlan.IntervalType.fromText(getString(root.get("intervalType"), "minutes")));
        DateTimeService dateTimeService;

        switch (simulation.getIntervalType()) {
        case SECONDS:
            simulation.setCollectionInterval(getLong(root.get("collectionInterval"), 20L));
            simulation.setAggregationInterval(getLong(root.get("aggregationInterval"), 2500L));
            simulation.setMetricsServerConfiguration(createSecondsConfiguration());
            simulation.setMetricsReportInterval(getInt(root.get("metricsReportInterval"), 30));
            simulation.setSimulationRate(1440);
            dateTimeService = new SecondsDateTimeService();
            break;
        case MINUTES:
            simulation.setCollectionInterval(getLong(root.get("collectionInterval"), 1250L));
            simulation.setAggregationInterval(getLong(root.get("aggregationInterval"), 150000L));
            simulation.setMetricsServerConfiguration(createMinutesConfiguration());
            simulation.setMetricsReportInterval(getInt(root.get("metricsReportInterval"), 180));
            simulation.setDateTimeService(new MinutesDateTimeService());
            simulation.setSimulationRate(2400);
            dateTimeService = new MinutesDateTimeService();
            break;
        default// HOURS
            simulation.setCollectionInterval(getLong(root.get("collectionInterval"), 30000L));
            simulation.setAggregationInterval(3600000L);
            simulation.setMetricsServerConfiguration(new MetricsConfiguration());
            simulation.setMetricsReportInterval(getInt(root.get("metricsReportInterval"), 1200));
            simulation.setSimulationRate(1000);
            dateTimeService = new DateTimeService();
        }

        simulation.setSimulationType(SimulationPlan.SimulationType.fromText(getString(root.get("simulationType"),
            "threaded")));
        if (SimulationType.SEQUENTIAL.equals(simulation.getSimulationType())) {
            dateTimeService = new SimulatedDateTimeService();
        }

        dateTimeService.setConfiguration(simulation.getMetricsServerConfiguration());
        simulation.setDateTimeService(dateTimeService);

        simulation.setNumMeasurementCollectors(getInt(root.get("numMeasurementCollectors"), 5));
        simulation.setNumReaders(getInt(root.get("numReaders"), 1));
        simulation.setReaderThreadPoolSize(getInt(root.get("readerThreadPoolSize"), 1));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.