Examples of ContentProvider


Examples of org.eclipse.jetty.client.api.ContentProvider

    @Override
    protected void sendHeaders(HttpExchange exchange, HttpContent content, Callback callback)
    {
        Request request = exchange.getRequest();
        ContentProvider requestContent = request.getContent();
        long contentLength = requestContent == null ? -1 : requestContent.getLength();
        String path = request.getPath();
        String query = request.getQuery();
        if (query != null)
            path += "?" + query;
        HttpGenerator.RequestInfo requestInfo = new HttpGenerator.RequestInfo(request.getVersion(), request.getHeaders(), contentLength, request.getMethod(), path);
View Full Code Here

Examples of org.gatein.mop.spi.content.ContentProvider

   public void setState(Object state)
   {
      ContentType contentType = getType();
      String mimeType = contentType.getMimeType();
      ContentProvider contentProvider = registry.providers.get(mimeType).getProvider();
      setState(contentProvider, state);
   }
View Full Code Here

Examples of org.gatein.mop.spi.content.ContentProvider

   public void setState(Object state)
   {
      ContentType contentType = getType();
      String mimeType = contentType.getMimeType();
      ContentProvider contentProvider = registry.providers.get(mimeType).getProvider();
      setState(contentProvider, state);
   }
View Full Code Here

Examples of org.gwtlib.client.table.ContentProvider

      new Row(1, new Object[] { "Second row, first column", "Second row, second column" }),
      new Row(2, new Object[] { "Third row, first column" , "Third row, second column" })
    };
    ColumnLayout layout = new ColumnLayout(columns);
    final Table table = new Table(layout);
    ContentProvider provider = new ContentProvider() {
      public void load(int begin, int end, final int sortId, boolean ascending) {
        table.onSuccess(new Rows(rows, 0, -1, false));
      }
    };
    table.setContentProvider(provider);
View Full Code Here

