当前位置: 首页>>代码示例>>Java>>正文


Java ExchangeService类代码示例

本文整理汇总了Java中microsoft.exchange.webservices.data.core.ExchangeService的典型用法代码示例。如果您正苦于以下问题:Java ExchangeService类的具体用法?Java ExchangeService怎么用?Java ExchangeService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ExchangeService类属于microsoft.exchange.webservices.data.core包,在下文中一共展示了ExchangeService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: internalWritePropertiesToXml

import microsoft.exchange.webservices.data.core.ExchangeService; //导入依赖的package包/类
/**
 * Write property to XML.
 *
 * @param writer the writer
 * @throws Exception the exception
 */
@Override
public void internalWritePropertiesToXml(EwsServiceXmlWriter writer)
    throws Exception {
  super.internalWritePropertiesToXml(writer);

  this.getDaysOfTheWeek().writeToXml(writer,
      XmlElementNames.DaysOfWeek);
  if (this.firstDayOfWeek != null) {

    EwsUtilities
        .validatePropertyVersion((ExchangeService) writer.getService(), ExchangeVersion.Exchange2010_SP1,
                                 "FirstDayOfWeek");

    writer.writeElementValue(
        XmlNamespace.Types,
        XmlElementNames.FirstDayOfWeek,
        this.firstDayOfWeek);
  }

}
 
开发者ID:OfficeDev,项目名称:ews-java-api,代码行数:27,代码来源:Recurrence.java

示例2: UserConfiguration

import microsoft.exchange.webservices.data.core.ExchangeService; //导入依赖的package包/类
/**
 * Initializes a new instance of <see cref="UserConfiguration"/> class.
 *
 * @param service             The service to which the user configuration is bound.
 * @param requestedProperties The property requested for this user configuration.
 * @throws Exception the exception
 */
public UserConfiguration(ExchangeService service, EnumSet<UserConfigurationProperties> requestedProperties)
    throws Exception {
  EwsUtilities.validateParam(service, "service");

  if (service.getRequestedServerVersion().ordinal() < UserConfiguration.ObjectVersion.ordinal()) {
    throw new ServiceVersionException(String.format(
        "The object type %s is only valid for Exchange Server version %s or later versions.", this
            .getClass().getName(), UserConfiguration.ObjectVersion));
  }

  this.service = service;
  this.isNew = true;

  this.initializeProperties(requestedProperties);
}
 
开发者ID:OfficeDev,项目名称:ews-java-api,代码行数:23,代码来源:UserConfiguration.java

示例3: StreamingSubscriptionConnection

import microsoft.exchange.webservices.data.core.ExchangeService; //导入依赖的package包/类
/**
 * Initializes a new instance of the StreamingSubscriptionConnection class.
 *
 * @param service  The ExchangeService instance this connection uses to connect
 *                 to the server.
 * @param lifetime The maximum time, in minutes, the connection will remain open.
 *                 Lifetime must be between 1 and 30.
 * @throws Exception
 */
public StreamingSubscriptionConnection(ExchangeService service, int lifetime)
    throws Exception {
  EwsUtilities.validateParam(service, "service");

  EwsUtilities.validateClassVersion(service,
      ExchangeVersion.Exchange2010_SP1, this.getClass().getName());

  if (lifetime < 1 || lifetime > 30) {
    throw new ArgumentOutOfRangeException("lifetime");
  }

  this.session = service;
  this.subscriptions = new HashMap<String, StreamingSubscription>();
  this.connectionTimeout = lifetime;
}
 
开发者ID:OfficeDev,项目名称:ews-java-api,代码行数:25,代码来源:StreamingSubscriptionConnection.java

示例4: create

import microsoft.exchange.webservices.data.core.ExchangeService; //导入依赖的package包/类
@Override
public boolean create(FolderType type) throws MessagingException {
    try {
        ExchangeService service = store.getService();
        service.createFolder(new Folder(service),
                store.getRootFolderId());
    } catch (Exception e) {
        throw new MessagingException("Unable to create folder", e);
    }
    return true;
}
 
