|
"WEBNMS_5 API Docs" | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface CustomViewScopeAPI
This class used to provide the Custom View Scope support for framework in Web NMS. The Custom View Scope is the collection of module specific authorized views which belong to different user/group based on their security level. This interface class extends the AuthorizationAdmin which is used to define basic security polcies.
Here is some sample code showing how the CustomViewScopeAPI might be used:
//Accessing CustomViewScopeAPI via RMI
try
{
cvsapi = (CustomViewScopeAPI) Naming. lookup ("//[NMSServer]/NmsAuthAdminAPI");
System.out.println ( "Successfully got the handle for CustomViewScopeAPI");
}
catch (Exception remoteException)
{
System.out.println ( "Error in getting the handle for CustomViewScopeAPI");
}
// Accessing CustomViewScopeAPI from the same JVM
cvsapi = (CustomViewScopeAPI) NmsUtil.getAPI ("NmsAuthAdminAPI");
// Accessing CustomViewScopeAPI via RMIAccessAPI in the NMS RMI secure mode
try
{
RMIAccessAPI rmiApi = Naming.lookup ("//[NMSServer]/RMIAccessAPI");
cvsapi = (CustomViewScopeAPI) rmiApi.getAPI ( userName , password , "NmsAuthAdminAPI" );
}
catch (Exception remoteException)
{
System.out.println ( "Error in getting the handle for CustomViewScopeAPI");
}
// create a CustomViewScope here,
cvsapi.createCVScope("cvscope");
// create an AuthorizedView with some criteria
Properties criteria = new Properties();
criteria.setProperty("severity","2"); //Major has severity 2
criteria.setProperty("entity","s*"); //entity starts with 's'
AuthorizedViewObject avo = new AuthorizedViewObject();
avo.setAuthorizedViewName("authorizedView");
avo.setViewProperties(criteria);
cvsapi.createAuthorizedView(avo); // AuthorizedView created.
// Now assign this authorizedView to both CVScope and group.
cvsapi.assignViewToCVScope("cvscope","authorizedView");
cvsapi.assignViewToGroup("groupName","authorizedView");
Now the users belong to the group 'groupName' can see only
those objects which have the specified criteria.
// To view the criteria for an user
Properties[] p = cvsapi.getCriteria("cvscope","userName");
AuthorizationAdmin| Method Summary | |
|---|---|
boolean |
assignViewToCVScope(java.lang.String cvscope,
java.lang.String view)
Method for associating Authorized View name with Custom View Scope. |
boolean |
assignViewToCVScope(java.lang.String cvscope,
java.util.Vector viewsVector)
Method for assigning Vector of Authorized View Names to Custom View Scope. |
boolean |
assignViewToCVScope(java.lang.String cvscope,
java.util.Vector viewsVector,
java.util.Properties prop)
Method for assigning Vector of Authorized View names to Custom View Scope. |
boolean |
assignViewToGroup(java.lang.String groupName,
java.util.Vector authViews)
Method for assigning a set of authorizedviews to a group. |
boolean |
createCVScope(java.lang.String cvscope)
Method to create a Custom view Scope (CVS). |
java.util.Vector |
getAllAuthorizedViews()
Method to get All authorized Views that have Properties. |
java.util.Vector |
getAllCustomViewScope()
Method to get All custom View scope names. |
java.util.Properties[] |
getCriteria(java.lang.String cvscope,
java.lang.String userName)
Method to get Array of Properties for the User with respect to Custom View Scope. |
java.util.Vector |
getCVScopeForGroup(java.lang.String groupName)
Method to get All Custom View Scopes associated with the group. |
java.util.Vector |
getCVScopeForUser(java.lang.String userName)
Method to get All Custom View Scopes associated with the user. |
java.util.Vector |
getCVScopeForView(java.lang.String view)
Method to get All Custom View Scope names for an Authorized View Name. |
java.util.Hashtable |
getDescription(java.lang.String nodeName)
Method to get ALL descriptions for any parent node present in the conf file "securityDescription.xml". |
java.util.Properties |
getPropertyNamesForCustomViewScope()
Method for getting all property names of CustomViewScopes which would be useful while creating authorized views. |
java.util.Vector |
getViewsForCVScope(java.lang.String cvscope)
Method to get All authorized View names associated with Custom View Scope name. |
boolean |
modifyViewProperty(java.lang.String ViewName,
java.util.Properties viewProp)
Method to modify Properties for a Authorized View. |
boolean |
removeAuthorizedView(java.lang.String authView)
Method for removing authorizedView Completely from the data store. |
boolean |
removeCVScope(java.lang.String cvscope)
Method to remove Custom view Scope. |
boolean |
removeViewFromCVScope(java.lang.String cvscope,
java.lang.String view)
Method to remove the Authorized View name association from the Custom View Scope. |
boolean |
removeViewFromGroup(java.lang.String groupName,
java.util.Vector authViews)
Method for removing a set of authViews from a group. |
void |
setDescription(java.lang.String nodeName,
java.util.Hashtable descData)
Method to set Descriptions for any user,group, or operatrion. |
| Method Detail |
|---|
boolean createCVScope(java.lang.String cvscope)
throws AuthorizationException,
java.rmi.RemoteException
cvscope - Name of CVS to be created.
AuthorizationException - In case of any error while query.
java.rmi.RemoteException - In case of RMI.
boolean removeCVScope(java.lang.String cvscope)
throws AuthorizationException,
java.rmi.RemoteException
cvscope - CVS name to be removed.
AuthorizationException - In case of any error while query.
java.rmi.RemoteException - In case of RMI.
boolean assignViewToCVScope(java.lang.String cvscope,
java.lang.String view)
throws AuthorizationException,
java.rmi.RemoteException
cvscope - Name of the Custom View Scope.view - Name of the Authorized View Name.
AuthorizationException - In case of any error while query.
java.rmi.RemoteException - In case of RMI.
boolean assignViewToCVScope(java.lang.String cvscope,
java.util.Vector viewsVector)
throws AuthorizationException,
java.rmi.RemoteException
cvscope - Name of the Custom View Scope.viewsVector - Authorized View Names.
AuthorizationException - In case of any error while query.
java.rmi.RemoteException - In case of RMI.
boolean assignViewToCVScope(java.lang.String cvscope,
java.util.Vector viewsVector,
java.util.Properties prop)
throws AuthorizationException,
java.rmi.RemoteException
cvscope - Name of the Custom View Scope.viewVector - Authorized View Nameprop - Properties of the Authorized View Object
AuthorizationException - In case of any error while query.
java.rmi.RemoteException - In caes of RMI
boolean removeViewFromCVScope(java.lang.String cvscope,
java.lang.String view)
throws AuthorizationException,
java.rmi.RemoteException
cvscope - Name of the Custom View Scope.view - Name of the Authorized View Name.
AuthorizationException - In case of any error while query.
java.rmi.RemoteException - In case of RMI.
java.util.Vector getViewsForCVScope(java.lang.String cvscope)
throws AuthorizationException,
java.rmi.RemoteException
cvscope - Name of the Custom View.
AuthorizationException - In case of any error while query.
java.rmi.RemoteException - In case of RMI.
java.util.Vector getCVScopeForView(java.lang.String view)
throws AuthorizationException,
java.rmi.RemoteException
view - Name of the View for which Custom Views are needed.
AuthorizationException - In case of any error while query.
java.rmi.RemoteException - In case of RMI.
java.util.Properties[] getCriteria(java.lang.String cvscope,
java.lang.String userName)
throws AuthorizationException,
java.rmi.RemoteException
cvscope - Name of the Custom View Scope.userName - User for whom Criteria are needed.
AuthorizationException - In case of any error while query.
java.rmi.RemoteException - In case of RMI.
java.util.Vector getCVScopeForUser(java.lang.String userName)
throws AuthorizationException,
java.rmi.RemoteException
userName - Name of the user for whom Custom Views are required.
AuthorizationException - In case of any error while query.
java.rmi.RemoteException - In case of RMI.
java.util.Vector getCVScopeForGroup(java.lang.String groupName)
throws AuthorizationException,
java.rmi.RemoteException
groupName - Name of the group for which Custom Views are required.
AuthorizationException - In case of any error while query.
java.rmi.RemoteException - In case of RMI.
java.util.Vector getAllCustomViewScope()
throws AuthorizationException,
java.rmi.RemoteException
AuthorizationException - In case of any error while query.
java.rmi.RemoteException - In case of RMI.
java.util.Hashtable getDescription(java.lang.String nodeName)
throws AuthorizationException,
java.rmi.RemoteException
nodeName - Any parent node in the "securityDescription.xml" file.
AuthorizationException - In case of any error while query.
java.rmi.RemoteException - In case of RMI.
void setDescription(java.lang.String nodeName,
java.util.Hashtable descData)
throws AuthorizationException,
java.rmi.RemoteException
nodeName - Node name to which the description is to be set.descData - The values for the Node.
AuthorizationException - In case of any error while query.
java.rmi.RemoteException - In case of RMI.
java.util.Vector getAllAuthorizedViews()
throws AuthorizationException,
java.rmi.RemoteException
AuthorizationException - In case of any error while query.
java.rmi.RemoteException - In case of RMI.
boolean modifyViewProperty(java.lang.String ViewName,
java.util.Properties viewProp)
throws AuthorizationException,
java.rmi.RemoteException
AuthorizationException - In case of any error
while query.
java.rmi.RemoteException - In case of RMI.
boolean removeAuthorizedView(java.lang.String authView)
throws AuthorizationException,
java.rmi.RemoteException
AuthorizationException - In case of any error
while query.
java.rmi.RemoteException - In case of RMI.
boolean assignViewToGroup(java.lang.String groupName,
java.util.Vector authViews)
throws AuthorizationException,
java.rmi.RemoteException
AuthorizationException - In case of any error
while query.
java.rmi.RemoteException - In case of RMI.
boolean removeViewFromGroup(java.lang.String groupName,
java.util.Vector authViews)
throws AuthorizationException,
java.rmi.RemoteException
AuthorizationException - In case of any error
while query.
java.rmi.RemoteException - In case of RMI.
java.util.Properties getPropertyNamesForCustomViewScope()
throws AuthorizationException,
java.rmi.RemoteException
AuthorizationException - in case of any error.
java.rmi.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 | ||||||||