"WEBNMS_5 API Docs"

com.adventnet.security.authorization
Interface AuthorizationAdmin

All Superinterfaces:
java.rmi.Remote
All Known Subinterfaces:
CustomViewScopeAPI

public interface AuthorizationAdmin
extends java.rmi.Remote

This is the basic interface that has to be implemented for persistence data store. It provides the necessary API for performing Administrative functions on the Authorization data. The Access Control Policy includes users, groups, authorizedViews and operations. This interface provides the necessary APIs to add, modify and delete access control data.

Here is some sample code showing how the AuthorizationAdmin might be used:

 
 // Accessing AuthorizationAdmin via RMI
 try 
 {
     authAdmin = (AuthorizationAdmin) Naming. lookup ("//[NMSServer]/NmsAuthAdminAPI");
     System.out.println ( "Successfully got the handle for AuthorizationAdmin");
 }
 catch (Exception remoteException) 
 {
     System.out.println ( "Error in getting the handle for AuthorizationAdmin"); 
 }
 boolean result = authAdmin.createUser(userName,groupName,password);


 

// Accessing AuthorizationAdmin from the same JVM authAdmin = (AuthorizationAdmin) NmsUtil.getAPI ("NmsAuthAdminAPI"); boolean result = authAdmin.createUser(userName,groupName,password);

// Accessing AuthorizationAdmin via RMIAccessAPI in the NMS RMI secure mode try { RMIAccessAPI rmiApi = (RMIAccessAPI) Naming.lookup ("//[NMSServer]/RMIAccessAPI"); authAdmin = (AuthorizationAdmin) rmiApi.getAPI ( userName , password , "NmsAuthAdminAPI" ); boolean result = authAdmin.createUser(userName,groupName,password); } catch (Exception remoteException) { System.out.println ( "Error in getting the handle for AuthorizationAdmin"); }

The Access Control Policy includes users, groups, authorizedViews and operations.

user An "User" represents the user configured for using an application.
group A "Group" represents a role or a set of users assigned to perform specific set of tasks.
authorizedView An "AuthorizedView" represents a subset of objects or instances. This is specified as a properties list which contains the property name and property value.The properties associated with the view will contain the access control information (or the match criteria). When an Object needs to be authorized,that objects properties are matched with those specified in the views.Access control for a group is applied by associating groups to views.
operation An "Operation" is a task or a function that needs to be authorized. The authorization permission is specified by associating an Authorized View to Operations.


