UserManager as role coordinator
[controller.git] / opendaylight / usermanager / src / main / java / org / opendaylight / controller / usermanager / IUserManager.java
index ed23b5f067c45ebd000ac52fffc919e9707800ef..85a97f0b852e99fa728ab4366e69e8dda775dd93 100644 (file)
@@ -267,6 +267,18 @@ public interface IUserManager extends UserDetailsService {
      */
     public ISessionManager getSessionManager();
 
+    /**
+     * Checks if the specified role belongs to any application. Usually an
+     * application will call this function when configuring a role, to check if
+     * that role is already being used by another application.
+     *
+     * @param role
+     *            The role to check
+     * @return true if the specified role belongs to any application or if the
+     *         role is a well-known controller role, false otherwise.
+     */
+    public boolean isRoleInUse(String role);
+
     /* non-Javadoc
      * Returns the password for a given user
      *