本文整理汇总了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);
}
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}
}
示例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;
}
示例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;
}
示例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);
}
}
示例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());
}
示例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);
}
示例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();
}
示例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);
}