Checkstyle enforcer
[controller.git] / opendaylight / northbound / commons / src / main / java / org / opendaylight / controller / northbound / commons / utils / NorthboundUtils.java
index 7069ff041f6d5c8d1c7b33ca0f735287315d1f07..3fedd0c9f8ea9d4fe8d5a470ca603e3298776f0a 100644 (file)
@@ -9,11 +9,11 @@ import org.opendaylight.controller.usermanager.IUserManager;
 
 public class NorthboundUtils {
 
-    
+
     /**
      * Returns whether the current user has the required privilege on the
      * specified container
-     * 
+     *
      * @param userName
      *            The user name
      * @param containerName
@@ -21,21 +21,21 @@ public class NorthboundUtils {
      * @param required
      *            Operation to be performed - READ/WRITE
      * @param bundle
-     *            Class from where the function is invoked           
+     *            Class from where the function is invoked
      * @return The Status of the request, either Success or Unauthorized
      */
     public static boolean isAuthorized(String userName, String containerName,
             Privilege required,Object bundle) {
-        
+
          if (containerName.equals(GlobalConstants.DEFAULT.toString())) {
             IUserManager auth = (IUserManager) ServiceHelper.getGlobalInstance(
                     IUserManager.class, bundle);
-            
+
             switch (required) {
             case WRITE:
                 return (auth.getUserLevel(userName).ordinal() <= UserLevel.NETWORKADMIN.ordinal());
             case READ:
-                return (auth.getUserLevel(userName).ordinal() <= UserLevel.NETWORKOPERATOR.ordinal());                    
+                return (auth.getUserLevel(userName).ordinal() <= UserLevel.NETWORKOPERATOR.ordinal());
             default:
                 return false;
             }
@@ -56,5 +56,5 @@ public class NorthboundUtils {
         }
         return true;
     }
-    
+
 }