Class CrowdDisabledUserManager
- java.lang.Object
-
- com.atlassian.confluence.user.crowd.CrowdDisabledUserManager
-
- All Implemented Interfaces:
DisabledUserManager
public final class CrowdDisabledUserManager extends Object implements DisabledUserManager
Implementation of DisabledUserManager which uses the Embedded Crowd service.- Since:
- 3.5
-
-
Constructor Summary
Constructors Constructor Description CrowdDisabledUserManager(com.atlassian.crowd.embedded.api.CrowdService crowdService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disableUser(com.atlassian.crowd.embedded.api.User user)
Disables the specified user.void
enableUser(com.atlassian.crowd.embedded.api.User user)
Enables the specified user.boolean
isDisabled(com.atlassian.crowd.embedded.api.User user)
Returnstrue
if the specified user is deactivated or does not exist, otherwisefalse
.boolean
isDisabled(com.atlassian.user.User user)
boolean
isDisabled(String username)
Returnstrue
if the user with the specified username is deactivated or does not exist, otherwisefalse
.
-
-
-
Method Detail
-
isDisabled
public boolean isDisabled(com.atlassian.crowd.embedded.api.User user)
Description copied from interface:DisabledUserManager
Returnstrue
if the specified user is deactivated or does not exist, otherwisefalse
. Returnsfalse
if the user is null, indicating an anonymous user.- Specified by:
isDisabled
in interfaceDisabledUserManager
- Returns:
- true if the specified user exists and is deactivated, otherwise false.
-
isDisabled
public boolean isDisabled(com.atlassian.user.User user)
Description copied from interface:DisabledUserManager
- Specified by:
isDisabled
in interfaceDisabledUserManager
- Returns:
- true if the specified user exists and is deactivated, otherwise false.
-
isDisabled
public boolean isDisabled(String username)
Description copied from interface:DisabledUserManager
Returnstrue
if the user with the specified username is deactivated or does not exist, otherwisefalse
. Returnsfalse
if the username is null, indicating an anonymous user.- Specified by:
isDisabled
in interfaceDisabledUserManager
- Returns:
- true if the user with the specified username exists and is deactivated, otherwise false.
-
disableUser
public void disableUser(com.atlassian.crowd.embedded.api.User user) throws com.atlassian.crowd.exception.UserNotFoundException
Description copied from interface:DisabledUserManager
Disables the specified user. Does nothing if the user is already disabled.- Specified by:
disableUser
in interfaceDisabledUserManager
- Parameters:
user
- the user to disable- Throws:
com.atlassian.crowd.exception.UserNotFoundException
- if the user does not exist
-
enableUser
public void enableUser(com.atlassian.crowd.embedded.api.User user) throws com.atlassian.crowd.exception.UserNotFoundException
Description copied from interface:DisabledUserManager
Enables the specified user. Does nothing if the user is already enabled.- Specified by:
enableUser
in interfaceDisabledUserManager
- Parameters:
user
- the user to enable- Throws:
com.atlassian.crowd.exception.UserNotFoundException
- if the user does not exist
-
-