Class OldPolicyConditionMigrationUpgradeStep
- java.lang.Object
-
- org.forgerock.openam.upgrade.steps.AbstractUpgradeStep
-
- org.forgerock.openam.upgrade.steps.policy.conditions.OldPolicyConditionMigrationUpgradeStep
-
- All Implemented Interfaces:
UpgradeStep
public class OldPolicyConditionMigrationUpgradeStep extends AbstractUpgradeStep
Will attempt to migrate old policy conditions to new entitlement conditions.
Will only migrate conditions that have a defined migration path from old to new. Any policies which can't be upgrade will be listed in the long report and will have to be manually upgraded at a later date.
- Since:
- 12.0.0
-
-
Field Summary
-
Fields inherited from class org.forgerock.openam.upgrade.steps.AbstractUpgradeStep
BULLET, BUNDLE, DEBUG, INDENT
-
-
Constructor Summary
Constructors Constructor Description OldPolicyConditionMigrationUpgradeStep(PrivilegedAction<SSOToken> adminTokenAction, ConnectionFactory connectionFactory)Constructs a new OldPolicyConditionMigrationUpgradeStep instance.
-
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()Checks what policies could be automatically upgraded and performs the upgrade without saving so that the migrated policy can be validated to ensure the upgrade went well.booleanisApplicable()Returnstrueif there are any policies that can be upgraded.voidperform()Does the persisting of the upgraded policies.-
Methods inherited from class org.forgerock.openam.upgrade.steps.AbstractUpgradeStep
getAdminSubject, getAdminToken, getConnection, getRealmNames
-
-
-
-
Constructor Detail
-
OldPolicyConditionMigrationUpgradeStep
@Inject public OldPolicyConditionMigrationUpgradeStep(PrivilegedAction<SSOToken> adminTokenAction, ConnectionFactory connectionFactory)
Constructs a new OldPolicyConditionMigrationUpgradeStep instance.- Parameters:
adminTokenAction- An instance of the admin action.connectionFactory- An instance of aConnectionFactory.
-
-
Method Detail
-
initialize
public void initialize() throws UpgradeExceptionChecks what policies could be automatically upgraded and performs the upgrade without saving so that the migrated policy can be validated to ensure the upgrade went well.- Throws:
UpgradeException- If a problem occurred checking the policies.
-
isApplicable
public boolean isApplicable()
Returnstrueif there are any policies that can be upgraded.- Returns:
trueif there are any policies that can be upgraded.
-
perform
public void perform() throws UpgradeExceptionDoes the persisting of the upgraded policies.- Throws:
UpgradeException- If there is a problem saving the policies.
-
getShortReport
public String getShortReport(String delimiter)
Returns 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.
-
-