Cisco License Manager Release 2.1 Java API Guide
ch02jarg.fm

Table Of Contents

Access Control Functions

addUserToDeviceAccessList

addUserToGroupAccessList

addUserToPAKAccessList

getAssociatedActions

getUserAccessListFromDevice

getUserAccessListFromGroup

getUserAccessListFromPAK

removeAccessListFromDevice

removeAccessListFromGroup

removeUserFromDeviceAccessList

removeUserFromGroupAccessList

removeUserFromPAKAccessList


Access Control Functions


This chapter provides information about the following access control functions:

addUserToDeviceAccessList

addUserToGroupAccessList

addUserToPAKAccessList

getAssociatedActions

getUserAccessListFromDevice

getUserAccessListFromGroup

getUserAccessListFromPAK

removeAccessListFromDevice

removeAccessListFromGroup

removeUserFromDeviceAccessList

removeUserFromGroupAccessList

removeUserFromPAKAccessList

addUserToDeviceAccessList

Synopsis

DeviceStatus addUserToDeviceAccessList(UserToken token, String dev, String[] usr_ids) 
throws RemoteException;

Description

This function provides user access control and associates a device with a list of user IDs.

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.

dev

String, mandatory

The device ID.

user_ids

Array of string, mandatory

Name is a string containing up to 64 ASCII characters in the range from x21 to x7A

Array of user IDs to be added to a device access list.


Return

This function returns a DeviceStatus object.

Error and Exception

If a system error prevents the operation from completing, a RemoteException is thrown.

When an operation error occurs, the information is contained in the returned DeviceStatus object. To inspect the status of an individual element, you must traverse the DeviceStatusItem array within DeviceStatus. Each DeviceStatusItem contains the Device object, error code, and error message.

addUserToGroupAccessList

Synopsis

GroupStatus AddUserToDeviceAccessList(UserToken token, String group, String[] usr_ids) 
throws RemoteException;

Description

This function provides user access control. It adds user IDs to the access list of a given group.

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.

group

String, mandatory

The group ID.

user_ids

Array of string, mandatory

Name is a string containing up to 64 ASCII characters in the range from x21 to x7A

An array of user IDs to be added to a device access list.


Return

This function returns a GroupStatus object.

Error and Exception

If a system error prevents the operation from completing, a RemoteException is thrown.

This function returns the GroupStatus object that contains an error code and error message when operation error occurs. Each GroupStatusItem contains individual Group object and error code and error message.

addUserToPAKAccessList

Synopsis

PAKStatus AddUserToPAKAccessList(UserToken token, String pak, String[] usr_ids) throws 
RemoteException; 

Description

This function adds an array of user IDs into the access list of a given product authorization key (PAK) name. This function supports user access control.

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

String, mandatory

The PAK ID.

User_ids

Array of string, mandatory

Name is a string containing up to 64 ASCII characters in the range from x21 to x7A

An array of user IDs to be added to the PAK access list.


Return

This function returns a PAKStatus object. If the operation is successful, the error code will be SUCCESS. PAKStatus contains an array of PAKStatusItem. Each PAKStatusItem contains the PAK Object, error code, and error message.

Error and Exception

If a system error prevents the operation from completing, a RemoteException is thrown.

The PAKStatus contains overall operation status. When a system-level error occurs and the operation cannot be completed, the PAKStatus error code returns none SUCCESS and an error message if the cause of the failure is known. For each individual ID, the PAKStatus contains PAKStatusItem[]. Each PAKStatusItem contains a PAK object, error code, and error message that shows the individual status.

getAssociatedActions

Synopsis

String[] getAssociatedActions (UserToken token, String username) throws RemoteException;

Description

This function returns a list of strings representing the actions that can be performed.

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.

username

String, mandatory

The username.


Return

This function returns an array of String.

Error and Exception

If a system error prevents the operation from completing, a RemoteException is thrown.

When an error occurs, this function returns null.

getUserAccessListFromDevice

Synopsis

String[] getUserAccessListFromDevice (UserToken token, String dev_id) throws 
RemoteException;	

Description

This function returns the user access list of a given device ID as an array of string. Each string is a user ID.

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.

dev_id

String, mandatory

The device ID.


Return

This function returns an array of string.

Error and Exception

If a system error prevents the operation from completing, a RemoteException is thrown.

When an error occurs, this function returns null.

getUserAccessListFromGroup

Synopsis

