Table Of Contents
Folder Management Functions
addPAKsToFolder
createFolder
deleteFolder
listAllFolders
removePAKsFromFolder
renameFolder
Folder Management Functions
This chapter provides information about the following folder management functions:
•
addPAKsToFolder
•
createFolder
•
deleteFolder
•
listAllFolders
•
removePAKsFromFolder
•
renameFolder
addPAKsToFolder
Synopsis
IDStatus addPAKsToFolder(UserToken token, String[] pak_ids, String folder) throws
RemoteException;
Description
This function adds product authorization keys (PAKs) to the specified folder. You can add PAKs to more than one folder. If you want to keep a PAK in a single folder, you should remove the PAK from any other folder by calling the removePAKsFromFolder() function.
Input Parameters
Parameter
|
Type
|
Value
|
Description
|
token
|
UserToken, mandatory
|
—
|
A token that represents your authorization pass, which is obtained after you invoke the login function and are authenticated by the back-end server.
|
pak_ids
|
String array, mandatory
|
ID is a string containing up to 64 ASCII characters in the range from x21 to x7A
|
An array of PAK IDs to be added to the folder.
|
folder
|
String, mandatory
|
Name is a string containing up to 64 ASCII characters in the range from x21 to x7A
|
The name of the folder.
|
Return
This function returns an IDStatus object. The error code will be SUCCESS if the operation is successful. IDStatus contains an array of IDStatusItem. Each IDStatusItem contains the PAK ID, error code, and error message.
Error and Exception
If a system error prevents the operation from completing, a RemoteException is thrown.
When a system-level error occurs and the operation cannot be completed, the IDStatus contains overall operation status. The IDStatus error code returns none SUCCESS and is accompanied by an error message if the cause of the failure is known. For each individual ID, IDStatus contains IDStatusItem[]. Each IDStatusItem contains an ID, error code, and error message that shows the individual status.
createFolder
Synopsis
Status createFolder(UserToken token, String folder) throws RemoteException;
Description
This function creates a new folder with the given name.
Input Parameters
Parameter
|
Type
|
Value
|
Description
|
token
|
UserToken, mandatory
|
—
|
A token that represents your authorization pass, which is obtained after you invoke the login function and are authenticated by the back-end server.
|
folder
|
String, mandatory
|
Name is a string containing up to 64 ASCII characters in the range from x21 to x7A
|
The name of the folder.
|
Return
This function returns the Status object with a SUCCESS error code.
Error and Exception
If a system error prevents the operation from completing, a RemoteException is thrown.
When an error occurs, this function returns the Status object with the error code.
deleteFolder
Synopsis
Status deleteFolder(UserToken token, String folder) throws RemoteException;
Description
This function deletes a folder from the system. PAKs in this folder are not deleted. These PAKs will be moved to the default folder if they do not already belong to another folder.
Input Parameters
Parameter
|
Type
|
Value
|
Description
|
token
|
UserToken, mandatory
|
—
|
A token that represents your authorization pass, which is obtained after you invoke the login function and are authenticated by the back-end server.
|
folder
|
String, mandatory
|
ID is a string containing up to 64 ASCII characters in the range from x21 to x7A
|
The name of the folder.
|
Return
This function returns the Status object with the SUCCESS error code.
Error and Exception
If a system error prevents the operation from completing, a RemoteException is thrown.
When an error occurs, this function returns the Status object with the error code.
listAllFolders
Synopsis
String[] listAllFolders(UserToken token) throws RemoteException;
Description
This function returns a list of all folders in the system.
Input Parameters
Parameter
|
Type
|
Value
|
Description
|
token
|
UserToken, mandatory
|
—
|
A token that represents your authorization pass, which is obtained after you invoke the login function and are authenticated by the back-end server.
|
Return
This function returns a string array of folder names.
Error and Exception
If a system error prevents the operation from completing, a RemoteException is thrown.
When an error occurs, this function returns null.
removePAKsFromFolder
Synopsis
IDStatus removePAKsFromFolder(UserToken token, String[] pak_ids, String folder) throws
RemoteException;
Description
This function removes PAKs from the specified folder. If a PAK belongs to only one folder, the operation fails. A PAK has to belong to at least one folder. To delete the PAKs from inventory, use the deletePAKs() function.
Input Parameters
Parameter
|
Type
|
Value
|
Description
|
token
|
UserToken, mandatory
|
—
|
A token that represents your authorization pass, which is obtained after you invoke the login function and are authenticated by the back-end server.
|
pak_ids
|
String array, mandatory
|
ID is a string containing up to 64 ASCII characters in the range from x21 to x7A
|
An array of PAK IDs to be removed from the folder.
|
folder
|
String, mandatory
|
Name is a string containing up to 64 ASCII characters in the range from x21 to x7A
|
The name of the folder.
|
Return
This function returns an IDStatus object. The error code will be SUCCESS if the operation is successful. IDStatus contains an array of IDStatusItem. Each IDStatusItem contains a PAK ID, error code, and error message.
Error and Exception
If a system error prevents the operation from completing, a RemoteException is thrown.
When a system-level error occurs and the operation cannot be completed, the IDStatus contains information about the overall operation status. The IDStatus error code returns none SUCCESS accompanied by an error message if the cause of failure is known.
renameFolder
Synopsis
Status renameFolder(UserToken token, String folder, String new_name) throws
RemoteException;
Description
This function renames a given PAK folder. All PAKs contained in the folder will remain unchanged.
Input Parameters
Parameter
|
Type
|
Value
|
Description
|
token
|
UserToken, mandatory
|
—
|
A token that represents your authorization pass, which is obtained after you invoke the login function and are authenticated by the back-end server.
|
folder
|
String, mandatory
|
Name is a string containing up to 64 ASCII characters in the range from x21 to x7A
|
The name of the folder.
|
new_name
|
String, mandatory
|
Name is a string containing up to 64 ASCII characters in the range from x21 to x7A
|
The new name for the PAK folder.
|
Return
This function returns the Status object with the SUCCESS error code.
Error and Exception
If a system error prevents the operation from completing, a RemoteException is thrown.
When an error occurs, this function returns the Status object with the error code.