Examples of DashboardRepository


Examples of nl.topicus.onderwijs.dashboard.modules.DashboardRepository

        new AbstractReadOnlyModel<WeatherReport>() {
          private static final long serialVersionUID = 1L;

          @Override
          public WeatherReport getObject() {
            DashboardRepository repository = WicketApplication
                .get().getRepository();
            return repository.getData(Weather.class).get(key)
                .getValue();
          }
        });
    add(dataResource);
    panel = new WebMarkupContainer("panel");
View Full Code Here

Examples of nl.topicus.onderwijs.dashboard.modules.DashboardRepository

        new AbstractReadOnlyModel<BuienRadar>() {
          private static final long serialVersionUID = 1L;

          @Override
          public BuienRadar getObject() {
            DashboardRepository repository = WicketApplication
                .get().getRepository();
            Map<Key, Buien> data = repository.getData(Buien.class);
            Buien buien = data.get(key);
            BuienRadar value = buien.getValue();
            return value;
          }
        });
View Full Code Here

Examples of nl.topicus.onderwijs.dashboard.modules.DashboardRepository

        new AbstractReadOnlyModel<List<Alert>>() {
          private static final long serialVersionUID = 1L;

          @Override
          public List<Alert> getObject() {
            DashboardRepository repository = WicketApplication
                .get().getRepository();
            List<Alert> ret = new ArrayList<Alert>(repository
                .getData(ProjectAlerts.class)
                .get(Summary.get()).getValue());
            Collections.sort(ret, new Comparator<Alert>() {
              @Override
              public int compare(Alert o1, Alert o2) {
View Full Code Here

Examples of nl.topicus.onderwijs.dashboard.modules.DashboardRepository

    }
  }

  private <T extends DataSource<?>> ColumnData getColumn(String label,
      Class<T> datasourceType) {
    DashboardRepository repository = WicketApplication.get()
        .getRepository();
    ColumnData column = new ColumnData();
    column.setLabel(label);
    Map<Key, T> data = repository.getData(datasourceType);

    for (Entry<Key, T> entry : data.entrySet()) {
      Object value = entry.getValue().getValue();
      if (value == null)
        continue;
View Full Code Here

Examples of nl.topicus.onderwijs.dashboard.modules.DashboardRepository

    return ret;
  }

  private void getDataFromDataSource(Map<String, BarData> ret,
      Class<? extends DataSource<? extends Number>> datasourceType) {
    DashboardRepository repository = WicketApplication.get()
        .getRepository();

    Project project = getProject();

    Map<Key, ? extends DataSource<? extends Number>> data = repository
        .getData(datasourceType);
    DataSource<? extends Number> datasource = data.get(project);

    if (datasource != null) {
      long max = 0;
View Full Code Here

Examples of nl.topicus.onderwijs.dashboard.modules.DashboardRepository

        new AbstractReadOnlyModel<List<TwitterStatus>>() {
          private static final long serialVersionUID = 1L;

          @Override
          public List<TwitterStatus> getObject() {
            DashboardRepository repository = WicketApplication
                .get().getRepository();
            return repository.getData(TwitterTimeline.class)
                .get(key).getValue();
          }
        });
    add(timelineDataResource);

    this.mentionsDataResource = new JsonResourceBehavior<List<TwitterStatus>>(
        new AbstractReadOnlyModel<List<TwitterStatus>>() {
          private static final long serialVersionUID = 1L;

          @Override
          public List<TwitterStatus> getObject() {
            DashboardRepository repository = WicketApplication
                .get().getRepository();
            return repository.getData(TwitterMentions.class)
                .get(key).getValue();
          }
        });
    add(mentionsDataResource);
  }
View Full Code Here

Examples of nl.topicus.onderwijs.dashboard.modules.DashboardRepository

          private static final long serialVersionUID = 1L;

          @Override
          public Object getObject() {
            try {
              DashboardRepository repository = WicketApplication
                  .get().getRepository();
              return repository
                  .getData(TablePanel.this.dataSource)
                  .get(TablePanel.this.key).getValue();
            } catch (NullPointerException e) {
              log.error("Cannot find datasource for "
                  + TablePanel.this.dataSource.getName()
View Full Code Here

Examples of nl.topicus.onderwijs.dashboard.modules.DashboardRepository

        new AbstractReadOnlyModel<EventData>() {
          private static final long serialVersionUID = 1L;

          @Override
          public EventData getObject() {
            DashboardRepository repository = WicketApplication
                .get().getRepository();
            return new EventData(repository
                .getData(EventsPanel.this.dataSource)
                .get(EventsPanel.this.key).getValue());
          }
        });
    add(dataResource);
View Full Code Here

Examples of nl.topicus.onderwijs.dashboard.modules.DashboardRepository

  }

  @Override
  public List<Event> getValue() {
    List<Event> ret = new ArrayList<Event>();
    DashboardRepository repository = WicketApplication.get().getRepository();
    for (Key curKey : repository.getKeys(Key.class)) {
      Collection<DataSource<?>> dataSources = repository.getData(curKey);
      for (DataSource<?> curDataSource : dataSources) {
        if (curDataSource instanceof EventSumImpl)
          continue;
        if (curDataSource instanceof Events) {
          List<Event> newEvents = ((Events) curDataSource).getValue();
View Full Code Here

Examples of nl.topicus.onderwijs.dashboard.modules.DashboardRepository

  }

  @Override
  public List<Alert> getValue() {
    List<Alert> ret = new ArrayList<Alert>();
    DashboardRepository repository = WicketApplication.get().getRepository();
    Collection<DataSource<?>> dataSources = repository.getData(project);
    for (DataSource<?> curDataSource : dataSources) {
      if (curDataSource instanceof ProjectAlerts)
        continue;

      if (curDataSource instanceof Alerts) {
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.