Class EmbeddedCrowdBootstrap
- java.lang.Object
-
- com.atlassian.confluence.user.crowd.EmbeddedCrowdBootstrap
-
public final class EmbeddedCrowdBootstrap extends Object
Provides convenient methods to create the crowd application and internal directory optionally if one isn't found. Optionally the new internal directory may be disabled on creation.
-
-
Field Summary
Fields Modifier and Type Field Description static String
APPLICATION_NAME
static String
INTERNAL_DIRECTORY_NAME
-
Constructor Summary
Constructors Constructor Description EmbeddedCrowdBootstrap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bootstrap()
Ensure that EC is in a valid initial state.boolean
ensureApplicationExists()
If not application entry is found, create one.void
ensureInternalDirectoryExists()
If no internal directory is found, create one and enable it.void
ensureInternalDirectoryExists(DirectoryState state)
If no internal directory is found, create one and set the enabled flag.void
setApplicationDao(com.atlassian.crowd.dao.application.ApplicationDAO applicationDao)
void
setCrowdDirectoryService(com.atlassian.crowd.embedded.api.CrowdDirectoryService crowdDirectoryService)
-
-
-
Field Detail
-
INTERNAL_DIRECTORY_NAME
public static final String INTERNAL_DIRECTORY_NAME
- See Also:
- Constant Field Values
-
APPLICATION_NAME
public static final String APPLICATION_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
bootstrap
public void bootstrap()
Ensure that EC is in a valid initial state. Currently this means making sure that an application and internal directory exist.
-
ensureApplicationExists
public boolean ensureApplicationExists()
If not application entry is found, create one. If an application entry exists, do nothing.- Returns:
- Whether or not the application was created
-
ensureInternalDirectoryExists
public void ensureInternalDirectoryExists()
If no internal directory is found, create one and enable it. If an internal directory is found, do nothing.
-
ensureInternalDirectoryExists
public void ensureInternalDirectoryExists(DirectoryState state)
If no internal directory is found, create one and set the enabled flag. If an internal directory is found, do nothing.- Parameters:
state
- the state of the internal directory if created
-
setCrowdDirectoryService
public void setCrowdDirectoryService(com.atlassian.crowd.embedded.api.CrowdDirectoryService crowdDirectoryService)
-
setApplicationDao
public void setApplicationDao(com.atlassian.crowd.dao.application.ApplicationDAO applicationDao)
-
-