String[] getUserAccessListFromGroup (UserToken token, String group) throws 
RemoteException;	

Description

This function returns the user access list of a given group as an array of string. Each string is a user ID.

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.

group

String, mandatory

The group name.


Return

This function returns an array of string.

Error and Exception

If a system error prevents the operation from completing, a RemoteException is thrown.

When an error occurs, this function returns null.

getUserAccessListFromPAK

Synopsis

String[]getUserAccessListFromPAK (UserToken token, String pak_id) throws RemoteException;	

Description

This function returns the user access list of a given PAK as an array of string. Each string is a user ID.

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_id

String, mandatory

The PAK ID.


Return

This function returns an array of string.

Error and Exception

If a system error prevents the operation from completing, a RemoteException is thrown.

When an error occurs, this function returns null.

removeAccessListFromDevice

Synopsis

public Status removeAccessListFromDevice(UserToken token, String dev_id) throws 
RemoteException;

Description

This function removes an access list from the specified device.

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.

dev_id

String, mandatory

The device ID of the access list to be removed.


Return

This function returns a Status object. If an error occurs, the Status object contains an error code with none ClmErrors.SUCCESS and an error message regarding the error.

Error and Exception

If a system error prevents the operation from completing, a RemoteException is thrown.

removeAccessListFromGroup

Synopsis

public Status removeAccessListFromGroup(UserToken token, String group_id) throws 
RemoteException;

Description

This function removes an access list from the specified group.

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.

group_id

String, mandatory

The group ID of the access list to be removed.


Return

The function returns a Status object. If an error occurs, the Status object contains the error code none ClmErrors.SUCCESS and an error message regarding the error.

Error and Exception

If a system error prevents the operation from completing, a RemoteException is thrown.

removeUserFromDeviceAccessList

Synopsis

DeviceStatus RemoveUserFromDeviceAccessList(UserToken token, String dev, String[] usr_ids) 
throws RemoteException;

Description

This function provides user access control. It removes a list of user IDs from the access list of a given device.

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.

dev

String, mandatory

Device ID.

user_ids

Array of string, mandatory

Name is a string containing up to 64 ASCII characters in the range from x21 to x7A

An array of user IDs to be removed from a device access list.


Return

This function returns a DeviceStatus object.

Error and Exception

If a system error prevents the operation from completing, a RemoteException is thrown.

When an operation error occurs, information about the error is contained in the returned DeviceStatus object. To inspect the individual element status, you must traverse the DeviceStatusItem array within DeviceStatus. Each DeviceStatusItem contains the Device object, error code, and error message.

removeUserFromGroupAccessList

Synopsis

GroupStatus removeUserFromDeviceAccessList(UserToken token, String group, String[] 
usr_ids) throws RemoteException; 

Description

This function provides user access control. It removes a list of user IDs from the access list of a given group.

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.

group

String, mandatory

The group ID.

user_ids

Array of string, mandatory

Name is a string containing up to 64 ASCII characters in the range from x21 to x7A

An array of user IDs to be removed from a group access list.


Return

This function returns a GroupStatus object.

Error and Exception

If a system error prevents the operation from completing, a RemoteException is thrown.

This function returns a GroupStatus object that contains none SUCCESS error code and error message when an operation error occurs and also an array of GroupStatusItems. Each GroupStatusItem contains an individual GROUP object, error code, and error message.

removeUserFromPAKAccessList

Synopsis

PAKStatus removeUserFromPAKAccessList(UserToken token, String pak, String[] usr_ids) 
throws RemoteException); 

Description

This function removes an array of user IDs from the access list of a given PAK ID.

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

String, mandatory

The PAK ID.

Usr_ids

Array of string, mandatory

Name is a string containing up to 64 ASCII characters in the range from x21 to x7A

An array of user IDs to be removed from PAK access list.


Return

This function returns a PAKStatus object. The error code will be SUCCESS if the operation is successful. PAKStatus contains an array of PAKStatusItem. Each PAKStatusItem contains a PAK Object, error code, and error message.

Error and Exception

If a system error prevents the operation from completing, a RemoteException is thrown.

The PAKStatus contains overall operation status. When a system-level error occurs and the operation cannot be completed, the PAKStatus error code returns none SUCCESS and is accompanied by an error message (if the cause of failure is known). For each individual ID, PAKStatus contains PAKStatusItem[]. Each PAKStatusItem contains a PAK object, error code, and error message that shows the individual status.