Method Summary
 void addOperation(java.lang.String operationName, java.lang.String parentOperationName)
          Method to add an operation in the OperationsTree Hierarchy.
 void assignOperationToView(java.lang.String operationName, AuthorizedViewObject authViewObj)
          This method is used to associate an operation with an authorizedView.
 void assignOperationToView(java.lang.String operationName, AuthorizedViewObject authViewObj, boolean ifExclude)
          This method is used to associate an operation with an authorizedView.
 void assignOperationToView(java.lang.String operationName, java.lang.String authorizedViewName)
          This method is used to associate an operation with an authorizedView.
 void assignOperationToView(java.lang.String operationName, java.lang.String authorizedViewName, boolean ifExclude)
          This method is used to associate an operation with an authorizedView.
 void assignOperationToView(java.util.Vector operationNameVec, AuthorizedViewObject authViewObj)
          This method is used to associate a Vector of operationNames with an authorizedView.
 void assignOperationToView(java.util.Vector operationNameVec, AuthorizedViewObject authViewObj, boolean ifExclude)
          This method is used to associate a Vector of operationNames with an authorizedView.
 void assignOperationToView(java.util.Vector operationNameVec, java.lang.String authorizedViewName)
          This method is used to associate a Vector of operationNames with an authorizedView.
 void assignOperationToView(java.util.Vector operationNameVec, java.lang.String authorizedViewName, boolean ifExclude)
          This method is used to associate a Vector of operationNames with an authorizedView.
 void assignOperationToViewAndGroup(java.lang.String groupName, java.lang.String authorizedViewName, java.lang.String operationName)
          This method is used to associate an operation with an AuthorizedView and assign the AuthorizedView to a Group.
 void assignOperationToViewAndGroup(java.lang.String groupName, java.lang.String authorizedViewName, java.lang.String operationName, boolean ifExclude)
          This method is used to associate an operation with an AuthorizedView and assign the AuthorizedView to a Group.
 boolean assignUserToGroup(java.lang.String userName, java.lang.String groupName)
          This method is used to associate an user with a group.
 boolean assignUserToGroup(java.lang.String userName, java.lang.String groupName, java.lang.String ownerName)
          This method is used to associate an user with a group and owner.
 boolean assignUserToGroup(java.lang.String userName, java.util.Vector groupNames)
          This method is used to associate a user to the groups specified as a vector.
 void assignUserToGroup(java.util.Vector vecOfUserName, java.lang.String groupName)
          This method is used to associate list of users to a group specified.
 void assignViewToGroup(java.lang.String groupName, AuthorizedViewObject authViewObj)
          This method is used to associate an AuthorizedView to a group.
 void assignViewToGroup(java.lang.String groupName, java.lang.String viewName)
          This method is used to associate a AuthorizedView to a group.
 void assignViewToGroup(java.lang.String groupName, java.lang.String viewName, java.lang.String ownerName)
          This method is used to associate a AuthorizedView to a group and owner.
 void assignViewToGroup(java.util.Vector groupNameVec, java.lang.String viewName)
          This method is used to associate an AuthorizedView with a number of groups.
 boolean changePassword(java.lang.String userName, java.lang.String new_pass)
          Method to change password without taking old_passowrd as an argument.
 boolean changePassword(java.lang.String userName, java.lang.String old_pass, java.lang.String new_pass)
          Method to Change the PassWord for an User.
 void createAuthorizedView(AuthorizedViewObject authViewObj)
          This method creates an AuthorizedView by taking AuthorizedViewObject as a parameter.
 void createAuthorizedView(java.util.Vector authViewObjVec)
          This method creates an AuthorizedView by taking a vector of AuthorizedViewObject as a parameter.
 boolean createUser(java.lang.String userName, java.lang.String groupName)
          Method to create a new user and assign the same to a group.
 boolean createUser(java.lang.String userName, java.lang.String groupName, java.lang.String passwd)
          Method to create a new user and assign to a group.
 boolean createUserForOwner(java.lang.String userName, java.lang.String groupName, java.lang.String ownerName)
          Method to create a new user and assign the same to a group.
 boolean createUserForOwner(java.lang.String userName, java.lang.String groupName, java.lang.String passwd, java.lang.String ownerName)
          Method to create a new user and assign to a group.
 boolean deRegisterFromAllUpdates(AuthObserver obs)
          To unregister from getting notifications,from the AuthorizationAdminAPI's.
 boolean deRegisterFromOperationUpdates(AuthObserver obs)
          To unregister from getting operations notifications,from the AuthorizationAdminAPI's.
 boolean deRegisterFromUserUpdates(AuthObserver obs)
          To unregister for the users notifications only from AuthorizationAdminAPI's, about database changes.
 java.util.Hashtable getAllAttributes(java.lang.String userName)
          To get all attributes for the user.
 java.util.Vector getAllGroupNames(java.lang.String userName)
          This method can be used to get a list of group names to which the user belongs.
 java.util.Vector getAllGroups()
          This method is used to get All the groupnames available.
 java.util.Vector getAllOperations()
          Method to get All operations as Vector of OperationObject.
 java.util.HashSet getAllUserNames()
          This method is used to get all the user names available in the database as a part of authorizationData.
 java.util.Vector getAllViewNames(java.lang.String groupName)
          Method to get all the AuthorizedViewNames associated for the specified group.
 java.lang.String getDescriptiveName(java.lang.String userName)
          Method to get the Descriptive Name of an user's account.
 java.util.Hashtable getOperationsForView(java.lang.String viewName)
          Method to get the exact operations assigned for a particular view.
 java.util.Hashtable getOperationsForViewInHash(java.lang.String viewName)
          Method to get operations for the particular view.
 int getPasswordAge(java.lang.String userName)
          Method to get the user's remaining password age.
 int getUserExpirationTime(java.lang.String userName)
          Method to get the expiration time of the user.
 java.util.Vector getUsers(java.lang.String groupName)
          Method to get all the users under the groupName.
 void init(java.lang.Object obj)
          This Method is used for initialization, if any.
 boolean isUserNamePresent(java.lang.String userName)
          This method verifies, if the userName is present.
 boolean isUserNamePresent(java.lang.String userName, java.lang.String groupName)
          This method verifies, if the userName is present.
 boolean registerForAllUpdates(AuthObserver obs)
          To register for the notifications from AuthorizationAdminAPI's,about database changes.
 boolean registerForOperationUpdates(AuthObserver ob)
          To register for the operations notifications only from AuthorizationAdminAPI about database changes.
 boolean registerForUserUpdates(AuthObserver ob)
          To register for the users notifications only from AuthorizationAdminAPI's, about database changes.
 void removeAuthorizedView(AuthorizedViewObject authViewObj)
          Removes an AuthorizedView by taking AuthorizedViewObject as a parameter.
 void removeOperation(java.lang.String operationName)
          Method to remove an operation in the OperationsTree Hierarchy.
 void removeOperation(java.lang.String operationName, java.lang.String parentOperationName)
          Method to remove an operation in the OperationsTree Hierarchy.
 void removeOperation(java.util.Vector vecOfOperations)
          Method to remove a Vector of operations in the OperationsTree Hierarchy.
 void removeOperationFromView(java.lang.String operationName, java.lang.String authorizedViewName)
          This method is used to disassociate an operation from the authorizedView.
 void removeOperationsFromView(java.util.Vector operationNameVector, java.lang.String authorizedViewName)
          This method is used to disassociate a Vector of operations from the specified authorizedView.
 void removeOwnerFromGroup(java.lang.String ownerName)
          Method to remove all the user,group those have association with a particular user.
 void removeOwnerFromGroup(java.lang.String ownerName, java.lang.String userName, java.lang.String groupName)
          Method to remove owner for a user who belogs to a particular group.
 void removeOwnerFromUser(java.lang.String ownerName)
          Deprecated. as of WebNMS 5
 void removeOwnerFromUser(java.lang.String ownerName, java.lang.String userName)
          Method to remove owner who has a particular user.
 void removeOwnerFromView(java.lang.String ownerName)
          Deprecated. as of WebNMS 5
 void removeOwnerFromView(java.lang.String ownerName, java.lang.String viewName, java.lang.String groupName)
          Method to remove views,groups for a particular owner.
 boolean removeUser(java.lang.String userName)
          Method to Remove the user from userPasswordTable.
 boolean removeUser(java.lang.String userName, boolean removeTraces)
          Method to remove the user from the database with all his dependencies.
 boolean removeUserFromGroup(java.lang.String userName, java.lang.String groupName)
          Method to Remove an user from a group.
 boolean removeUserFromGroup(java.lang.String userName, java.util.Vector vecOfgroupName)
          Method to Remove an user from a Vector of groups.
 void removeUserFromGroup(java.util.Vector vecOfUserName, java.lang.String groupName)
          Method to remove list of users, given as a Vector from a given group.
 void removeViewFromGroup(java.lang.String groupName, AuthorizedViewObject authViewObj)
          This method removes(disassociates) an AuthorizedView from a group.
 void removeViewFromGroup(java.lang.String groupName, java.lang.String authorizedViewName)
          This method removes(disassociates) an AuthorizedView from a group.
 void setDescriptiveName(java.lang.String userName, java.lang.String descName)
          Method to set the Descriptive Name for an user's account.
 void setPasswordAge(java.lang.String userName, int passwdAgeInDays)
          Method to set the user's password expiry time.
 void setUserExpirationTime(java.lang.String userName, int noOfDays)
          Method to set the expiration time for the users' account.
 void setUserStatus(java.lang.String userName, java.lang.String status)
          Method to update the user's status.
 void updateXML()
          Method to update the securityDBData.xml file with the latest security data from database.
 

Method Detail

init

void init(java.lang.Object obj)
          throws java.rmi.RemoteException,
                 AuthorizationException
This Method is used for initialization, if any.

Parameters:
obj - Object used for initialization.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception.

registerForAllUpdates

boolean registerForAllUpdates(AuthObserver obs)
                              throws java.rmi.RemoteException
To register for the notifications from AuthorizationAdminAPI's,about database changes. The Observers who want to get notified of any changes of the security information in the database. The registered AuthObserver will be notified about the changes in the database like new addition and deletion of users, operations.

