Module: Viewpoint::EWS

Included in:
CalendarAccessors, Connection, ConvertAccessors, FolderAccessors, ItemAccessors, MailboxAccessors, MessageAccessors, PushSubscriptionAccessors, RoomAccessors, RoomlistAccessors, SOAP::EwsBuilder, SOAP::EwsParser, SOAP::EwsSaxDocument, SOAP::ExchangeWebService, Types::Attachment, Types::CalendarFolder, Types::CalendarItem, Types::Contact, Types::ContactsFolder, Types::DistributionList, Types::Event, Types::ExportItemsResponseMessage, Types::Folder, Types::GenericFolder, Types::Item, Types::MailboxUser, Types::MeetingCancellation, Types::MeetingMessage, Types::MeetingRequest, Types::MeetingResponse, Types::Message, Types::OutOfOffice, Types::SearchFolder, Types::StatusEvent, Types::Task, Types::TasksFolder, EWSClient
Defined in:
lib/ews/exceptions/exceptions.rb,
lib/ews/soap.rb,
lib/ews/types.rb,
lib/ews/impersonation.rb,
lib/viewpoint/logging.rb,
lib/ews/templates/task.rb,
lib/ews/templates/message.rb,
lib/viewpoint/logging/config.rb,
lib/ews/templates/forward_item.rb,
lib/ews/templates/calendar_item.rb,
lib/ews/templates/reply_to_item.rb,
lib/ews/types/item_field_uri_map.rb

Overview

This file is part of Viewpoint; the Ruby library for Microsoft Exchange Web Services.

Copyright © 2011 Dan Wanek <dan.wanek@gmail.com>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Defined Under Namespace

Modules: CalendarAccessors, ConnectionHelper, ConvertAccessors, Errors, FolderAccessors, ItemAccessors, ItemFieldUriMap, MailboxAccessors, MessageAccessors, PushSubscriptionAccessors, RoomAccessors, RoomlistAccessors, SOAP, Template, Types Classes: Connection, EwsBadArgumentError, EwsCreateItemError, EwsError, EwsFolderNotFound, EwsFrozenObjectError, EwsItemNotFound, EwsLoginError, EwsMinimalObjectError, EwsNotImplemented, EwsSendItemError, EwsServerVersionError, EwsSubscriptionError, EwsSubscriptionTimeout, SaveFailed

Constant Summary

ConnectingSID =
{
  :UPN => 'PrincipalName',
  :SID => 'SID',
  :PSMTP => 'PrimarySmtpAddress',
  :SMTP => 'SmtpAddress'
}

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#loggerObject (readonly)

Returns the value of attribute logger



21
22
23
# File 'lib/viewpoint/logging.rb', line 21

def logger
  @logger
end

Class Method Details

.root_loggerObject



23
24
25
# File 'lib/viewpoint/logging.rb', line 23

def self.root_logger
  Logging.logger.root
end

Instance Method Details

#remove_impersonationObject



26
27
28
29
# File 'lib/ews/impersonation.rb', line 26

def remove_impersonation
  ews.impersonation_type = ""
  ews.impersonation_address = ""
end

#set_impersonation(connecting_type, address) ⇒ Object

Parameters:

  • connecting_type (String)

    should be one of the ConnectingSID variables ConnectingSID - use User Principal Name method ConnectingSID - use Security Identifier method ConnectingSID - use primary Simple Mail Transfer Protocol method ConnectingSID - use Simple Mail Transfer Protocol method you can add any other string, it will be converted into xml tag on soap request

  • address (String)

    an address to include to requests for impersonation



17
18
19
20
21
22
23
24
# File 'lib/ews/impersonation.rb', line 17

def set_impersonation(connecting_type, address)
  if ConnectingSID.has_value? connecting_type or connecting_type.is_a? String then
    ews.impersonation_type = connecting_type
    ews.impersonation_address = address
  else
    raise EwsBadArgumentError, "Not a proper connecting method: #{connecting_type.class}"
  end
end