Merge changes I5809ac06,I4362cd4e
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / authorization / IResourceAuthorization.java
index 8f6cfa42512642ba6e1115332c68898bb35ece75..c88c53decf36d7e6cdcf3e55ecd46ce1ff830032 100644 (file)
@@ -25,20 +25,20 @@ public interface IResourceAuthorization {
     /**
      * Create a Role name for the application
      *
-     * @param role     the role name
-     * @param userLevel        the user level in the application context
-        * @return the status of the request
-        */
+     * @param role  the role name
+     * @param userLevel the user level in the application context
+         * @return the status of the request
+         */
     public Status createRole(String role, AppRoleLevel userLevel);
 
     /**
      * Remove a Role
-     * 
+     *
      * @param role the role name
      * @return the status of the request
      */
     public Status removeRole(String role);
-    
+
     /**
      * Return the list of roles configured for the application
      *
@@ -47,13 +47,15 @@ public interface IResourceAuthorization {
     public List<String> getRoles();
 
     /**
-     * Returns the application role level for the specified role
-     * If the role is not known to this application <code>NOUSER<code>
-     * will be returned as specified in {@link AppRoleLevel}
+     * Returns the application role level for the specified role. If the role is
+     * not known to this application NOUSER will be returned as specified in
+     * {@link AppRoleLevel}
      *
-     * @param roleName the role name to query
-     * @return the application level of the given role in the application context as specified by {@link AppRoleLevel}
-     *                         if the role is not part of this application's roles, <code>NOUSER<code> is returned
+     * @param roleName
+     *            the role name to query
+     * @return the application level of the given role in the application
+     *         context as specified by {@link AppRoleLevel}. If the role is not
+     *         part of this application's roles, NOUSER is returned.
      */
     public AppRoleLevel getApplicationRoleLevel(String roleName);
 
@@ -61,7 +63,7 @@ public interface IResourceAuthorization {
      * Returns whether the specified role is part of this application's roles
      *
      * @param roleName the role name to test
-     * @return true if the role belongs to this application, false otherwise
+     * @return  true if the role belongs to this application, false otherwise
      */
     public boolean isApplicationRole(String roleName);
 
@@ -110,22 +112,22 @@ public interface IResourceAuthorization {
      * @return the status of the request
      */
     public Status assignResourceGroupToRole(String groupName, String role);
-    
+
     /**
      * Unassign the passed resource group from the specified role
-     * 
-     * @param group
-     * @param role
+     *
+     * @param groupName the name of the resource group
+     * @param role the role name
      * @return the status of the request
      */
-    public Status unassignResourceGroupFromRole(String group, String role);
-    
+    public Status unassignResourceGroupFromRole(String groupName, String role);
+
     /**
      * Returns the list of resource groups the given Role is authorized to use
      * The returning object expresses the resource group name and the access
      * its privilege for the given user role
      *
-     * @param role
+     * @param role  the role name
      * @return list of resources
      */
     public List<ResourceGroup> getAuthorizedGroups(String role);
@@ -141,7 +143,7 @@ public interface IResourceAuthorization {
     /**
      * Returns the list of authorized resources for the given role
      * For each resource only the highest privilege occurrence is returned
-     * @param role
+     * @param role  the role name
      * @return the list of Resource
      */
     public List<Resource> getAuthorizedResources(String role);
@@ -179,8 +181,8 @@ public interface IResourceAuthorization {
      * Returns the highest privilege that the user has on the specified
      * resource in this application context
      *
-     * @param userName
-     * @param resource
+     * @param userName the user name
+     * @param resource the given resource
      * @return the privilege the user has on the passed resource
      */
     public Privilege getResourcePrivilege(String userName, Object resource);