/** * Removes the contact's picture. * * @throws Exception the exception */ public void removeContactPicture() throws Exception { EwsUtilities.validateMethodVersion(this.getService(), ExchangeVersion.Exchange2010, "RemoveContactPicture"); if (!this.getPropertyBag().isPropertyLoaded(ContactSchema.Attachments)) { throw new PropertyException("The attachment collection must be loaded."); } internalRemoveContactPicture(); }
/** * Retrieves the file attachment that holds the contact's picture. * * @return The file attachment that holds the contact's picture. * @throws ServiceLocalException the service local exception */ public FileAttachment getContactPictureAttachment() throws ServiceLocalException { EwsUtilities.validateMethodVersion(this.getService(), ExchangeVersion.Exchange2010, "GetContactPictureAttachment"); if (!this.getPropertyBag().isPropertyLoaded(ContactSchema.Attachments)) { throw new PropertyException("The attachment collection must be loaded."); } for (Attachment fileAttachment : this.getAttachments()) { if (fileAttachment instanceof FileAttachment) { if (((FileAttachment) fileAttachment).isContactPhoto()) { return (FileAttachment) fileAttachment; } } } return null; }
if (!this.isPropertyLoaded(propertyDefinition)) { serviceExceptionOutParam .setParam(new ServiceObjectPropertyException(
/** * Removes the contact's picture. * * @throws Exception the exception */ public void removeContactPicture() throws Exception { EwsUtilities.validateMethodVersion(this.getService(), ExchangeVersion.Exchange2010, "RemoveContactPicture"); if (!this.getPropertyBag().isPropertyLoaded(ContactSchema.Attachments)) { throw new PropertyException("The attachment collection must be loaded."); } internalRemoveContactPicture(); }
/** * Retrieves the file attachment that holds the contact's picture. * * @return The file attachment that holds the contact's picture. * @throws ServiceLocalException the service local exception */ public FileAttachment getContactPictureAttachment() throws ServiceLocalException { EwsUtilities.validateMethodVersion(this.getService(), ExchangeVersion.Exchange2010, "GetContactPictureAttachment"); if (!this.getPropertyBag().isPropertyLoaded(ContactSchema.Attachments)) { throw new PropertyException("The attachment collection must be loaded."); } for (Attachment fileAttachment : this.getAttachments()) { if (fileAttachment instanceof FileAttachment) { if (((FileAttachment) fileAttachment).isContactPhoto()) { return (FileAttachment) fileAttachment; } } } return null; }
if (!this.isPropertyLoaded(propertyDefinition)) { serviceExceptionOutParam .setParam(new ServiceObjectPropertyException(