com.atlassian.confluence.setup
Class DefaultSetupPersister

java.lang.Object
  extended by com.atlassian.confluence.setup.DefaultSetupPersister
All Implemented Interfaces:
com.atlassian.config.setup.SetupPersister, ConfluenceSetupPersister

public class DefaultSetupPersister
extends java.lang.Object
implements ConfluenceSetupPersister


Field Summary
static java.util.Set<java.lang.String> CLUSTER_SETUP_ENTRIES
           
static java.util.Set<java.lang.String> CLUSTER_SETUP_TYPES
           
static java.util.Set<java.lang.String> MIGRATION_SETUP_TYPES
           
static java.lang.String SETUP_TYPE_CLUSTER
           
static java.lang.String SETUP_TYPE_CLUSTER_TO_STANDALONE
           
static java.lang.String SETUP_TYPE_STANDALONE_TO_CLUSTER
           
 
Fields 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
DefaultSetupPersister()
           
 
Method Summary
protected  void configureSetupSequence(java.lang.String setupType)
          Creates a default bootstrapManager sequence based on current state of confluence.config.xml
 void convertToClusterMigration()
          Changes the setup type to a migration from standalone to cluster, and sets the current setup step
 void convertToStandaloneMigration()
          Changes the setup type to a migration from cluster to standalone, and sets the current setup step
 void finishSetup()
          Ensures that the bootstrapManager is written to a complete state by overriding all other remaining operations.
 java.util.List<com.atlassian.core.util.PairType> getAllVisibleSteps()
           
 java.util.List<com.atlassian.core.util.PairType> getCompletedSteps()
           
 java.lang.String getCurrentDisplayStep()
          Gets the key of the current step for displaying in setup step bar UI.
 java.lang.String getCurrentStep()
          Gets the key of the actual current step.
 java.lang.String getSetupType()
           
 java.util.List<com.atlassian.core.util.PairType> getUncompletedSteps()
           
 boolean isDemonstrationContentInstalled()
           
 boolean isSetupTypeClustered()
          Determines whether or not the configured setup type is for a clustered edition
 boolean isSetupTypeMigration()
          Determines whether or not the configured setup type is a migration to/from clustered
 void progessSetupStep()
           
 void removeClusterSetupEntries()
          Removes config file entries pertaining to clustering
 void resetCancelledMigration()
          Resets the confluence.cfg.xml into the previous working state after a migration to cluster was cancelled
 void setApplicationConfig(com.atlassian.config.ApplicationConfiguration applicationConfig)
           
 void setDemonstrationContentInstalled()
           
 void setMigrationCancelled()
          Marks that a migration to cluster was attempted, and should be cleaned up upon next startup.
 void setSetupType(java.lang.String setupType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SETUP_TYPE_CLUSTER

public static final java.lang.String SETUP_TYPE_CLUSTER
See Also:
Constant Field Values

SETUP_TYPE_STANDALONE_TO_CLUSTER

public static final java.lang.String SETUP_TYPE_STANDALONE_TO_CLUSTER
See Also:
Constant Field Values

SETUP_TYPE_CLUSTER_TO_STANDALONE

public static final java.lang.String SETUP_TYPE_CLUSTER_TO_STANDALONE
See Also:
Constant Field Values

MIGRATION_SETUP_TYPES

public static final java.util.Set<java.lang.String> MIGRATION_SETUP_TYPES

CLUSTER_SETUP_TYPES

public static final java.util.Set<java.lang.String> CLUSTER_SETUP_TYPES

CLUSTER_SETUP_ENTRIES

public static final java.util.Set<java.lang.String> CLUSTER_SETUP_ENTRIES
Constructor Detail

DefaultSetupPersister

public DefaultSetupPersister()
Method Detail

setApplicationConfig

public void setApplicationConfig(com.atlassian.config.ApplicationConfiguration applicationConfig)

configureSetupSequence

protected void configureSetupSequence(java.lang.String setupType)
Creates a default bootstrapManager sequence based on current state of confluence.config.xml


getUncompletedSteps

public java.util.List<com.atlassian.core.util.PairType> getUncompletedSteps()
Specified by:
getUncompletedSteps in interface com.atlassian.config.setup.SetupPersister

getCompletedSteps

public java.util.List<com.atlassian.core.util.PairType> getCompletedSteps()
Specified by:
getCompletedSteps in interface com.atlassian.config.setup.SetupPersister

getAllVisibleSteps

public java.util.List<com.atlassian.core.util.PairType> getAllVisibleSteps()

getSetupType

public java.lang.String getSetupType()
Specified by:
getSetupType in interface com.atlassian.config.setup.SetupPersister
Returns:
the bootstrapManager type of the bootstrapManager process - initial, custom or install.

setSetupType

public void setSetupType(java.lang.String setupType)
Specified by:
setSetupType in interface com.atlassian.config.setup.SetupPersister

finishSetup

public void finishSetup()
                 throws com.atlassian.config.setup.SetupException
Ensures that the bootstrapManager is written to a complete state by overriding all other remaining operations.

Specified by:
finishSetup in interface com.atlassian.config.setup.SetupPersister
Throws:
com.atlassian.config.setup.SetupException

progessSetupStep

public void progessSetupStep()
Specified by:
progessSetupStep in interface com.atlassian.config.setup.SetupPersister

getCurrentDisplayStep

public java.lang.String 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

public java.lang.String getCurrentStep()
Gets the key of the actual current step.

Specified by:
getCurrentStep in interface com.atlassian.config.setup.SetupPersister
Returns:
key of the actual current step

setDemonstrationContentInstalled

public void setDemonstrationContentInstalled()
Specified by:
setDemonstrationContentInstalled in interface com.atlassian.config.setup.SetupPersister

isDemonstrationContentInstalled

public boolean isDemonstrationContentInstalled()
Specified by:
isDemonstrationContentInstalled in interface com.atlassian.config.setup.SetupPersister

isSetupTypeClustered

public boolean isSetupTypeClustered()
Description copied from interface: ConfluenceSetupPersister
Determines whether or not the configured setup type is for a clustered edition

Specified by:
isSetupTypeClustered in interface ConfluenceSetupPersister
Returns:
True if the setup type is clustered or migration to cluster

isSetupTypeMigration

public boolean isSetupTypeMigration()
Description copied from interface: ConfluenceSetupPersister
Determines whether or not the configured setup type is a migration to/from clustered

Specified by:
isSetupTypeMigration in interface ConfluenceSetupPersister
Returns:
True if the setup type is a migration

convertToClusterMigration

public void convertToClusterMigration()
Description copied from interface: ConfluenceSetupPersister
Changes the setup type to a migration from standalone to cluster, and sets the current setup step

Specified by:
convertToClusterMigration in interface ConfluenceSetupPersister

convertToStandaloneMigration

public void convertToStandaloneMigration()
Description copied from interface: ConfluenceSetupPersister
Changes the setup type to a migration from cluster to standalone, and sets the current setup step

Specified by:
convertToStandaloneMigration in interface ConfluenceSetupPersister

resetCancelledMigration

public void resetCancelledMigration()
Description copied from interface: ConfluenceSetupPersister
Resets the confluence.cfg.xml into the previous working state after a migration to cluster was cancelled

Specified by:
resetCancelledMigration in interface ConfluenceSetupPersister

setMigrationCancelled

public void setMigrationCancelled()
Description copied from interface: ConfluenceSetupPersister
Marks that a migration to cluster was attempted, and should be cleaned up upon next startup.

Specified by:
setMigrationCancelled in interface ConfluenceSetupPersister

removeClusterSetupEntries

public void removeClusterSetupEntries()
Description copied from interface: ConfluenceSetupPersister
Removes config file entries pertaining to clustering

Specified by:
removeClusterSetupEntries in interface ConfluenceSetupPersister


Copyright © 2003-2014 Atlassian. All Rights Reserved.