/** * Validates this instance. * * @throws Exception the exception */ @Override public void validate() throws Exception { super.validate(); // Validate folder permissions try { if (this.getPropertyBag().contains(FolderSchema.Permissions)) { this.getPermissions().validate(); } } catch (ServiceLocalException e) { LOG.error(e); } }
/** * Gets the total number of unread messages in this * conversation across all folder in the mailbox. * * @return returnValue * @throws ArgumentException */ public int getGlobalUnreadCount() throws ArgumentException { int returnValue = 0; if (this.getPropertyBag().contains(ConversationSchema.GlobalUnreadCount)) { OutParam<Integer> out = new OutParam<Integer>(); this.getPropertyBag().tryGetPropertyType(Integer.class, ConversationSchema.GlobalUnreadCount, out); returnValue = out.getParam().intValue(); } return returnValue; }
/** * Gets the total number of unread messages in this * conversation in the current folder only. * * @return returnValue * @throws ArgumentException */ public int getUnreadCount() throws ArgumentException { int returnValue = 0; /**This property need not be present hence the * property bag may not contain it. * Check for the presence of this property before accessing it. */ if (this.getPropertyBag().contains(ConversationSchema.UnreadCount)) { OutParam<Integer> out = new OutParam<Integer>(); this.getPropertyBag().tryGetPropertyType(Integer.class, ConversationSchema.UnreadCount, out); returnValue = out.getParam().intValue(); } return returnValue; }
/** * Gets the topic of this Conversation. * * @return value * @throws ArgumentException */ public String getTopic() throws ArgumentException { String returnValue = ""; /**This property need not be present hence the * property bag may not contain it. *Check for the presence of this property before accessing it. */ if (this.getPropertyBag().contains(ConversationSchema.Topic)) { OutParam<String> out = new OutParam<String>(); this.getPropertyBag().tryGetPropertyType(String.class, ConversationSchema.Topic, out); returnValue = out.getParam(); } return returnValue; }
/** * Gets a list of all the people who have sent * messages that are currently unread in this * conversation across all folder in the mailbox. * * @return unreadSenders * @throws ArgumentException */ public StringList getGlobalUniqueUnreadSenders() throws ArgumentException { StringList unreadSenders = null; // This property need not be present hence //the property bag may not contain it. // Check for the presence of this property before accessing it. if (this.getPropertyBag().contains(ConversationSchema.GlobalUniqueUnreadSenders)) { OutParam<StringList> out = new OutParam<StringList>(); this.getPropertyBag().tryGetPropertyType(StringList.class, ConversationSchema.GlobalUniqueUnreadSenders, out); unreadSenders = out.getParam(); } return unreadSenders; }
/** * Gets a list summarizing the categories stamped on * messages in this conversation, across all folder in the mailbox. * * @return returnValue * @throws ArgumentException */ public StringList getGlobalCategories() throws ArgumentException { StringList returnValue = null; // This property need not be present hence the //property bag may not contain it. // Check for the presence of this property before accessing it. if (this.getPropertyBag().contains(ConversationSchema.GlobalCategories)) { OutParam<StringList> out = new OutParam<StringList>(); this.getPropertyBag().tryGetPropertyType(StringList.class, ConversationSchema.GlobalCategories, out); returnValue = out.getParam(); } return returnValue; }
/** * Gets a list of all the people who have sent messages * that are currently unread in this conversation in * the current folder only. * * @return unreadSenders * @throws ArgumentException */ public StringList getUniqueUnreadSenders() throws ArgumentException { StringList unreadSenders = null; /**This property need not be present hence * the property bag may not contain it. *Check for the presence of this property before accessing it. */ if (this.getPropertyBag().contains(ConversationSchema.UniqueUnreadSenders)) { OutParam<StringList> out = new OutParam<StringList>(); this.getPropertyBag().tryGetPropertyType(StringList.class, ConversationSchema.UniqueUnreadSenders, out); unreadSenders = out.getParam(); } return unreadSenders; }
/** * Gets a list summarizing the categories stamped on * messages in this conversation, in the current folder only. * * @return value * @throws ArgumentException */ public StringList getCategories() throws ArgumentException { StringList returnValue = null; /**This property need not be present hence * the property bag may not contain it. * Check for the presence of this property before accessing it. */ if (this.getPropertyBag().contains(ConversationSchema.Categories)) { OutParam<StringList> out = new OutParam<StringList>(); this.getPropertyBag().tryGetPropertyType(StringList.class, ConversationSchema.Categories, out); returnValue = out.getParam(); } return returnValue; }
/** * Gets the flag status for this conversation, calculated * by aggregating individual messages flag status in the current folder. * * @return returnValue * @throws ArgumentException */ public ConversationFlagStatus getFlagStatus() throws ArgumentException { ConversationFlagStatus returnValue = ConversationFlagStatus.NotFlagged; // This property need not be present hence the //property bag may not contain it. // Check for the presence of this property before accessing it. if (this.getPropertyBag().contains(ConversationSchema.FlagStatus)) { OutParam<ConversationFlagStatus> out = new OutParam<ConversationFlagStatus>(); this.getPropertyBag().tryGetPropertyType( ConversationFlagStatus.class, ConversationSchema.FlagStatus, out); returnValue = out.getParam(); } return returnValue; }
/** * Gets the flag status for this conversation, calculated by aggregating * individual messages flag status across all folder in the mailbox. * * @return returnValue * @throws ArgumentException */ public ConversationFlagStatus getGlobalFlagStatus() throws ArgumentException { ConversationFlagStatus returnValue = ConversationFlagStatus.NotFlagged; // This property need not be present hence the //property bag may not contain it. // Check for the presence of this property before accessing it. if (this.getPropertyBag().contains(ConversationSchema.GlobalFlagStatus)) { OutParam<ConversationFlagStatus> out = new OutParam<ConversationFlagStatus>(); this.getPropertyBag().tryGetPropertyType( ConversationFlagStatus.class, ConversationSchema.GlobalFlagStatus, out); returnValue = out.getParam(); } return returnValue; }
/** * Writes the bag's property to XML. * * @param writer The writer to write the property to. * @throws Exception the exception */ public void writeToXml(EwsServiceXmlWriter writer) throws Exception { writer.writeStartElement(XmlNamespace.Types, this.getOwner() .getXmlElementName()); Iterator<PropertyDefinition> it = this.getOwner().getSchema() .iterator(); while (it.hasNext()) { PropertyDefinition propertyDefinition = it.next(); // The following test should not be necessary since the property bag // prevents // property to be set if they don't have the CanSet flag, but it // doesn't hurt... if (propertyDefinition .hasFlag(PropertyDefinitionFlags.CanSet, writer.getService().getRequestedServerVersion())) { if (this.contains(propertyDefinition)) { propertyDefinition.writePropertyValueToXml(writer, this, false /* isUpdateOperation */); } } } writer.writeEndElement(); }
this.getPropertyBag().isPropertyUpdated(AppointmentSchema.Recurrence)) { if (!this.getPropertyBag().contains(AppointmentSchema.StartTimeZone)) { throw new ServiceLocalException("StartTimeZone required when setting the Start, End, IsAllDayEvent, " + "or Recurrence property. You must load or assign this property "
/** * Validates this instance. * * @throws Exception the exception */ @Override public void validate() throws Exception { super.validate(); // Validate folder permissions try { if (this.getPropertyBag().contains(FolderSchema.Permissions)) { this.getPermissions().validate(); } } catch (ServiceLocalException e) { LOG.error(e); } }
/** * Gets the total number of unread messages in this * conversation across all folder in the mailbox. * * @return returnValue * @throws ArgumentException */ public int getGlobalUnreadCount() throws ArgumentException { int returnValue = 0; if (this.getPropertyBag().contains(ConversationSchema.GlobalUnreadCount)) { OutParam<Integer> out = new OutParam<Integer>(); this.getPropertyBag().tryGetPropertyType(Integer.class, ConversationSchema.GlobalUnreadCount, out); returnValue = out.getParam().intValue(); } return returnValue; }
/** * Gets the total number of unread messages in this * conversation in the current folder only. * * @return returnValue * @throws ArgumentException */ public int getUnreadCount() throws ArgumentException { int returnValue = 0; /**This property need not be present hence the * property bag may not contain it. * Check for the presence of this property before accessing it. */ if (this.getPropertyBag().contains(ConversationSchema.UnreadCount)) { OutParam<Integer> out = new OutParam<Integer>(); this.getPropertyBag().tryGetPropertyType(Integer.class, ConversationSchema.UnreadCount, out); returnValue = out.getParam().intValue(); } return returnValue; }
/** * Gets a list summarizing the categories stamped on * messages in this conversation, across all folder in the mailbox. * * @return returnValue * @throws ArgumentException */ public StringList getGlobalCategories() throws ArgumentException { StringList returnValue = null; // This property need not be present hence the //property bag may not contain it. // Check for the presence of this property before accessing it. if (this.getPropertyBag().contains(ConversationSchema.GlobalCategories)) { OutParam<StringList> out = new OutParam<StringList>(); this.getPropertyBag().tryGetPropertyType(StringList.class, ConversationSchema.GlobalCategories, out); returnValue = out.getParam(); } return returnValue; }
/** * Gets the flag status for this conversation, calculated by aggregating * individual messages flag status across all folder in the mailbox. * * @return returnValue * @throws ArgumentException */ public ConversationFlagStatus getGlobalFlagStatus() throws ArgumentException { ConversationFlagStatus returnValue = ConversationFlagStatus.NotFlagged; // This property need not be present hence the //property bag may not contain it. // Check for the presence of this property before accessing it. if (this.getPropertyBag().contains(ConversationSchema.GlobalFlagStatus)) { OutParam<ConversationFlagStatus> out = new OutParam<ConversationFlagStatus>(); this.getPropertyBag().tryGetPropertyType( ConversationFlagStatus.class, ConversationSchema.GlobalFlagStatus, out); returnValue = out.getParam(); } return returnValue; }
/** * Gets a list of all the people who have sent * messages that are currently unread in this * conversation across all folder in the mailbox. * * @return unreadSenders * @throws ArgumentException */ public StringList getGlobalUniqueUnreadSenders() throws ArgumentException { StringList unreadSenders = null; // This property need not be present hence //the property bag may not contain it. // Check for the presence of this property before accessing it. if (this.getPropertyBag().contains(ConversationSchema.GlobalUniqueUnreadSenders)) { OutParam<StringList> out = new OutParam<StringList>(); this.getPropertyBag().tryGetPropertyType(StringList.class, ConversationSchema.GlobalUniqueUnreadSenders, out); unreadSenders = out.getParam(); } return unreadSenders; }
/** * Gets the topic of this Conversation. * * @return value * @throws ArgumentException */ public String getTopic() throws ArgumentException { String returnValue = ""; /**This property need not be present hence the * property bag may not contain it. *Check for the presence of this property before accessing it. */ if (this.getPropertyBag().contains(ConversationSchema.Topic)) { OutParam<String> out = new OutParam<String>(); this.getPropertyBag().tryGetPropertyType(String.class, ConversationSchema.Topic, out); returnValue = out.getParam(); } return returnValue; }
/** * Gets a list of all the people who have sent messages * that are currently unread in this conversation in * the current folder only. * * @return unreadSenders * @throws ArgumentException */ public StringList getUniqueUnreadSenders() throws ArgumentException { StringList unreadSenders = null; /**This property need not be present hence * the property bag may not contain it. *Check for the presence of this property before accessing it. */ if (this.getPropertyBag().contains(ConversationSchema.UniqueUnreadSenders)) { OutParam<StringList> out = new OutParam<StringList>(); this.getPropertyBag().tryGetPropertyType(StringList.class, ConversationSchema.UniqueUnreadSenders, out); unreadSenders = out.getParam(); } return unreadSenders; }