Parameters:
obs - The AuthObserver interface implementor object to which notifications have to be sent.
Returns:
true if the registration is sucessfull, false otherwise.
Throws:
java.rmi.RemoteException - In case of RMI.
See Also:
com.adventnet.security.authorization.AuthObserver.

deRegisterFromAllUpdates

boolean deRegisterFromAllUpdates(AuthObserver obs)
                                 throws java.rmi.RemoteException
To unregister from getting notifications,from the AuthorizationAdminAPI's. This method can be used when the applications no longer want to get notified by the AuthorizationAdminAPI's, about the database changes. The argument passed to this method should be the same AuthObserver instance that was passed with the previous call to the registerForAllUpdates(AuthObserver) method.

Parameters:
obs - The AuthObserver interface implementor object which was previously registered with the AuthorizationAdminAPI.
Returns:
true if unregister operation is successful, false otherwise.
Throws:
java.rmi.RemoteException - In case of RMI.
See Also:
AuthObserver, registerForAllUpdates(AuthObserver)

registerForUserUpdates

boolean registerForUserUpdates(AuthObserver ob)
                               throws java.rmi.RemoteException
To register for the users notifications only from AuthorizationAdminAPI's, about database changes. The Observers who want to get notified of any changes of the security information in the database. The registered AuthObserver will be notified about the changes in the database like new addition and deletion of users.

Parameters:
obs - The AuthObserver interface implementor object to which notifications have to be sent.
Returns:
true if the registration is sucessfull, false otherwise.
Throws:
java.rmi.RemoteException - In case of RMI.
See Also:
com.adventnet.security.authorization.AuthObserver.

deRegisterFromUserUpdates

boolean deRegisterFromUserUpdates(AuthObserver obs)
                                  throws java.rmi.RemoteException
To unregister for the users notifications only from AuthorizationAdminAPI's, about database changes. This method can be used when the applications no longer want to get notified by the AuthorizationAdminAPI's, about the database changes. The argument passed to this method should be the same AuthObserver instance that was passed with the previous call to the registerForUserUpdates(AuthObserver) method.

Parameters:
obs - The AuthObserver interface implementor object which was previously registered with the AuthorizationAdminAPI.
Returns:
true if unregister operation is successful, false otherwise.
Throws:
java.rmi.RemoteException - In case of RMI.
See Also:
AuthObserver, registerForUserUpdates(AuthObserver)

registerForOperationUpdates

boolean registerForOperationUpdates(AuthObserver ob)
                                    throws java.rmi.RemoteException
To register for the operations notifications only from AuthorizationAdminAPI about database changes. The Observers who want to get notified of any changes of the security information in the database. The registered AuthObserver will be notified about the changes in the database like new addition and deletion of operations.

Parameters:
obs - The AuthObserver interface implementor object to which notifications have to be sent.
Returns:
true if the registration is sucessfull, false otherwise.
Throws:
java.rmi.RemoteException - In case of RMI.
See Also:
com.adventnet.security.authorization.AuthObserver.

deRegisterFromOperationUpdates

boolean deRegisterFromOperationUpdates(AuthObserver obs)
                                       throws java.rmi.RemoteException
To unregister from getting operations notifications,from the AuthorizationAdminAPI's. This method can be used when the applications no longer want to get notified by the AuthorizationAdminAPI's, about the database changes. The argument passed to this method should be the same AuthObserver instance that was passed with the previous call to the registerForOperationUpdates(AuthObserver) method.

Parameters:
obs - The AuthObserver interface implementor object which was previously registered with the AuthorizationAdminAPI.
Returns:
true if unregister operation is successful, false otherwise.
Throws:
java.rmi.RemoteException - In case of RMI.
See Also:
AuthObserver, registerForOperationUpdates(AuthObserver)

isUserNamePresent

boolean isUserNamePresent(java.lang.String userName)
                          throws java.rmi.RemoteException,
                                 AuthorizationException
This method verifies, if the userName is present.

Parameters:
userName - The userName, to be used to verify, if it is present.
Returns:
True if the userName is present in the database otherwise returns false.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

isUserNamePresent

boolean isUserNamePresent(java.lang.String userName,
                          java.lang.String groupName)
                          throws java.rmi.RemoteException,
                                 AuthorizationException
This method verifies, if the userName is present.

Parameters:
userName - The userName to be used to verify if it is present.
groupName - The groupName to be used to search for the userName.
Returns:
True if the userName is present in the database and is assigned the specified group otherwise returns false.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

createUser

boolean createUser(java.lang.String userName,
                   java.lang.String groupName)
                   throws java.rmi.RemoteException,
                          AuthorizationException
Method to create a new user and assign the same to a group.

Parameters:
userName - The name of the user to be created.
groupName - The name of the group to which the user should belong.
Returns:
True if the user is created and assigned to the specified group in the database otherwise false.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

createUserForOwner

boolean createUserForOwner(java.lang.String userName,
                           java.lang.String groupName,
                           java.lang.String ownerName)
                           throws java.rmi.RemoteException,
                                  AuthorizationException
Method to create a new user and assign the same to a group. and also a owner.

Parameters:
userName - The name of the user to be created.
groupName - The name of the group to which the user should belong.
ownerName - The name of the owner. Note: OwnerName should not be used in WebNMS,as it is not supported and if used/set may result in undesirable results.
Returns:
True if the user is created and assigned to the specified group in the database otherwise false.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

removeUser

boolean removeUser(java.lang.String userName)
                   throws java.rmi.RemoteException,
                          AuthorizationException
Method to Remove the user from userPasswordTable.

Parameters:
userName - the name of the user to be removed from UserPasswordTable.
Returns:
True if the user is deleted from the database successfully.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

removeUserFromGroup

boolean removeUserFromGroup(java.lang.String userName,
                            java.lang.String groupName)
                            throws java.rmi.RemoteException,
                                   AuthorizationException
Method to Remove an user from a group.

Parameters:
userName - The name of the user to be removed from the group.
groupName - The name of the group from which the user needs to be removed.
Returns:
True if the user is removed from the specified group in the database otherwise false.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

removeUserFromGroup

boolean removeUserFromGroup(java.lang.String userName,
                            java.util.Vector vecOfgroupName)
                            throws java.rmi.RemoteException,
                                   AuthorizationException
