Exemple #1
0
  public TableType generateDefaultTable(String gid) {
    final TableType table = new TableType();
    table.setId(gid);
    table.setTitle(ILMLCoreConstants.TITLE_PREFIX + gid);
    final ContentType ct = ContentType.fromValue(ILguiItem.CONTENT_JOBS);
    table.setContenttype(ct);

    for (final ColumnlayoutType columnLayout :
        lguiItem.getLayoutAccess().getTableLayout(gid).getColumn()) {
      if (columnLayout.isActive()) {
        final ColumnType column = new ColumnType();
        column.setId(columnLayout.getCid());
        column.setName(columnLayout.getKey());
        generateDefaultSorting(column);
        if (columnLayout.getKey().equals(ILguiItem.JOB_STATUS)) {
          column.setType(ITableColumnLayout.COLUMN_TYPE_MANDATORY);
          if (gid.equals(ILMLCoreConstants.ID_ACTIVE_JOBS_VIEW)) {
            generateDefaultPattern(JobStatusData.RUNNING, ILMLCoreConstants.EQ, columnLayout);
          } else {
            generateDefaultPattern(JobStatusData.RUNNING, ILMLCoreConstants.NEQ, columnLayout);
          }
        }
        table.getColumn().add(column);
      }
    }
    jaxbUtil.addTable(lgui, table);
    return table;
  }