public abstract class AbstractPatchesSystemSetup
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
BOOLEAN_FALSE |
protected static java.lang.String |
BOOLEAN_TRUE |
| Constructor and Description |
|---|
AbstractPatchesSystemSetup() |
| Modifier and Type | Method and Description |
|---|---|
protected SystemSetupParameter |
createBooleanSystemSetupParameter(java.lang.String key,
java.lang.String label,
boolean defaultValue)
Helper method for creating a Boolean setup parameter.
|
protected void |
createEssentialData(SystemSetupContext setupContext)
Method to create initial objects which will be called by system creator during initialization and system update.
|
protected SystemSetupParameter |
createFalseBooleanValueSystemSetupParameter(java.lang.String key,
java.lang.String label)
Helper method for creating a system setup parameter with
false boolean value. |
protected void |
createProjectData(SystemSetupContext setupContext)
Method to create data that is used in your project.
|
protected SystemSetupParameter |
createSystemSetupParameterBasedOnExecutionInfo(Patch patch,
boolean rerunableEnabled)
Helper method for creating a system setup parameter for Update process type based on rerunable functionality.
|
protected SystemSetupParameter |
createSystemSetupParameterBasedOnNotSelectedProperty(Patch patch)
Helper method for creating a Boolean system setup parameter based on
|
protected void |
executePatchBasedOnConfiguration(SystemSetup.Type type,
Patch patch,
boolean isInit)
Method executes Patches based on configuration from Properties.
|
protected void |
executePatchBasedOnDataType(SystemSetup.Type type,
Patch patch)
Method executes Patches based on data type (ESSENTIAL/PROJECT).
|
protected void |
executePatchBasedOnNotSelectedProperty(SystemSetup.Type type,
Patch patch)
Helper method for executing Patch based on
|
protected void |
executePatches(SystemSetupContext setupContext,
SystemSetup.Type type)
Based on executionType kept in JaloSession different execution Patch method is called.
|
protected void |
executePatchesBasedOnConfiguration(SystemSetup.Type type,
boolean isInit)
Method iterates through list of Patches and for each executes checking Patch configuration based on properties.
|
protected void |
executePatchesBasedOnSetupContext(SystemSetupContext setupContext,
SystemSetup.Type type)
Method iterates through list of Patches and executes these which were setup in
SystemSetupContext. |
protected void |
executeVersionOnPatch(Patch patch)
This method executes given Patch with given version.
|
protected java.lang.Boolean |
getBooleanValueForGivenKey(java.lang.String propertyKey)
Checks configuration specified in properties file for given propertyKey.
|
java.util.List<SystemSetupParameter> |
getInitializationOptions()
Iterates through list of patches which is configured in spring.
|
protected java.lang.Boolean |
getSystemSetupParameter(SystemSetupContext context,
java.lang.String key)
Checks setting of a Boolean setup parameter taken from context.
|
protected boolean |
isPatchHidden(java.lang.String patchId)
Checks configuration for hidden Patch.
|
protected boolean |
isPatchNotSelected(java.lang.String patchId)
Checks configuration for not selected Patch.
|
protected boolean |
isPatchRerunable(Patch patch)
Checks if specified patch is re runnable.
|
protected boolean |
isPatchRerunableFunctionalityEnabled()
Checks configuration for rerunable Patches.
|
protected boolean |
isPatchSelected(java.lang.String patchId)
Checks configuration for not selected Patch.
|
void |
setPatches(java.util.List<Patch> patches) |
void |
setPatchExecutionService(PatchExecutionService patchExecutionService) |
protected static final java.lang.String BOOLEAN_TRUE
protected static final java.lang.String BOOLEAN_FALSE
public java.util.List<SystemSetupParameter> getInitializationOptions()
List<SystemSetupParameter> which should be visible in hac consoleprotected void createEssentialData(SystemSetupContext setupContext)
setupContext - the context provides the selected parameters and valuesprotected void createProjectData(SystemSetupContext setupContext)
setupContext - the context provides the selected parameters and valuesprotected SystemSetupParameter createFalseBooleanValueSystemSetupParameter(java.lang.String key, java.lang.String label)
false boolean value.key - key for system setup parameterlabel - label for system setup parameterSystemSetupParameter with one valueprotected SystemSetupParameter createSystemSetupParameterBasedOnNotSelectedProperty(Patch patch)
patches.<patchId>.notSelectedproperty. If this property is set to true - parameter has default value
false with possibility to change
it to true, if property is not specified or has false value assigned - parameter has default value
true with possibility to change it to false.patch - PatchSystemSetupParameterprotected SystemSetupParameter createBooleanSystemSetupParameter(java.lang.String key, java.lang.String label, boolean defaultValue)
key - key for system setup parameterlabel - label for system setup parameterdefaultValue - default true/false value for system setup parameterSystemSetupParameter with one valueprotected void executePatchBasedOnNotSelectedProperty(SystemSetup.Type type, Patch patch)
patches.<patchId>.notSelectedproperty. If this property is set to true - patch won't be executed, if property is not specified or has
false value assigned - patch will be executed.type - SystemSetup.Typepatch - Patchprotected java.lang.Boolean getSystemSetupParameter(SystemSetupContext context, java.lang.String key)
null.context - SystemSetupContextkey - key used as a parameter suffixtrue if parameter is set to Yes, false if parameter is set to No, null if there is
no information about Patchprotected SystemSetupParameter createSystemSetupParameterBasedOnExecutionInfo(Patch patch, boolean rerunableEnabled)
patch - for which setup should be createdrerunableEnabled - if rerunable functionality is enabledSystemSetupParameter with proper valueprotected boolean isPatchHidden(java.lang.String patchId)
patches.<patchId>.hideproperty is not specified, value of property
patches.hideAllis checked. If it's also not specified, default value is returned:
false.patchId - id of the patchtrue if patch should be hidden, false otherwiseprotected boolean isPatchNotSelected(java.lang.String patchId)
patches.<patchId>.notSelectedproperty is set to true returned is
true. If it's not specified, default value is taken: false.patchId - id of the patchtrue if patch should not be selected, false otherwiseprotected boolean isPatchSelected(java.lang.String patchId)
patches.<patchId>.notSelectedproperty is set to false returned is
true. If it's not specified, default value is taken: false.patchId - id of the patchtrue if patch should not be selected, false otherwiseprotected boolean isPatchRerunableFunctionalityEnabled()
patches.allow.rerun.patchesproperty is set to true returned is
true. If it's not specified, default value is taken: false.true if patches can be executed again, false otherwiseprotected boolean isPatchRerunable(Patch patch)
patches.allow.rerun.patchesproperty or if Patch implements
Rerunnable interface .patch - Patchtrue if patch can be executed again, false otherwiseprotected java.lang.Boolean getBooleanValueForGivenKey(java.lang.String propertyKey)
propertyKey - property key used in configuration filetrue if value for given propertyKey equals true, false if value is false,
otherwise nullprotected void executePatches(SystemSetupContext setupContext, SystemSetup.Type type)
setupContext - SystemSetupContexttype - SystemSetup.Typeprotected void executePatchesBasedOnSetupContext(SystemSetupContext setupContext, SystemSetup.Type type)
SystemSetupContext. If no
information about Patch is in context and Patch is hidden checked is configuration based on properties.setupContext - SystemSetupContexttype - SystemSetup.Typeprotected void executePatchesBasedOnConfiguration(SystemSetup.Type type, boolean isInit)
type - SystemSetup.TypeisInit - true if current processType is Init, otherwise (update) falseprotected void executePatchBasedOnConfiguration(SystemSetup.Type type, Patch patch, boolean isInit)
type - SystemSetup.Typepatch - PatchisInit - true if current processType is Init, otherwise (update) falseprotected void executePatchBasedOnDataType(SystemSetup.Type type, Patch patch)
type - SystemSetup.Typepatch - Patchprotected void executeVersionOnPatch(Patch patch)
patch - Patchpublic void setPatches(java.util.List<Patch> patches)
public void setPatchExecutionService(PatchExecutionService patchExecutionService)
Copyright © 2018 SAP SE. All Rights Reserved.