/** * Loads the specified set of property on the object. * * @param propertySet The property to load. * @throws Exception the exception */ @Override protected void internalLoad(PropertySet propertySet) throws Exception { this.throwIfThisIsNew(); this.getService().loadPropertiesForFolder(this, propertySet); }
/** * Find item. * * @param <TItem> The type of the item. * @param queryString query string to be used for indexed search * @param view The view controlling the number of item returned. * @param groupBy The group by. * @return FindItems response collection. * @throws Exception the exception */ <TItem extends Item> ServiceResponseCollection<FindItemResponse<TItem>> internalFindItems(String queryString, ViewBase view, Grouping groupBy) throws Exception { ArrayList<FolderId> folderIdArry = new ArrayList<FolderId>(); folderIdArry.add(this.getId()); this.throwIfThisIsNew(); return this.getService().findItems(folderIdArry, null, /* searchFilter */ queryString, view, groupBy, ServiceErrorHandling.ThrowOnError); }
/** * Find item. * * @param <TItem> The type of the item. * @param searchFilter The search filter. Available search filter classes include * SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and * SearchFilter.SearchFilterCollection * @param view The view controlling the number of item returned. * @param groupBy The group by. * @return FindItems response collection. * @throws Exception the exception */ <TItem extends Item> ServiceResponseCollection<FindItemResponse<TItem>> internalFindItems(SearchFilter searchFilter, ViewBase view, Grouping groupBy) throws Exception { ArrayList<FolderId> folderIdArry = new ArrayList<FolderId>(); folderIdArry.add(this.getId()); this.throwIfThisIsNew(); return this.getService().findItems(folderIdArry, searchFilter, null, /* queryString */ view, groupBy, ServiceErrorHandling.ThrowOnError); }
/** * Empties the folder. Calling this method results in a call to EWS. * * @param deletemode the delete mode * @param deleteSubFolders Indicates whether sub-folder should also be deleted. * @throws Exception */ public void empty(DeleteMode deletemode, boolean deleteSubFolders) throws Exception { this.throwIfThisIsNew(); this.getService().emptyFolder(this.getId(), deletemode, deleteSubFolders); }
/** * Obtains a list of folder by searching the sub-folder of this folder. * Calling this method results in a call to EWS. * * @param view The view controlling the number of folder returned. * @return An object representing the results of the search operation. * @throws Exception the exception */ public FindFoldersResults findFolders(FolderView view) throws Exception { this.throwIfThisIsNew(); return this.getService().findFolders(this.getId(), view); }
/** * Deletes the object. * * @param deleteMode the delete mode * @param sendCancellationsMode Indicates whether meeting cancellation messages should be * sent. * @param affectedTaskOccurrences Indicate which occurrence of a recurring task should be * deleted. * @throws Exception the exception */ @Override protected void internalDelete(DeleteMode deleteMode, SendCancellationsMode sendCancellationsMode, AffectedTaskOccurrence affectedTaskOccurrences) throws Exception { try { this.throwIfThisIsNew(); } catch (InvalidOperationException e) { LOG.error(e); } this.getService().deleteFolder(this.getId(), deleteMode); }
/** * Obtains a list of folder by searching the sub-folder of this folder. * Calling this method results in a call to EWS. * * @param searchFilter The search filter. Available search filter classes include * SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and * SearchFilter.SearchFilterCollection * @param view The view controlling the number of folder returned. * @return An object representing the results of the search operation. * @throws Exception the exception */ public FindFoldersResults findFolders(SearchFilter searchFilter, FolderView view) throws Exception { this.throwIfThisIsNew(); return this.getService().findFolders(this.getId(), searchFilter, view); }
/** * Applies the local changes that have been made to this folder. Calling * this method results in a call to EWS. * * @throws Exception the exception */ public void update() throws Exception { if (this.isDirty()) { if (this.getPropertyBag().getIsUpdateCallNecessary()) { this.getService().updateFolder(this); } } }
/** * Copies this folder into a specific folder. Calling this method results in * a call to EWS. * * @param destinationFolderId The Id of the folder in which to copy this folder. * @return A Folder representing the copy of this folder. * @throws Exception the exception */ public Folder copy(FolderId destinationFolderId) throws Exception { this.throwIfThisIsNew(); EwsUtilities.validateParam(destinationFolderId, "destinationFolderId"); return this.getService().copyFolder(this.getId(), destinationFolderId); }
/** * Saves this folder in a specific folder. Calling this method results in a * call to EWS. * * @param parentFolderId The Id of the folder in which to save this folder. * @throws Exception the exception */ public void save(FolderId parentFolderId) throws Exception { this.throwIfThisIsNotNew(); EwsUtilities.validateParam(parentFolderId, "parentFolderId"); if (this.isDirty()) { this.getService().createFolder(this, parentFolderId); } }
/** * Moves this folder to a specific folder. Calling this method results in a * call to EWS. * * @param destinationFolderId The Id of the folder in which to move this folder. * @return A new folder representing this folder in its new location. After * Move completes, this folder does not exist anymore. * @throws Exception the exception */ public Folder move(FolderId destinationFolderId) throws Exception { this.throwIfThisIsNew(); EwsUtilities.validateParam(destinationFolderId, "destinationFolderId"); return this.getService().moveFolder(this.getId(), destinationFolderId); }
/** * Loads the specified set of property on the object. * * @param propertySet The property to load. * @throws Exception the exception */ @Override protected void internalLoad(PropertySet propertySet) throws Exception { this.throwIfThisIsNew(); this.getService().loadPropertiesForFolder(this, propertySet); }
/** * Find item. * * @param <TItem> The type of the item. * @param queryString query string to be used for indexed search * @param view The view controlling the number of item returned. * @param groupBy The group by. * @return FindItems response collection. * @throws Exception the exception */ <TItem extends Item> ServiceResponseCollection<FindItemResponse<TItem>> internalFindItems(String queryString, ViewBase view, Grouping groupBy) throws Exception { ArrayList<FolderId> folderIdArry = new ArrayList<FolderId>(); folderIdArry.add(this.getId()); this.throwIfThisIsNew(); return this.getService().findItems(folderIdArry, null, /* searchFilter */ queryString, view, groupBy, ServiceErrorHandling.ThrowOnError); }
/** * Obtains a list of folder by searching the sub-folder of this folder. * Calling this method results in a call to EWS. * * @param view The view controlling the number of folder returned. * @return An object representing the results of the search operation. * @throws Exception the exception */ public FindFoldersResults findFolders(FolderView view) throws Exception { this.throwIfThisIsNew(); return this.getService().findFolders(this.getId(), view); }
/** * Empties the folder. Calling this method results in a call to EWS. * * @param deletemode the delete mode * @param deleteSubFolders Indicates whether sub-folder should also be deleted. * @throws Exception */ public void empty(DeleteMode deletemode, boolean deleteSubFolders) throws Exception { this.throwIfThisIsNew(); this.getService().emptyFolder(this.getId(), deletemode, deleteSubFolders); }
/** * Obtains a list of folder by searching the sub-folder of this folder. * Calling this method results in a call to EWS. * * @param searchFilter The search filter. Available search filter classes include * SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and * SearchFilter.SearchFilterCollection * @param view The view controlling the number of folder returned. * @return An object representing the results of the search operation. * @throws Exception the exception */ public FindFoldersResults findFolders(SearchFilter searchFilter, FolderView view) throws Exception { this.throwIfThisIsNew(); return this.getService().findFolders(this.getId(), searchFilter, view); }
/** * Saves this folder in a specific folder. Calling this method results in a * call to EWS. * * @param parentFolderId The Id of the folder in which to save this folder. * @throws Exception the exception */ public void save(FolderId parentFolderId) throws Exception { this.throwIfThisIsNotNew(); EwsUtilities.validateParam(parentFolderId, "parentFolderId"); if (this.isDirty()) { this.getService().createFolder(this, parentFolderId); } }
/** * Applies the local changes that have been made to this folder. Calling * this method results in a call to EWS. * * @throws Exception the exception */ public void update() throws Exception { if (this.isDirty()) { if (this.getPropertyBag().getIsUpdateCallNecessary()) { this.getService().updateFolder(this); } } }
/** * Copies this folder into a specific folder. Calling this method results in * a call to EWS. * * @param destinationFolderId The Id of the folder in which to copy this folder. * @return A Folder representing the copy of this folder. * @throws Exception the exception */ public Folder copy(FolderId destinationFolderId) throws Exception { this.throwIfThisIsNew(); EwsUtilities.validateParam(destinationFolderId, "destinationFolderId"); return this.getService().copyFolder(this.getId(), destinationFolderId); }
/** * Moves this folder to a specific folder. Calling this method results in a * call to EWS. * * @param destinationFolderId The Id of the folder in which to move this folder. * @return A new folder representing this folder in its new location. After * Move completes, this folder does not exist anymore. * @throws Exception the exception */ public Folder move(FolderId destinationFolderId) throws Exception { this.throwIfThisIsNew(); EwsUtilities.validateParam(destinationFolderId, "destinationFolderId"); return this.getService().moveFolder(this.getId(), destinationFolderId); }