Package microsoft.exchange.webservices.data

Examples of microsoft.exchange.webservices.data.Item


  @Override
  public void updateDueDate(final TaskDto task) {
    try {
      final ItemId itemId = new ItemId(task.getExchangeId());
      final Item email = Item.bind(service, itemId, createEmailPropertySet());
      if (task.getDueDate() == null) {
        email.removeExtendedProperty(PR_TASK_DUE_DATE);
      } else {
        email.setExtendedProperty(PR_TASK_DUE_DATE, task.getDueDate());
      }
      email.update(ConflictResolutionMode.AlwaysOverwrite);
    } catch (final Exception e) {
      LOG.error("Unable to update email due date in Exchange", e);
    }
  }
View Full Code Here


  @Override
  public void updateCompletedFlag(final TaskDto task) {
    try {
      final ItemId itemId = new ItemId(task.getExchangeId());
      final Item email = Item.bind(service, itemId, createEmailPropertySet());
      email.setExtendedProperty(PR_TODO_TITLE, task.getName());
      email.setExtendedProperty(PR_TASK_MODE, 0); // Task is not assigned
      if (task.isCompleted()) {
        email.removeExtendedProperty(PR_FLAG_REQUEST);
        email.setExtendedProperty(PR_TASK_COMPLETE, true);
        email.setExtendedProperty(PR_PERCENT_COMPLETE, 1d);
        email.setExtendedProperty(PR_TASK_DATE_COMPLETED, new Date());
        email.setExtendedProperty(PR_TASK_STATUS, 2); // User's work on this task is complete
        email.setExtendedProperty(PR_FLAG_STATUS, PR_FLAG_STATUS_FOLLOWUP_COMPLETE);
      } else {
        email.setExtendedProperty(PR_TASK_START_DATE, new Date());
        email.setExtendedProperty(PR_FLAG_REQUEST, "Follow up");
        email.setExtendedProperty(PR_TODO_ORDINAL_DATE, new Date());
        email.setExtendedProperty(PR_TODO_SUB_ORDINAL, "5555555");
        email.setExtendedProperty(PR_TASK_COMPLETE, false);
        email.setExtendedProperty(PR_PERCENT_COMPLETE, 0d);
        email.removeExtendedProperty(PR_TASK_DATE_COMPLETED);
        email.setExtendedProperty(PR_TASK_STATUS, 0);
        email.setExtendedProperty(PR_FLAG_STATUS, PR_FLAG_STATUS_FOLLOWUP_FLAGGED);
      }
      email.update(ConflictResolutionMode.AlwaysOverwrite);
    } catch (final Exception e) {
      LOG.error("Unable to update email completed flag in Exchange", e);
    }
  }
View Full Code Here

TOP

Related Classes of microsoft.exchange.webservices.data.Item

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.