Interface
caplin.services.security

PermissionServiceListener

This interface must be implemented by any listener class in your application that wishes to be informed of current and future product permissions for the currently logged in user. A listener class can implement one or more of the methods defined by this interface.

Constructor Summary

Attributes Name and Description
caplin.services.security.PermissionServiceListener()

Method Summary

Attributes Name and Description
void onAttributeChanged(String sAttributeName, String sAttributeValue)

The registered listener that implements this method subscribes to current and future values of a user attribute.

void onPermissionsChanged(Array pPermissions, String sProduct, String sNamespace)

The registered listener that implements this method subscribes to current and future product permissions.

void onSinglePermissionChanged(boolean bIsAuthorized, String sProduct, String sNamespace, String sAction)

The registered listener that implements this method subscribes to current and future permissions for an action on a single product.

Constructor Detail

caplin.services.security.PermissionServiceListener()

Method Detail

void onAttributeChanged(String sAttributeName, String sAttributeValue)

The registered listener that implements this method subscribes to current and future values of a user attribute. This callback method is invoked when the listener is first registered, and also when the value of the user attribute changes.

Parameters
String sAttributeName The user attribute that the listener subscribed to.
String sAttributeValue The current value of the user attribute.
See
caplin.services.security.PermissionService#addAttributeListener

void onPermissionsChanged(Array pPermissions, String sProduct, String sNamespace)

The registered listener that implements this method subscribes to current and future product permissions. The listener can either subscribe to permissions on a set of products, or to permissioned actions on a single product.

This callback method is invoked when the listener is first registered, and also when the requested permissions change.

Parameters
Array pPermissions An array of strings representing the list of permissioned items that the listener subscribed to (either a list of permissioned products, or a list of permissioned actions on a single product).
String sProduct the product name that was used in the query that led to this permission update.
String sNamespace the namespace that was used in the query that led to this permission update.
See
caplin.services.security.PermissionService#addPermissionSetListener
caplin.services.security.PermissionService#addProductPermissionsListener

void onSinglePermissionChanged(boolean bIsAuthorized, String sProduct, String sNamespace, String sAction)

The registered listener that implements this method subscribes to current and future permissions for an action on a single product. This callback method is invoked when the listener is first registered, and also when the permission for the action changes.

Parameters
boolean bIsAuthorized The current permission for the action (true if the action is allowed, and false if the action is denied).
String sProduct the product name that was used in the query that led to this permission update.
String sNamespace the namespace that was used in the query that led to this permission update.
String sAction the action that was used in the query that led to this permission update.
See
caplin.services.security.PermissionService#addPermissionListener
caplin.services.security.PermissionService#addGlobalPermissionListener