开发者ID:philipwhiuk,项目名称:q-mail,代码行数:12,代码来源:EwsFolder.java

示例5: getExchangeService

import microsoft.exchange.webservices.data.core.ExchangeService; //导入依赖的package包/类
@PostConstruct
private ExchangeService getExchangeService() {
	final ExchangeService exchangeService = new ExchangeService();
	exchangeService.setCredentials(new WebCredentials(exchangeConnectionProperties.getCredentials().getUsername(), exchangeConnectionProperties.getCredentials().getPassword(),exchangeConnectionProperties.getCredentials().getDomain()));
	exchangeService.setUrl(exchangeConnectionProperties.getUri());
	return exchangeService;
}
 
开发者ID:candrews,项目名称:availability,代码行数:8,代码来源:ExchangeAvailabilityService.java

示例6: GetPhoneCallResponse

import microsoft.exchange.webservices.data.core.ExchangeService; //导入依赖的package包/类
/**
 * Initializes a new instance of the GetPhoneCallResponse class.
 *
 * @param service the service
 */
public GetPhoneCallResponse(ExchangeService service) {
  super();
  EwsUtilities.ewsAssert(service != null, "GetPhoneCallResponse.ctor", "service is null");

  this.phoneCall = new PhoneCall(service);
}
 
开发者ID:OfficeDev,项目名称:ews-java-api,代码行数:12,代码来源:GetPhoneCallResponse.java

示例7: getPropertyInstance

import microsoft.exchange.webservices.data.core.ExchangeService; //导入依赖的package包/类
/**
 * Gets the property instance.
 *
 * @param propertyBag     The property bag.
 * @param complexProperty The property instance.
 * @return True if the instance is newly created.
 */
private boolean getPropertyInstance(
  final PropertyBag propertyBag, final OutParam<ComplexProperty> complexProperty
) {
  final ServiceObject owner = propertyBag.getOwner();
  final ExchangeService service = owner.getService();

  if (!propertyBag.tryGetValue(this, complexProperty)
      || !hasFlag(PropertyDefinitionFlags.ReuseInstance, service.getRequestedServerVersion())) {
    complexProperty.setParam(createPropertyInstance(owner));
    return true;
  }
  return false;
}
 
开发者ID:OfficeDev,项目名称:ews-java-api,代码行数:21,代码来源:ComplexPropertyDefinitionBase.java

示例8: getObjectInstance

import microsoft.exchange.webservices.data.core.ExchangeService; //导入依赖的package包/类
/**
 * Gets the object instance.
 *
 * @param service        The service.
 * @param xmlElementName Name of the XML element.
 * @return Folder
 * @throws Exception the exception
 */
private Folder getObjectInstance(ExchangeService service,
    String xmlElementName) throws Exception {
  if (this.folder != null) {
    return this.folder;
  } else {
    return EwsUtilities.createEwsObjectFromXmlElementName(Folder.class, service, xmlElementName);
  }
}
 
开发者ID:OfficeDev,项目名称:ews-java-api,代码行数:17,代码来源:CreateFolderResponse.java

示例9: PhoneCall

import microsoft.exchange.webservices.data.core.ExchangeService; //导入依赖的package包/类
/**
 * PhoneCall Constructor.
 *
 * @param service the service
 */
public PhoneCall(ExchangeService service) {
  EwsUtilities.ewsAssert(service != null, "PhoneCall.ctor", "service is null");

  this.service = service;
  this.state = PhoneCallState.Connecting;
  this.connectionFailureCause = ConnectionFailureCause.None;
  this.sipResponseText = PhoneCall.SuccessfullResponseText;
  this.sipResponseCode = PhoneCall.SuccessfullResponseCode;
}
 
开发者ID:OfficeDev,项目名称:ews-java-api,代码行数:15,代码来源:PhoneCall.java

示例10: SubscriptionBase

import microsoft.exchange.webservices.data.core.ExchangeService; //导入依赖的package包/类
/**
 * Instantiates a new subscription base.
 *
 * @param service the service
 * @throws Exception the exception
 */
