Skip to main content
Published: September 28 2005, 5:52:00 PMUpdated: November 28 2020, 1:26:22 PM

How do I use the SetPictureManagerDetails, GetPictureManagerDetails, and GetPictureManagerOptions calls in the Java SDK?

Using PictureManager functionality through the Java SDK is very easy.
The following methods show how to make these calls to do various functions.
These functions can be used once a valid apiContext object is created.
Note that there are System.out statements which are for demonstration purposes.

/* Using the GetPictureManagerDetails call */
public void MyGetPictureManagerDetails() throws Exception
/* create the call object, passing the apiContext to it */
GetPictureManagerDetailsCall oGetPictureManagerDetails = new GetPictureManagerDetailsCall(apiContext);
/* make the call */
/* extract the SOAP object */
PictureManagerDetailsType oPictureManagerDetails = oGetPictureManagerDetails.getReturnedPictureManagerDetails();
/* extract the storage used */
Integer iStorageUsed = oPictureManagerDetails.getStorageUsed();
System.out.println("Storage Used: "+ iStorageUsed);
/* extract the storage available */
Integer iStorageAvailable = oPictureManagerDetails.getTotalStorageAvailable();
System.out.println("Storage Available: "+ iStorageAvailable);
/* extract the SOAP array object of Picture Manager Folders */
PictureManagerFolderType[] oPictureManagerFolderTypes = oPictureManagerDetails.getFolder();
System.out.println("Folders in the PictureManger are:");
/* loop through the array and extract the name of each folder */
for (int i=0; i<oPictureManagerFolderTypes.length; i++)
/* extract the subscription level */
PictureManagerSubscriptionLevelCodeType oPictureManagerSubscriptionLevel = oPictureManagerDetails.getSubscriptionLevel();
System.out.println("The current Subscription Level: " + oPictureManagerSubscriptionLevel.getValue());

/* Using the GetPictureManagerOptions call */
public void MyGetPictureManagerOptions() throws Exception
/* create the call object, passing the apiContext to it */
GetPictureManagerOptionsCall oGetPictureManagerOptions = new GetPictureManagerOptionsCall(apiContext);
/* make the call */
/* extract the SOAP array object of Picture Display Types
PictureManagerPictureDisplayType[] oPictureManagerPictureDisplayTypes = oGetPictureManagerOptions.getReturnedPictureType();
System.out.println("Picture Manager Picture Display Types: ");
/* loop throug the array and extract each display type */
for (int i=0; i<oPictureManagerPictureDisplayTypes.length; i++)
/* extract the subscription types available */
PictureManagerSubscriptionType[] oPictureManagerSubscriptionTypes = oGetPictureManagerOptions.getReturnedSubscription();
System.out.println("Picture Manager SubscriptionTypes: ");
/* loop through the array and extract each subscription type */
for (int i=0; i<oPictureManagerSubscriptionTypes.length; i++)

/* Using the SetPictureManagerDetails call to add a folder */
public void AddFolder() throws Exception
/* create the call object, passing the apiContext to it */
SetPictureManagerDetailsCall oSetPictureManagerDetails = new SetPictureManagerDetailsCall(apiContext);
/* set the action to add a folder */
/* create a folder, giving it a name */
PictureManagerFolderType oPictureManagerFolderType = new PictureManagerFolderType();
oPictureManagerFolderType.setName("My New Folder");
/* create the folder array, and add the folder we created to it */
PictureManagerFolderType[] oPictureManagerFolderTypeArray = {oPictureManagerFolderType};
/* create the Picture Manager Details Type object */
PictureManagerDetailsType oPictureManagerDetailsType= new PictureManagerDetailsType();
/* set the folder array we created */
/* set the call object's details */
/* make the call */

How well did this answer your question?
Answers others found helpful