Method to Remove an user from a Vector of groups.

Parameters:
userName - The name of the user to be removed from groups.
vecOfgroupName - The Vector of groupnames from which the user needs to be removed.
Returns:
True if the user is removed from the specified groups in the database otherwise false.
Throws:
java.rmi.RemoteException - In case of RMI
AuthorizationException - In case of any exceptions or errors during database operation.

removeUserFromGroup

void removeUserFromGroup(java.util.Vector vecOfUserName,
                         java.lang.String groupName)
                         throws java.rmi.RemoteException,
                                AuthorizationException
Method to remove list of users, given as a Vector from a given group. The associations between the list of userNames and group specified gets deleted from the database.

Parameters:
vecOfUserName - Vector of group names.
groupName - Group name.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of null parameter, any exception or error during database operation.

assignUserToGroup

void assignUserToGroup(java.util.Vector vecOfUserName,
                       java.lang.String groupName)
                       throws java.rmi.RemoteException,
                              AuthorizationException
This method is used to associate list of users to a group specified. The user should be present in the UserpasswordTable in the database, otherwise it will continue for next user in the list.

Parameters:
vecOfUserName - The set of User Names, as a Vector need to associate with a Group
groupName - The name of a group to which each user is supposed to be associated.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of null parameter, any exception or error during database operation.

changePassword

boolean changePassword(java.lang.String userName,
                       java.lang.String old_pass,
                       java.lang.String new_pass)
                       throws java.rmi.RemoteException,
                              AuthorizationException
Method to Change the PassWord for an User.

Parameters:
userName - The name of the user who wants to change the Password.
old_pass - The Old password for the user.
new_pass - The New password for the user.
Returns:
True if the password is changed successfully otherwise false.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

changePassword

boolean changePassword(java.lang.String userName,
                       java.lang.String new_pass)
                       throws java.rmi.RemoteException,
                              AuthorizationException
Method to change password without taking old_passowrd as an argument.

Parameters:
userName - Name of the user.
new_pass - New Password for the user.
Returns:
True if the password is changed successfully otherwise false.
Throws:
java.rmi.RemoteException - RemoteException In case of RMI.
AuthorizationException - AuthorizationException In case of null parameter, any exception or error during database operation.

assignUserToGroup

boolean assignUserToGroup(java.lang.String userName,
                          java.lang.String groupName)
                          throws java.rmi.RemoteException,
                                 AuthorizationException
This method is used to associate an user with a group.

Parameters:
userName - The name of the user that is to be assoicated.
groupName - The name of the group to which the user is supposed to be associated.
Returns:
True if the user is assigned to the specified group otherwise false.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

assignUserToGroup

boolean assignUserToGroup(java.lang.String userName,
                          java.lang.String groupName,
                          java.lang.String ownerName)
                          throws java.rmi.RemoteException,
                                 AuthorizationException
This method is used to associate an user with a group and owner.

Parameters:
userName - The name of the user that is to be assoicated.
groupName - The name of the group to which the user is supposed to be associated.
ownerName - The name of the owner. Note: OwnerName should not be used in WebNMS,as it is not supported and if used/set may result in undesirable results.
Returns:
True if the user is assigned to the specified group otherwise false.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

assignUserToGroup

boolean assignUserToGroup(java.lang.String userName,
                          java.util.Vector groupNames)
                          throws java.rmi.RemoteException,
                                 AuthorizationException
This method is used to associate a user to the groups specified as a vector.

Parameters:
userName - The name of the user that is to be assoicated.
groupNames - The names of the group to which the user is supposed to be associated. The group names are specified as a vector.
Returns:
True if the user is assigned to the specified groups otherwise false.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

createAuthorizedView

void createAuthorizedView(AuthorizedViewObject authViewObj)
                          throws java.rmi.RemoteException,
                                 AuthorizationException
This method creates an AuthorizedView by taking AuthorizedViewObject as a parameter. AuthorizedViewObject represents an AuthorizedViewName and a set of AuthorizedViewProperties associated with it. The actual access control information is stored in AuthorizedViewObject. This method creates AuthorizedView, consisting of AuthorizedViewName and a set of Authorized property name/property value pair. When an Object needs to be authorized,its properties are matched with those specified in the Authorized views.

Parameters:
authViewObj - The AuthorizedViewObject for creating authorizedView.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

createAuthorizedView

void createAuthorizedView(java.util.Vector authViewObjVec)
                          throws java.rmi.RemoteException,
                                 AuthorizationException
This method creates an AuthorizedView by taking a vector of AuthorizedViewObject as a parameter. AuthorizedViewObject represents an AuthorizedViewName and a set of AuthorizedViewProperties associated with it. The actual access control information is stored in AuthorizedViewObject. This method creates AuthorizedView, consisting of AuthorizedViewName and set of Authorized property name/property value pair. When an Object needs to be authorized, its properties are matched with those specified in the Authorized views.

Parameters:
authViewObjVec - A vector of AuthorizedViewObject for creating authorizedView.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

removeAuthorizedView

void removeAuthorizedView(AuthorizedViewObject authViewObj)
                          throws java.rmi.RemoteException,
                                 AuthorizationException
Removes an AuthorizedView by taking AuthorizedViewObject as a parameter. AuthorizedViewObject represents an AuthorizedViewName and a set of AuthorizedViewProperties associated with it. The actual access control information is stored in AuthorizedViewObject. This method removes AuthorizedView, consisting of AuthorizedViewName and a set of Authorized property name/property value pair.

Parameters:
authViewObj - The AuthorizedViewObject for creating authorizedView.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

assignViewToGroup

void assignViewToGroup(java.lang.String groupName,
                       java.lang.String viewName)
                       throws java.rmi.RemoteException,
                              AuthorizationException
This method is used to associate a AuthorizedView to a group. By associating a view to a group, authorization can be applied to a group/user.

Parameters:
groupName - the name of the group to which the view is to be associated.
viewName - The authorized view that is to be associated to the group.
Throws:
java.rmi.RemoteException - In case of RMI
AuthorizationException - In case of any exceptions or errors during database operation.

assignViewToGroup

void assignViewToGroup(java.lang.String groupName,
                       java.lang.String viewName,
                       java.lang.String ownerName)
                       throws java.rmi.RemoteException,
                              AuthorizationException