protected SubscriptionBase(ExchangeService service) throws Exception {
  EwsUtilities.validateParam(service, "service");
  // EwsUtilities.validateParam(service, "service");

  this.service = service;
}
 
开发者ID:OfficeDev,项目名称:ews-java-api,代码行数:13,代码来源:SubscriptionBase.java

示例11: getObjectInstance

import microsoft.exchange.webservices.data.core.ExchangeService; //导入依赖的package包/类
/**
 * Gets the folder instance.
 *
 * @param service        The service.
 * @param xmlElementName Name of the XML element.
 * @return folder
 * @throws Exception the exception
 */
private Folder getObjectInstance(ExchangeService service,
    String xmlElementName) throws Exception {
  if (this.getFolder() != null) {
    return this.getFolder();
  } else {
    return EwsUtilities.createEwsObjectFromXmlElementName(Folder.class,
        service, xmlElementName);
  }
}
 
开发者ID:OfficeDev,项目名称:ews-java-api,代码行数:18,代码来源:GetFolderResponse.java

示例12: createServiceResponse

import microsoft.exchange.webservices.data.core.ExchangeService; //导入依赖的package包/类
/**
 * Creates the service response.
 *
 * @param service       The Service
 * @param responseIndex the response index
 * @return Service response.
 */
@Override
protected ServiceResponse createServiceResponse(ExchangeService service,
    int responseIndex) {
  return new GetFolderResponse(this.getFolderIds()
      .getFolderIdWrapperList(responseIndex).getFolder(), this
      .getPropertySet());
}
 
开发者ID:OfficeDev,项目名称:ews-java-api,代码行数:15,代码来源:GetFolderRequestForLoad.java

示例13: createServiceResponse

import microsoft.exchange.webservices.data.core.ExchangeService; //导入依赖的package包/类
/**
 * Creates the service response.
 *
 * @param service       the service
 * @param responseIndex the response index
 * @return Service response.
 * @throws Exception the exception
 */
@Override
protected GetUserConfigurationResponse createServiceResponse(
    ExchangeService service, int responseIndex) throws Exception {
  // In the case of UserConfiguration.Load(), this.userConfiguration is
  // set.
  if (this.userConfiguration == null) {
    this.userConfiguration = new UserConfiguration(service,
        this.properties);
    this.userConfiguration.setName(this.name);
    this.userConfiguration.setParentFolderId(this.parentFolderId);
  }

  return new GetUserConfigurationResponse(this.userConfiguration);
}
 
开发者ID:OfficeDev,项目名称:ews-java-api,代码行数:23,代码来源:GetUserConfigurationRequest.java

示例14: setUpBaseClass

import microsoft.exchange.webservices.data.core.ExchangeService; //导入依赖的package包/类
/**
 * Setup Mocks
 *
 * @throws Exception
 */
@BeforeClass
public static final void setUpBaseClass() throws Exception {
  // Mock up ExchangeServiceBase
  exchangeServiceBaseMock = new ExchangeServiceBase() {
    @Override
    protected void processHttpErrorResponse(HttpWebRequest httpWebResponse, Exception webException)
        throws Exception {
      throw webException;
    }
  };
  exchangeServiceMock = new ExchangeService();
}
 
开发者ID:OfficeDev,项目名称:ews-java-api,代码行数:18,代码来源:BaseTest.java

示例15: ResolveNamesResponse

import microsoft.exchange.webservices.data.core.ExchangeService; //导入依赖的package包/类
/**
 * Initializes a new instance of the class.
 *
 * @param service the service
 */
public ResolveNamesResponse(ExchangeService service) {
  super();
  EwsUtilities.ewsAssert(service != null, "ResolveNamesResponse.ctor", "service is null");

  this.resolutions = new NameResolutionCollection(service);
}
 
开发者ID:OfficeDev,项目名称:ews-java-api,代码行数:12,代码来源:ResolveNamesResponse.java


注:本文中的microsoft.exchange.webservices.data.core.ExchangeService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。