Package com.atlassian.confluence.setup
Class DefaultSetupPersister
java.lang.Object
com.atlassian.confluence.setup.DefaultSetupPersister
- All Implemented Interfaces:
com.atlassian.config.setup.SetupPersister,ConfluenceSetupPersister
-
Field Summary
FieldsFields inherited from interface com.atlassian.config.setup.SetupPersister
SETUP_INSTALL_DEMO_DATA, SETUP_STATE_COMPLETE, SETUP_TYPE_CUSTOM, SETUP_TYPE_INITIAL, SETUP_TYPE_INSTALL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureSetupSequence(String setupType) Creates a default bootstrapManager sequence based on current state of confluence.config.xmlvoidChanges the setup type to a migration from standalone to cluster, and sets the current setup stepvoidChanges the setup type to a migration from cluster to standalone, and sets the current setup stepvoidEnsures that the bootstrapManager is written to a complete state by overriding all other remaining operations.List<com.atlassian.core.util.PairType> List<com.atlassian.core.util.PairType> Gets the key of the current step for displaying in setup step bar UI.Gets the key of the actual current step.List<com.atlassian.core.util.PairType> booleanbooleanDetermines whether or not the configured setup type is for a clustered editionbooleanDetermines whether or not the configured setup type is a migration to/from clusteredvoidvoidRemoves config file entries pertaining to clusteringvoidResets the confluence.cfg.xml into the previous working state after a migration to cluster was cancelledvoidsetApplicationConfig(com.atlassian.config.ApplicationConfiguration applicationConfig) voidvoidMarks that a migration to cluster was attempted, and should be cleaned up upon next startup.voidsetSetupType(String setupType) voidsynchSetupStackWithConfigRecord(String currentStep) Matches a recorded action in confluence.cfg.xml, element setupStep, to what is in the setupStack.
-
Field Details
-
SETUP_TYPE_CLUSTER
- See Also:
-
SETUP_TYPE_STANDALONE_TO_CLUSTER
- See Also:
-
SETUP_TYPE_CLUSTER_TO_STANDALONE
- See Also:
-
MIGRATION_SETUP_TYPES
-
CLUSTER_SETUP_TYPES
-
-
Constructor Details
-
DefaultSetupPersister
public DefaultSetupPersister()
-
-
Method Details
-
setApplicationConfig
public void setApplicationConfig(com.atlassian.config.ApplicationConfiguration applicationConfig) -
configureSetupSequence
Creates a default bootstrapManager sequence based on current state of confluence.config.xml -
synchSetupStackWithConfigRecord
Description copied from interface:ConfluenceSetupPersisterMatches a recorded action in confluence.cfg.xml, element setupStep, to what is in the setupStack. Will then pop all previously performed steps.- Specified by:
synchSetupStackWithConfigRecordin interfaceConfluenceSetupPersister- Parameters:
currentStep- the step we are up to
-
getUncompletedSteps
- Specified by:
getUncompletedStepsin interfacecom.atlassian.config.setup.SetupPersister
-
getCompletedSteps
- Specified by:
getCompletedStepsin interfacecom.atlassian.config.setup.SetupPersister
-
getAllVisibleSteps
-
getSetupType
- Specified by:
getSetupTypein interfacecom.atlassian.config.setup.SetupPersister- Returns:
- the bootstrapManager type of the bootstrapManager process - initial, custom or install.
-
setSetupType
- Specified by:
setSetupTypein interfacecom.atlassian.config.setup.SetupPersister
-
finishSetup
public void finishSetup() throws com.atlassian.config.setup.SetupExceptionEnsures that the bootstrapManager is written to a complete state by overriding all other remaining operations.- Specified by:
finishSetupin interfacecom.atlassian.config.setup.SetupPersister- Throws:
com.atlassian.config.setup.SetupException
-
progessSetupStep
public void progessSetupStep()- Specified by:
progessSetupStepin interfacecom.atlassian.config.setup.SetupPersister
-
getCurrentDisplayStep
Gets the key of the current step for displaying in setup step bar UI. This can be different from the actual step, for example, when the actual step is invisible and we want the setup step bar UI to still display the previous step.- Returns:
- key of the current step for displaying purpose, null if the setup is done and there is no meaningful current step
-
getCurrentStep
Gets the key of the actual current step.- Specified by:
getCurrentStepin interfacecom.atlassian.config.setup.SetupPersister- Returns:
- key of the actual current step
-
setDemonstrationContentInstalled
public void setDemonstrationContentInstalled()- Specified by:
setDemonstrationContentInstalledin interfacecom.atlassian.config.setup.SetupPersister
-
isDemonstrationContentInstalled
public boolean isDemonstrationContentInstalled()- Specified by:
isDemonstrationContentInstalledin interfacecom.atlassian.config.setup.SetupPersister
-
isSetupTypeClustered
public boolean isSetupTypeClustered()Description copied from interface:ConfluenceSetupPersisterDetermines whether or not the configured setup type is for a clustered edition- Specified by:
isSetupTypeClusteredin interfaceConfluenceSetupPersister- Returns:
- True if the setup type is clustered or migration to cluster
-
isSetupTypeMigration
public boolean isSetupTypeMigration()Description copied from interface:ConfluenceSetupPersisterDetermines whether or not the configured setup type is a migration to/from clustered- Specified by:
isSetupTypeMigrationin interfaceConfluenceSetupPersister- Returns:
- True if the setup type is a migration
-
convertToClusterMigration
public void convertToClusterMigration()Description copied from interface:ConfluenceSetupPersisterChanges the setup type to a migration from standalone to cluster, and sets the current setup step- Specified by:
convertToClusterMigrationin interfaceConfluenceSetupPersister
-
convertToStandaloneMigration
public void convertToStandaloneMigration()Description copied from interface:ConfluenceSetupPersisterChanges the setup type to a migration from cluster to standalone, and sets the current setup step- Specified by:
convertToStandaloneMigrationin interfaceConfluenceSetupPersister
-
resetCancelledMigration
public void resetCancelledMigration()Description copied from interface:ConfluenceSetupPersisterResets the confluence.cfg.xml into the previous working state after a migration to cluster was cancelled- Specified by:
resetCancelledMigrationin interfaceConfluenceSetupPersister
-
setMigrationCancelled
public void setMigrationCancelled()Description copied from interface:ConfluenceSetupPersisterMarks that a migration to cluster was attempted, and should be cleaned up upon next startup.- Specified by:
setMigrationCancelledin interfaceConfluenceSetupPersister
-
removeClusterSetupEntries
public void removeClusterSetupEntries()Description copied from interface:ConfluenceSetupPersisterRemoves config file entries pertaining to clustering- Specified by:
removeClusterSetupEntriesin interfaceConfluenceSetupPersister
-