This method is used to associate a AuthorizedView to a group and owner.

Parameters:
groupName - The name of the group to which the view is to be associated.
viewName - The authorized view that is to be associated to the group.
ownerName - The name of the owner. Note: OwnerName should not be used in WebNMS,as it is not supported and if used/set may result in undesirable results.
Throws:
java.rmi.RemoteException - In case of RMI
AuthorizationException - In case of any exceptions or errors during database operation.

assignViewToGroup

void assignViewToGroup(java.lang.String groupName,
                       AuthorizedViewObject authViewObj)
                       throws java.rmi.RemoteException,
                              AuthorizationException
This method is used to associate an AuthorizedView to a group. By associating a view with a group, authorization can be applied to a group/user. The method takes AuthorizedViewObject as a parameter.

Parameters:
groupName - The name of the group to which the view is to be associated.
authViewObj - the AuthorizedViewObject that contains the authorized viewName that is to be associated with the group.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

assignViewToGroup

void assignViewToGroup(java.util.Vector groupNameVec,
                       java.lang.String viewName)
                       throws java.rmi.RemoteException,
                              AuthorizationException
This method is used to associate an AuthorizedView with a number of groups. By associating a view to a group, authorization can be applied to a group/user. The method takes a Vector of group names as parameter.

Parameters:
groupNameVec - A vector of groupNames to which the view is to be associated.
viewName - The authorized view that is to be associated with the group.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

removeViewFromGroup

void removeViewFromGroup(java.lang.String groupName,
                         java.lang.String authorizedViewName)
                         throws java.rmi.RemoteException,
                                AuthorizationException
This method removes(disassociates) an AuthorizedView from a group.

Parameters:
groupName - The name of the group from which the AuthorizedView is to be disassociated.
authorizedViewName - The authorizedViewName that is to be disassociated.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

removeViewFromGroup

void removeViewFromGroup(java.lang.String groupName,
                         AuthorizedViewObject authViewObj)
                         throws java.rmi.RemoteException,
                                AuthorizationException
This method removes(disassociates) an AuthorizedView from a group. It takes an AuthorizedViewObject as a parameter.

Parameters:
groupName - the name of the group from which the AuthorizedView is to be disassociated.
authViewObj - the AuthorizedViewObject containing the AuthorizedViewName that is to be disassoicated
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

addOperation

void addOperation(java.lang.String operationName,
                  java.lang.String parentOperationName)
                  throws java.rmi.RemoteException,
                         AuthorizationException
Method to add an operation in the OperationsTree Hierarchy. This method takes an operationName and its parent operation name as a parameter for adding into the hierarchy tree. The parentOperationName can be null, in which case the operationName doesn't have a parent and it is considered to be at the top level of the operations tree hierarchy.

Parameters:
operationName - The name of the operation that is to be added into the operationsTree hierarchy.
parentOperationName - The name of the parent operation under which the operation, identified by operationName is to added in the operationsTree hierarchy.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

removeOperation

void removeOperation(java.lang.String operationName,
                     java.lang.String parentOperationName)
                     throws java.rmi.RemoteException,
                            AuthorizationException
Method to remove an operation in the OperationsTree Hierarchy. This method takes an operationName and its parent operation name as a parameter for deleting from the hierarchy tree. The parentOperationName can be null, in which case the operationName doesn't have a parent and it is considered to be at the top level of the operations tree hierarchy.

Parameters:
operationName - The name of the operation that is to be deleted from the operationsTree hierarchy.
parentOperationName - The name of the parent operation under which the operation, identified by operationName is to deleted in the operationsTree hierarchy.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

removeOperation

void removeOperation(java.lang.String operationName)
                     throws java.rmi.RemoteException,
                            AuthorizationException
Method to remove an operation in the OperationsTree Hierarchy. This method takes an operationName as a parameter for deleting from the hierarchy tree. This will remove all the child operations for this operation name.

Parameters:
operationName - The name of the operation that is to be deleted from the operationsTree hierarchy.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

removeOperation

void removeOperation(java.util.Vector vecOfOperations)
                     throws java.rmi.RemoteException,
                            AuthorizationException
Method to remove a Vector of operations in the OperationsTree Hierarchy. This method takes a Vector of operations.This method will internally call the removeOperation(java.lang.String).

Parameters:
vecOfOperations - The Vector of operations that is to be deleted from the operationsTree hierarchy.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

assignOperationToView

void assignOperationToView(java.lang.String operationName,
                           java.lang.String authorizedViewName)
                           throws java.rmi.RemoteException,
                                  AuthorizationException
This method is used to associate an operation with an authorizedView. Authorization Permissions can be specified by associating operations with AuthorizedViews. Operations can either be included or excluded from the AuthorizedView( i.e. allow or disallow an operation). This method is used to allow(include) the operation for the authorizedView.

Parameters:
operationName - the name of the operation that is to be associated with the AuthorizedView.
authorizedViewName - the name of the AuthorizedView to which the operation is to be associated.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

assignOperationToView

void assignOperationToView(java.lang.String operationName,
                           java.lang.String authorizedViewName,
                           boolean ifExclude)
                           throws java.rmi.RemoteException,
                                  AuthorizationException
This method is used to associate an operation with an authorizedView. Authorization Permissions can be specified by associating operations with AuthorizedViews. Operations can either be included or excluded from the AuthorizedView( i.e allow or disallow an operation). If the value to ifExclude is true, then the operation assoictaed with the AuthorizedView is disallowed.

Parameters:
operationName - the name of the operation that is to be associated with the AuthorizedView.
authorizedViewName - the name of the AuthorizedView to which the operation is to be associated.
ifExclude - If set to true, then the operation associated with the AuthorizedView is disallowed.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

assignOperationToView

void assignOperationToView(java.util.Vector operationNameVec,
                           java.lang.String authorizedViewName)
                           throws java.rmi.RemoteException,
                                  AuthorizationException
This method is used to associate a Vector of operationNames with an authorizedView. Authorization Permissions can be specified by associating operations with AuthorizedViews. Operations can either be included or excluded from the AuthorizedView( i.e. allow or disallow an operation). This method is used to allow(include) the operation for the authorizedView.

Parameters:
operationNameVec - A vector of operation names (specified as String) that is to be assoicated with the AuthorizedView.
authorizedViewName - The name of the AuthorizedView to which the operation is to be associated.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

