Class ResavePoliciesStep
- java.lang.Object
-
- org.forgerock.openam.upgrade.steps.AbstractUpgradeStep
-
- org.forgerock.openam.upgrade.steps.ResavePoliciesStep
-
- All Implemented Interfaces:
UpgradeStep
public class ResavePoliciesStep extends AbstractUpgradeStep
This upgrade step simply re-saves all policies. The primary purpose of this is to capture any changes between versions that may have influenced such data as the subject indexes.More specifically a couple use cases are:
- In 11.0.0 the entitlement indexes has been resaved without maintaining the trailing slash ('/') characters. Because of this behavior the originally introduced UpgradeEntitlementsStep is not able to regenerate the entitlement indexes (the entitlement index entries do not contain the original resourceName with the trailing slash); see OPENAM-3509.
- In 13.5.0 subject indexing has been enabled and therefore re-saving the policies ensures these indexes are in place.
-
-
Field Summary
-
Fields inherited from class org.forgerock.openam.upgrade.steps.AbstractUpgradeStep
BULLET, BUNDLE, DEBUG, INDENT
-
-
Constructor Summary
Constructors Constructor Description ResavePoliciesStep(PrivilegedAction<SSOToken> adminTokenAction, ConnectionFactory connectionFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDetailedReport(String delimiter)Generates a detailed upgrade report suitable for reviewing changes.StringgetShortReport(String delimiter)Returns a short report for this upgrade step that should be suitable for the upgrade screen.voidinitialize()Initializes the upgrade step during which it determines what sort of changes needs to be applied to the configurationif any.booleanisApplicable()Tells whether this given upgrade step is applicable for this version/configuration of OpenAM.voidperform()Performs the required changes for this upgrade step.-
Methods inherited from class org.forgerock.openam.upgrade.steps.AbstractUpgradeStep
getAdminSubject, getAdminToken, getConnection, getRealmNames
-
-
-
-
Constructor Detail
-
ResavePoliciesStep
@Inject public ResavePoliciesStep(PrivilegedAction<SSOToken> adminTokenAction, ConnectionFactory connectionFactory)
-
-
Method Detail
-
isApplicable
public boolean isApplicable()
Description copied from interface:UpgradeStepTells whether this given upgrade step is applicable for this version/configuration of OpenAM.- Returns:
trueif this upgrade step needs to be performed.
-
initialize
public void initialize() throws UpgradeExceptionDescription copied from interface:UpgradeStepInitializes the upgrade step during which it determines what sort of changes needs to be applied to the configurationif any.- Throws:
UpgradeException- If there was an error while determining the required changes.
-
perform
public void perform() throws UpgradeExceptionDescription copied from interface:UpgradeStepPerforms the required changes for this upgrade step.- Throws:
UpgradeException- If there was an error while upgrading the configuration.
-
getShortReport
public String getShortReport(String delimiter)
Description copied from interface:UpgradeStepReturns a short report for this upgrade step that should be suitable for the upgrade screen.- Parameters:
delimiter- The delimiter to use between lines.- Returns:
- The short upgrade report.
-
getDetailedReport
public String getDetailedReport(String delimiter)
Description copied from interface:UpgradeStepGenerates a detailed upgrade report suitable for reviewing changes.- Parameters:
delimiter- The delimiter to use between lines.- Returns:
- The detailed upgrade report.
-
-