Examples of org.gwtlib.client.table.ContentProvider

      });
    }
    // Now configure the table
    ColumnLayout layout = new ColumnLayout(columns);
    final PagingTable table = new PagingTable(layout, new PagingBar(0, TOTAL_SIZE, 10, new int[] { 5, 10, 20, 50, 100 }));
    ContentProvider provider = new ContentProvider() {
      // Simulate retrieval of sample data, in requested sort order
      public void load(int begin, int end, final int sortId, boolean ascending) {
        final int sign = ascending ? 1 : -1;
        Row[] tmp = new Row[rows.length];
        for(int i = 0; i < rows.length; ++i) tmp[i] = rows[i];
View Full Code Here

Examples of org.projectforge.excel.ContentProvider

  }

  public ExportWorkbook exportCompleteList(final List<HRPlanningDO> list, final ExportWorkbook xls, final Locale locale)
  {

    final ContentProvider contentProvider = new MyContentProvider(xls);

    // create a default Date format and currency column
    xls.setContentProvider(contentProvider);

    final String sheetTitle = PFUserContext.getLocalizedString("hr.plannings");
    final ExportSheet sheet = xls.addSheet(sheetTitle);
    sheet.createFreezePane(8, 1);

    final ExportColumn[] cols = new ExportColumn[] { //
        new I18nExportColumn(Col.USER, "timesheet.user", MyXlsContentProvider.LENGTH_USER),
        new I18nExportColumn(Col.PROJEKT, "fibu.projekt", MyXlsContentProvider.LENGTH_STD),
        new I18nExportColumn(Col.WEEK_OF_YEAR, "calendar.weekOfYearShortLabel", 4),
        new I18nExportColumn(Col.PRIORITY, "resourceplanning.priority", 8),
        new I18nExportColumn(Col.PROBABILITY, "resourceplanning.probability", 16),
        new I18nExportColumn(Col.UNASSIGNEDHOURS, "resourceplanning.unassignedHours", MyXlsContentProvider.LENGTH_STD),
        new I18nExportColumn(Col.MONDAYHOURS, "calendar.shortday.monday", 4),
        new I18nExportColumn(Col.TUESDAYHOURS, "calendar.shortday.tuesday", 4),
        new I18nExportColumn(Col.WEDNESDAYHOURS, "calendar.shortday.wednesday", 4),
        new I18nExportColumn(Col.THURSDAYHOURS, "calendar.shortday.thursday", 4),
        new I18nExportColumn(Col.FRIDAYHOURS, "calendar.shortday.friday", 4),
        new I18nExportColumn(Col.WEEKENDHOURS, "resourceplanning.weekend", MyXlsContentProvider.LENGTH_STD),
        new I18nExportColumn(Col.DESCRIPTION, "timesheet.description", MyXlsContentProvider.LENGTH_EXTRA_LONG)};

    // column property names
    sheet.setColumns(cols);

    final ContentProvider sheetProvider = sheet.getContentProvider();
    // Columnformats
    sheetProvider.putFormat(Col.UNASSIGNEDHOURS, "0.00");
    sheetProvider.putFormat(Col.MONDAYHOURS, "0.00");
    sheetProvider.putFormat(Col.TUESDAYHOURS, "0.00");
    sheetProvider.putFormat(Col.WEDNESDAYHOURS, "0.00");
    sheetProvider.putFormat(Col.THURSDAYHOURS, "0.00");
    sheetProvider.putFormat(Col.FRIDAYHOURS, "0.00");
    sheetProvider.putFormat(Col.WEEKENDHOURS, "0.00");

    final PropertyMapping mapping = new PropertyMapping();
    for (final HRPlanningDO planningSheet : list) {
      // final ProjektDO projekt = projektDao.getById(planningSheet.getProjektId());
      // final PFUserDO user = userGroupCache.getUser(planningSheet.getUserId());
View Full Code Here

Examples of org.projectforge.excel.ContentProvider

   * @return
   */
  public ExportWorkbook exportKWProjects(final List<HRPlanningDO> list, final ExportWorkbook xls, final Locale locale)
  {
    log.info("Exporting resourceplanning list to Calendar View.");
    final ContentProvider contentProvider = new MyContentProvider(xls);
    // create a default Date format and currency column
    xls.setContentProvider(contentProvider);

    final String sheetTitle = PFUserContext.getLocalizedString("exportKWProjects");
    final ExportSheet sheet = xls.addSheet(sheetTitle);
    sheet.createFreezePane(8, 1);

    final ExportColumn[] cols = new ExportColumn[] { new I18nExportColumn(Col.WEEK_OF_YEAR, "calendar.weekOfYearShortLabel", 12),
        new I18nExportColumn(Col.PROJEKT, "fibu.projekt", MyXlsContentProvider.LENGTH_STD),
        new I18nExportColumn(Col.TOTAL_DURATION, "timesheet.totalDuration", MyXlsContentProvider.LENGTH_STD),
        new I18nExportColumn(Col.WORKDAYS, "resourceplanning.workdays", MyXlsContentProvider.LENGTH_STD)};

    // column property names
    sheet.setColumns(cols);

    final ContentProvider sheetProvider = sheet.getContentProvider();
    // Columnformats
    sheetProvider.putFormat(Col.TOTAL_DURATION, "0.00");
    sheetProvider.putFormat(Col.WORKDAYS, "0.00");

    final PropertyMapping mapping = new PropertyMapping();

    // Ermittele Anzahl unterschiedlicher Projekte
    final List<String> projectNames = new ArrayList<String>();
View Full Code Here

Examples of org.projectforge.excel.ContentProvider

  public ExportWorkbook exportKWUsers(final List<HRPlanningDO> list, final ExportWorkbook xls, final Locale locale)
  {
    log.info("Exporting resourceplanning list to Calendar View.");

    final ContentProvider contentProvider = new MyContentProvider(xls);
    // create a default Date format and currency column
    xls.setContentProvider(contentProvider);

    final String sheetTitle = PFUserContext.getLocalizedString("exportKWUsers");
    final ExportSheet sheet = xls.addSheet(sheetTitle);
    sheet.createFreezePane(8, 1);

    final ExportColumn[] cols = new ExportColumn[] { new I18nExportColumn(Col.WEEK_OF_YEAR, "calendar.weekOfYearShortLabel", 12),
        new I18nExportColumn(Col.USER, "timesheet.user", MyXlsContentProvider.LENGTH_USER),
        new I18nExportColumn(Col.TOTAL_DURATION, "timesheet.totalDuration", MyXlsContentProvider.LENGTH_STD),
        new I18nExportColumn(Col.WORKDAYS, "resourceplanning.workdays", MyXlsContentProvider.LENGTH_STD)};

    // column property names
    sheet.setColumns(cols);

    final ContentProvider sheetProvider = sheet.getContentProvider();
    // Columnformats
    sheetProvider.putFormat(Col.TOTAL_DURATION, "0.00");
    sheetProvider.putFormat(Col.WORKDAYS, "0.00");

    final PropertyMapping mapping = new PropertyMapping();

    // Ermittele Anzahl unterschiedlicher User
    final List<String> userNames = new ArrayList<String>();
View Full Code Here

Examples of org.projectforge.excel.ContentProvider

   * @return
   */
  public ExportWorkbook exportProjectUserView(final List<HRPlanningDO> list, final ExportWorkbook xls)
  {
    log.info("Exporting resourceplanning list to Calendar View.");
    final ContentProvider contentProvider = new MyContentProvider(xls);
    // create a default Date format and currency column
    xls.setContentProvider(contentProvider);

    final String sheetTitle = PFUserContext.getLocalizedString("exportProjectsUsers");
    final ExportSheet sheet = xls.addSheet(sheetTitle);
View Full Code Here

Examples of org.projectforge.excel.ContentProvider

  public void addDebitorInvoicesSheet(final MyExcelExporter exporter, final String title, final Collection<RechnungDO> list)
  {
    final ExportSheet sheet = exporter.addSheet(title);
    sheet.createFreezePane(0, 1);
    final ContentProvider sheetProvider = sheet.getContentProvider();

    final ExportColumn[] cols = new ExportColumn[6];
    int i = 0;
    cols[i++] = createColumn(exporter, sheet, AbstractRechnungDO.class, "datum");
    cols[i++] = createColumn(exporter, sheet, AbstractRechnungDO.class, "faelligkeit");
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.