assignOperationToView

void assignOperationToView(java.util.Vector operationNameVec,
                           java.lang.String authorizedViewName,
                           boolean ifExclude)
                           throws java.rmi.RemoteException,
                                  AuthorizationException
This method is used to associate a Vector of operationNames with an authorizedView. Authorization Permissions can be specified by associating operations with AuthorizedViews. Operations can either be included or excluded from the AuthorizedView( i.e. allow or disallow an operation). If the value to ifExclude is true, then the operation assoictaed with the AuthorizedView is disallowed.

Parameters:
operationNameVec - A vector of operation names (specified as String) that is to be assoicated with the AuthorizedView.
authorizedViewName - The name of the AuthorizedView to which the operation is to be associated.
ifExclude - If set to true, then the operation associated with the AuthorizedView is disallowed.
Throws:
java.rmi.RemoteException - In case of RMI
AuthorizationException - In case of any exceptions or errors during database operation.

assignOperationToView

void assignOperationToView(java.lang.String operationName,
                           AuthorizedViewObject authViewObj)
                           throws java.rmi.RemoteException,
                                  AuthorizationException
This method is used to associate an operation with an authorizedView. Authorization Permissions can be specified by associating operations with AuthorizedViews. Operations can be either included or excluded from the AuthorizedView( i.e allow or disallow an operation). This method is used to allow(include) the operation for the authorizedView. This method takes an AuthorizedViewObject that contains the AuthorizedViewName. This method is used to allow(include) the operation for the authorizedView.

Parameters:
operationName - The name of the operation that is to be associated with the AuthorizedView.
authViewObj - AuthorizedViewObjct (which contains the AuthorizedViewName) to which the operation is to be associated.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

assignOperationToView

void assignOperationToView(java.lang.String operationName,
                           AuthorizedViewObject authViewObj,
                           boolean ifExclude)
                           throws java.rmi.RemoteException,
                                  AuthorizationException
This method is used to associate an operation with an authorizedView. Authorization Permissions can be specified by associating operations with AuthorizedViews. Operations can be either included or excluded from the AuthorizedView( i.e. allow or disallow an operation). This method is used to allow(include) the operation for the authorizedView. This method takes an AuthorizedViewObject that contains the AuthorizedViewName. If the value to ifExclude is true, then the operation assoictaed with the AuthorizedView is disallowed.

Parameters:
operationName - The name of the operation that is to be associated with the AuthorizedView.
authViewObj - AuthorizedViewObject (which contains the AuthorizedViewName) to which the operation is to be associated.
ifExclude - If set to true, then the operation associated with the AuthorizedView is disallowed.
Throws:
java.rmi.RemoteException - In case of RMI
AuthorizationException - In case of any exception or error during database operation.

assignOperationToView

void assignOperationToView(java.util.Vector operationNameVec,
                           AuthorizedViewObject authViewObj)
                           throws java.rmi.RemoteException,
                                  AuthorizationException
This method is used to associate a Vector of operationNames with an authorizedView. Authorization Permissions can be specified by associating operations with AuthorizedViews. Operations can either be included or excluded from the AuthorizedView( i.e. allow or disallow an operation). This method takes an AuthorizedViewObject that contains the AuthorizedViewName. This method is used to allow(include) the operation for the authorizedView.

Parameters:
operationNameVec - A vector of operation names (specified as String) that is to be assoicated with the AuthorizedView in the AuthorizedViewObject.
authViewObj - AuthorizedViewObject (which contains the AuthorizedViewName) to which the Vector of operations is to be associated.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

assignOperationToView

void assignOperationToView(java.util.Vector operationNameVec,
                           AuthorizedViewObject authViewObj,
                           boolean ifExclude)
                           throws java.rmi.RemoteException,
                                  AuthorizationException
This method is used to associate a Vector of operationNames with an authorizedView. Authorization Permissions can be specified by associating operations with AuthorizedViews. Operations can be either included or excluded from the AuthorizedView( i.e. allow or disallow an operation). This method takes an AuthorizedViewObject that contains the AuthorizedViewName. If the value to ifExclude is true, then the operation assoictaed with the AuthorizedView is disallowed.

Parameters:
operationNameVec - A vector of operation names (specified as String) that is to be assoicated with the AuthorizedView in the AuthorizedViewObject.
authViewObj - AuthorizedViewObject (which contains the AuthorizedViewName) to which the Vector of operations is to be associated.
ifExclude - If set to true, then the operations associated with the AuthorizedView is disallowed.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

assignOperationToViewAndGroup

void assignOperationToViewAndGroup(java.lang.String groupName,
                                   java.lang.String authorizedViewName,
                                   java.lang.String operationName)
                                   throws java.rmi.RemoteException,
                                          AuthorizationException
This method is used to associate an operation with an AuthorizedView and assign the AuthorizedView to a Group. By associating a view with a group, authorization can be applied to a group/user. Authorization Permissions can be specified by associating operations with AuthorizedViews. Operations can either be included or excluded from the AuthorizedView( i.e. allow or disallow an operation). This method is used to allow(include) the operation for the authorizedView.

Parameters:
groupName - The groupName to which the authorizedview is to be assigned. If the groupName is not present, it is created.
authorizedViewName - The name of the AuthorizedView that is to be assoictaed with the group.
operationName - The name of the operation that is to be associated with the AuthorizedView.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

assignOperationToViewAndGroup

void assignOperationToViewAndGroup(java.lang.String groupName,
                                   java.lang.String authorizedViewName,
                                   java.lang.String operationName,
                                   boolean ifExclude)
                                   throws java.rmi.RemoteException,
                                          AuthorizationException
This method is used to associate an operation with an AuthorizedView and assign the AuthorizedView to a Group. By associating a view with a group, authorization can be applied to a group/user. Authorization Permissions can be specified by associating operations with AuthorizedViews. Operations can either be included or excluded from the AuthorizedView( i.e. allow or disallow an operation). This method is used to allow(include) the operation for the authorizedView.

Parameters:
groupName - The groupName to which the authorizedview is to be assigned. If the groupName is not present, it is created.
authorizedViewName - The name of the AuthorizedView that is to be associated with the group.
operationName - The name of the operation that is to be associated with the AuthorizedView.
ifExclude - If set to true, then the operation associated with the AuthorizedView is disallowed.
Throws:
java.rmi.RemoteException - In case of RMI
AuthorizationException - In case of any exceptions or errors during database operation.

