|
"WEBNMS_5 API Docs" | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface AuthObserver
This is the interface for getting notifications about the changes in authorization information such as addition/deletion/modifications of users,operations To listen for notifications, users should implement this interface and can register for any of the following updates.
//Accessing the AuthorizationAdmin Handle through RMI.
String name = "//[NMSServer]/NmsAuthAdminAPI";
try
{
AuthorizationAdmin authAdmin = (AuthorizationAdmin) Naming.lookup(name);
if(authAdmin == null)
{
System.out.println("Could not get a Reference to remote object, AuthorizationAdmin");
System.exit(1);
}
else
{
System.out.println("Got a reference to remote object, AuthorizationAdmin");
}
boolean registerForAll = authAdmin.registerForAllUpdates(AuthObserver obs);
boolean registerForUser = authAdmin.registerForUserUpdates(AuthObserver obs);
boolean registerForOperation = authAdmin.registerForOperationUpdates(AuthObserver obs);
}
catch ( Exception e )
{
e.printStackTrace();
}
To use RMI, the implementor class should extend UnicastRemoteObject.
This implementor class can listen for notifications through RMI for the
updates.
AuthorizationAdmin.registerForAllUpdates(com.adventnet.security.authorization.AuthObserver),
AuthorizationAdmin.registerForOperationUpdates(com.adventnet.security.authorization.AuthObserver),
AuthorizationAdmin.registerForUserUpdates(com.adventnet.security.authorization.AuthObserver)| Field Summary | |
|---|---|
static java.lang.String |
ADD_OPERATION
Implies that the operations have been added in the database for the users. |
static java.lang.String |
ADD_USER
Implies that a new user has been added to the database. |
static java.lang.String |
ADDED_CUSTOM_VIEW
Implies that a new custom view has been added. |
static java.lang.String |
ASSIGNED_VIEW_TO_GROUP
Implies that the group has got some additional scope criteria. |
static java.lang.String |
DELETE_OPERATION
Implies that the operations have been deleted from the database for the users. |
static java.lang.String |
DELETE_USER
Implies that a user has been deleted from the database. |
static java.lang.String |
DELETED_AUTH_VIEW
Implies that the authorized view has been removed from the data store. |
static java.lang.String |
MODIFIED_VIEW_PROPERTY
Implies that the properties have been changed for the authorized view. |
static java.lang.String |
REMOVED_CUSTOM_VIEW
Implies that an existing custom view is removed. |
static java.lang.String |
REMOVED_CUSTOM_VIEW_COMPLETELY
Implies that an existing custom view is removed. |
static java.lang.String |
REMOVED_VIEW_FROM_GROUP
Implies that some authorized views are removed from group. |
static java.lang.String |
USER_ACCOUNT_EXPIRED
Implies that the account for the user is expired. |
static java.lang.String |
USER_DISABLED
Implies that the user status has been disabled. |
static java.lang.String |
USER_ENABLED
Implies that the user status has been enabled. |
| Method Summary | |
|---|---|
void |
update(java.lang.String type,
java.util.Properties prop)
This method is invoked when a database change is to be notified to the observer. |
| Field Detail |
|---|
static final java.lang.String ADD_USER
static final java.lang.String DELETE_USER
static final java.lang.String ADD_OPERATION
static final java.lang.String DELETE_OPERATION
static final java.lang.String USER_DISABLED
static final java.lang.String USER_ENABLED
static final java.lang.String USER_ACCOUNT_EXPIRED
static final java.lang.String ADDED_CUSTOM_VIEW
static final java.lang.String REMOVED_CUSTOM_VIEW
static final java.lang.String REMOVED_CUSTOM_VIEW_COMPLETELY
static final java.lang.String MODIFIED_VIEW_PROPERTY
static final java.lang.String ASSIGNED_VIEW_TO_GROUP
static final java.lang.String REMOVED_VIEW_FROM_GROUP
static final java.lang.String DELETED_AUTH_VIEW
| Method Detail |
|---|
void update(java.lang.String type,
java.util.Properties prop)
throws java.rmi.RemoteException
type - any one of the field variables.prop - The details of the user and operations that had been updated
in the database.
RemoteException - In case of RMI.
|
"WEBNMS_5 API Docs" | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||