In the example below the assertThat method of hamcrest is used in a junit test to assert that the loaded list is not empty.
The example authenticates towards the ApiOmat with the Sharepoint credentials that were saved in customerMail and customerPwd and loads the list of items found at the configured path. The path will have been configured in ApiOmat at the time of Sharepoint module setup and can be accessed in the module config.
The blank List checkList will be filled through the function getSharepointLists() and can then be checked for items. Each loaded item can be accessed in the list and can be modified and saved through its corresponding methods. For example setTitle("new Title") and save().
// authorize with Sharepoint credentials
Datastore.configureWithCredentials( User.baseURL, User.apiKey,
.customerPwd, User.sdkVersion, User.system );
List<SharepointList> checkList =
// load all items of the configured Sharepoint path
checkList = SharepointList.getSharepointLists(
( ApiomatRequestException e )
.savedError = e;
, equalTo( checkList.isEmpty( ) ) );