Represents the base class for e-mail related responses (Reply, Reply all and Forward).
var ResponseMessage = (function (_super) {
__extends(ResponseMessage, _super);
Option name | Type | Description |
---|---|---|
referenceItem | Item | The reference item. |
responseType | ResponseMessageType | Type of the response. |
Initializes a new instance of the class.
function ResponseMessage(referenceItem, responseType) {
_super.call(this, referenceItem);
this.responseType = ResponseMessageType_1.ResponseMessageType.Reply;
this.responseType = responseType;
}
Object.defineProperty(ResponseMessage.prototype, "ResponseType", {
Gets a value indicating the type of response this object represents.
get: function () {
return this.responseType;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ResponseMessage.prototype, "Body", {
Gets or sets the body of the response.
get: function () {
return this.PropertyBag._getItem(ItemSchema_1.ItemSchema.Body);
},
set: function (value) {
this.PropertyBag._setItem(ItemSchema_1.ItemSchema.Body, value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ResponseMessage.prototype, "ToRecipients", {
Gets a list of recipients the response will be sent to.
get: function () {
return this.PropertyBag._getItem(EmailMessageSchema_1.EmailMessageSchema.ToRecipients);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ResponseMessage.prototype, "CcRecipients", {
Gets a list of recipients the response will be sent to as Cc.
get: function () {
return this.PropertyBag._getItem(EmailMessageSchema_1.EmailMessageSchema.CcRecipients);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ResponseMessage.prototype, "BccRecipients", {
Gets a list of recipients this response will be sent to as Bcc.
get: function () {
return this.PropertyBag._getItem(EmailMessageSchema_1.EmailMessageSchema.BccRecipients);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ResponseMessage.prototype, "Subject", {
Gets or sets the subject of this response.
get: function () {
return this.PropertyBag._getItem(ItemSchema_1.ItemSchema.Subject);
},
set: function (value) {
this.PropertyBag._setItem(ItemSchema_1.ItemSchema.Subject, value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ResponseMessage.prototype, "BodyPrefix", {
Gets or sets the body prefix of this response. The body prefix will be prepended to the original
message's body when the response is created.
get: function () {
return this.PropertyBag._getItem(ResponseObjectSchema_1.ResponseObjectSchema.BodyPrefix);
},
set: function (value) {
this.PropertyBag._setItem(ResponseObjectSchema_1.ResponseObjectSchema.BodyPrefix, value);
},
enumerable: true,
configurable: true
});
Gets the minimum required server version.
ResponseMessage.prototype.GetMinimumRequiredServerVersion = function () { return ExchangeVersion_1.ExchangeVersion.Exchange2007_SP1; };
Internal method to return the schema associated with this type of object.
ResponseMessage.prototype.GetSchema = function () { return ResponseMessageSchema_1.ResponseMessageSchema.Instance; };
Get XML Element Name - workaround for c# attributes
ResponseMessage.prototype.GetXmlElementName = function () { return this.GetXmlElementNameOverride(); };
This methods lets subclasses of ServiceObject override the default mechanism by which the XML element name associated with their type is retrieved.
ResponseMessage.prototype.GetXmlElementNameOverride = function () {
switch (this.responseType) {
case ResponseMessageType_1.ResponseMessageType.Reply:
return XmlElementNames_1.XmlElementNames.ReplyToItem;
case ResponseMessageType_1.ResponseMessageType.ReplyAll:
return XmlElementNames_1.XmlElementNames.ReplyAllToItem;
case ResponseMessageType_1.ResponseMessageType.Forward:
return XmlElementNames_1.XmlElementNames.ForwardItem;
default:
EwsLogging_1.EwsLogging.Assert(false, "ResponseMessage.GetXmlElementNameOverride", "An unexpected value for responseType could not be handled.");
return null; // Because the compiler wants it
}
};
return ResponseMessage;
})(ResponseObject_1.ResponseObject);
exports.ResponseMessage = ResponseMessage;