removeOperationFromView

void removeOperationFromView(java.lang.String operationName,
                             java.lang.String authorizedViewName)
                             throws java.rmi.RemoteException,
                                    AuthorizationException
This method is used to disassociate an operation from the authorizedView.

Parameters:
operationName - the name of the operation that needs to be disassoicated.
authorizedViewName - the name of the authorized view from which the operation needs to be disassociated.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

removeOperationsFromView

void removeOperationsFromView(java.util.Vector operationNameVector,
                              java.lang.String authorizedViewName)
                              throws java.rmi.RemoteException,
                                     AuthorizationException
This method is used to disassociate a Vector of operations from the specified authorizedView.

Parameters:
operationNameVector - Vector of operations that needs to be disassoicated.
authorizedViewName - the name of the authorized view from which the Vector of operation needs to be disassociated.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any Exception or error during database operation.

getAllUserNames

java.util.HashSet getAllUserNames()
                                  throws java.rmi.RemoteException,
                                         AuthorizationException
This method is used to get all the user names available in the database as a part of authorizationData.

Returns:
This will return a HashSet of all user names present in the database.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

getAllGroups

java.util.Vector getAllGroups()
                              throws java.rmi.RemoteException,
                                     AuthorizationException
This method is used to get All the groupnames available.

Returns:
This will return a Vector of all groupNames present in the database.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

getAllGroupNames

java.util.Vector getAllGroupNames(java.lang.String userName)
                                  throws java.rmi.RemoteException,
                                         AuthorizationException
This method can be used to get a list of group names to which the user belongs.

Parameters:
userName - The name of the user for which the groupnames are required.
Returns:
A Vector which contains the list of groupnames.
Throws:
AuthorizationException - If there is any exception or error during database operation
java.rmi.RemoteException - In case of RMI.

createUser

boolean createUser(java.lang.String userName,
                   java.lang.String groupName,
                   java.lang.String passwd)
                   throws java.rmi.RemoteException,
                          AuthorizationException
Method to create a new user and assign to a group.

Parameters:
userName - The name of the user to be created.
groupName - The name of the group to which the user should belong.
passwd - The password of the user to be created.
Returns:
True if the user is created and assigned to the specified group with the password in the database otherwise false.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

createUserForOwner

boolean createUserForOwner(java.lang.String userName,
                           java.lang.String groupName,
                           java.lang.String passwd,
                           java.lang.String ownerName)
                           throws java.rmi.RemoteException,
                                  AuthorizationException
Method to create a new user and assign to a group. and also a owner.

Parameters:
userName - The name of the user to be created.
groupName - The name of the group to which the user should belong.
passwd - The password of the user to be created.
ownerName - The name of the owner. Note: OwnerName should not be used in WebNMS,as it is not supported and if used/set may result in undesirable results.
Returns:
True if the user is created and assigned to the specified group with the password in the database otherwise false.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

getUsers

java.util.Vector getUsers(java.lang.String groupName)
                          throws java.rmi.RemoteException,
                                 AuthorizationException
Method to get all the users under the groupName.

Parameters:
groupName - the name of the group to which the users needed.
Returns:
This will return a Vector of users for the group present in the database.
Throws:
AuthorizationException - In case of any exception or error during database operation.
java.rmi.RemoteException - In case of RMI.

getAllViewNames

java.util.Vector getAllViewNames(java.lang.String groupName)
                                 throws java.rmi.RemoteException,
                                        AuthorizationException
Method to get all the AuthorizedViewNames associated for the specified group.

Parameters:
groupName - The groupName for which all the associated authorized views are to be returned.
Returns:
A vector of authorized view names.
Throws:
java.rmi.RemoteException - In case of RMI
AuthorizationException - In case of any exceptions or errors during database operation.

removeOwnerFromGroup

void removeOwnerFromGroup(java.lang.String ownerName,
                          java.lang.String userName,
                          java.lang.String groupName)
                          throws java.rmi.RemoteException,
                                 AuthorizationException
Method to remove owner for a user who belogs to a particular group.

Parameters:
ownerName - The name of the owner. Note: OwnerName should not be used in WebNMS,as it is not supported and if used/set may result in undesirable results.
userName - The name of the user.
groupName - The name of the group to which the user belongs.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exceptions or errors during database operation.

removeOwnerFromGroup

void removeOwnerFromGroup(java.lang.String ownerName)
                          throws java.rmi.RemoteException,
                                 AuthorizationException
Method to remove all the user,group those have association with a particular user.

Parameters:
ownerName - The name of the owner who get removed.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exceptions or errors during database operation.

removeOwnerFromView

void removeOwnerFromView(java.lang.String ownerName,
                         java.lang.String viewName,
                         java.lang.String groupName)
                         throws java.rmi.RemoteException,
                                AuthorizationException
Method to remove views,groups for a particular owner.

Parameters:
ownerName - The name of the owner. Note: OwnerName should not be used in WebNMS,as it is not supported and if used/set may result in undesirable results.
viewName - The name of the AuthorizedViewName.
groupName - The name of the group which is assigned to that owner.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exceptions or errors during database operation.

removeOwnerFromView

void removeOwnerFromView(java.lang.String ownerName)
                         throws java.rmi.RemoteException,
                                AuthorizationException
Deprecated. as of WebNMS 5

Method to remove views,groups those have association with a particular owner.

Parameters:
ownerName - The name of the owner who get removed.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exceptions or errors during database operation.

removeOwnerFromUser

void removeOwnerFromUser(java.lang.String ownerName,
                         java.lang.String userName)
                         throws java.rmi.RemoteException,
                                AuthorizationException
Method to remove owner who has a particular user.

Parameters:
ownerName - The name of the owner. Note: OwnerName should not be used in WebNMS,as it is not supported and if used/set may result in undesirable results.
userName - The name of the user.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exceptions or errors during database operation.

removeOwnerFromUser

void removeOwnerFromUser(java.lang.String ownerName)
                         throws java.rmi.RemoteException,
                                AuthorizationException
Deprecated. as of WebNMS 5

Method to remove all the users those assigned to a particular owner.

Parameters:
ownerName - The name of the owner.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exceptions or errors during database operation.

removeUser

boolean removeUser(java.lang.String userName,
                   boolean removeTraces)
                   throws java.rmi.RemoteException,
                          AuthorizationException
Method to remove the user from the database with all his dependencies. without affecting any othre users,groups and views. If removeTraces is set to true then all the views that are associated with this user through group will get deleted.

Parameters:
userName - The name of the user to be removed.
removeTraces - true for removing group and views also.
Returns:
boolean True if the user is deleted from the database successfully.
Throws:
java.rmi.RemoteException - RemoteException In case of RMI.
AuthorizationException - AuthorizationException In case of null parameter, any exception or error during database operation.

getAllOperations

java.util.Vector getAllOperations()
                                  throws java.rmi.RemoteException,
                                         AuthorizationException
Method to get All operations as Vector of OperationObject.

Returns:
Vector of OperationObject.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of null parameter, any exception or error during database operation.

getOperationsForViewInHash

java.util.Hashtable getOperationsForViewInHash(java.lang.String viewName)
                                               throws java.rmi.RemoteException,
                                                      AuthorizationException
Method to get operations for the particular view. The Hashtable contains operationName as key and operation Type as value.

Parameters:
viewName - The name of the authorizedView for which the operations are going to be get.
Returns:
Hashtable of assigned operations.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of null parameter, any exception or error during database operation.

getOperationsForView

java.util.Hashtable getOperationsForView(java.lang.String viewName)
                                         throws java.rmi.RemoteException,
                                                AuthorizationException
Method to get the exact operations assigned for a particular view. The Hashtable returned contains operationName as key and operationType as value. This method returns only the exact operations (excluding the child operations associated with these operations if any) assigned to a particular view unlike the getOpearationsForViewInHash API which returns all the available operations (including the child operations) for a particular view

Returns:
Hashtable of exact operations assigned for a particular view
Throws:
java.rmi.RemoteException - In case of RMI
AuthorizationException - in case of null parameter, any Exception or Error during database operation.

setUserStatus

void setUserStatus(java.lang.String userName,
                   java.lang.String status)
                   throws java.rmi.RemoteException,
                          AuthorizationException
Method to update the user's status. This method updates the status of the user's account , this status will be stored in the persistent data storage and when the user attempts to login, submitting his credentials he will be also verified for the status.

Parameters:
userName - The name of the user.
status - The status of the user that has to be stored in the data storage.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

setPasswordAge

void setPasswordAge(java.lang.String userName,
                    int passwdAgeInDays)
                    throws java.rmi.RemoteException,
                           AuthorizationException
Method to set the user's password expiry time. This method will set the password age in number of days after which the user will be requested to change his password.The password expiry is checked only when the user tries to login.If the password is expired, then the user will be prompted to change his own password.

Parameters:
userName - The name of the user.
passwdAgeInDays - The expiry time of the user's password in days.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

getPasswordAge

int getPasswordAge(java.lang.String userName)
                   throws java.rmi.RemoteException,
                          AuthorizationException
Method to get the user's remaining password age. This method will give the remaining number of days with in which the user has to change his password.

Parameters:
userName - The name of the user.
Returns:
Number of days remanining to expire the users' password.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

getAllAttributes

java.util.Hashtable getAllAttributes(java.lang.String userName)
                                     throws java.rmi.RemoteException,
                                            AuthorizationException
To get all attributes for the user. The attributes contains the users' status,password age,user age,password expiry time and users' account expiry time.

Parameters:
userName - The name of the user.
Returns:
Hashtable of attibutes as below "status" as key and value as the string. "passwdage" as key and value as Integer i.e number of days set. "userage" as key and value as Integer i.e number of days set. "userexpirytime" as key and value as Integer i.e number of days remanining to expire the user account. "passwordexpirytime" as key and value as Integer i.e number of i days remaining to expire the password for the user.
Throws:
java.rmi.RemoteException - In case of RMI.
AuthorizationException - In case of any exception or error during database operation.

setUserExpirationTime

void setUserExpirationTime(java.lang.String userName,
                           int noOfDays)
                           throws java.rmi.RemoteException,
                                  AuthorizationException
Method to set the expiration time for the users' account. The value in number of days specifies exactly when the user account expires.The user account expiry will be checked at a particular time interval and will be notified once the account is expired.If the user account is expired current logged in sessions for that particular user also terminated.

Parameters:
userName - The name of the user.
noOfDays - The days in number to expire users' account.
Throws:
AuthorizationException - In case of any exception or error during database operation.
java.rmi.RemoteException - In case of RMI.

getUserExpirationTime

int getUserExpirationTime(java.lang.String userName)
                          throws java.rmi.RemoteException,
                                 AuthorizationException
Method to get the expiration time of the user.

Parameters:
userName - The name of the user.
Returns:
int The expiration time of the users' account.
Throws:
AuthorizationException - In case of any exception or errors during database operation.
java.rmi.RemoteException - In case of RMI.

updateXML

void updateXML()
               throws java.rmi.RemoteException,
                      AuthorizationException
Method to update the securityDBData.xml file with the latest security data from database. By default security data will be updated in the database as well as in securityDBData.xml file during api calls. If security data has to be updated only in database during api calls, this can be achieved by setting persist_data_in_XML to false for NmsAuthManager process in NmsProcessesBE.conf file. In that case data will be updated only in database. While using this option, if you want to update the XML also, then this api can be used.

Throws:
java.rmi.RemoteException - in case of RMI.
AuthorizationException - in case of any exception or errors during database operation.

setDescriptiveName

void setDescriptiveName(java.lang.String userName,
                        java.lang.String descName)
                        throws java.rmi.RemoteException,
                               AuthorizationException
Method to set the Descriptive Name for an user's account.

Parameters:
userName - The name of the user.
descName - Full Name of the user
Throws:
AuthorizationException - In case of any exception or error during database operation.
java.rmi.RemoteException - In case of RMI.

getDescriptiveName

java.lang.String getDescriptiveName(java.lang.String userName)
                                    throws java.rmi.RemoteException,
                                           AuthorizationException
Method to get the Descriptive Name of an user's account.

Parameters:
userName - The name of the user.
Returns:
String Full Name of the user
Throws:
AuthorizationException - In case of any exception or error during database operation.
java.rmi.RemoteException - In case of RMI.

"WEBNMS_5 API Docs"

Copyright © 2011 ZOHO Corp., All Rights Reserved.