com.day.cq.compat.codeupgrade.MigrationModeCheck Maven / Gradle / Ivy
/*************************************************************************
*
* ADOBE CONFIDENTIAL
* __________________
*
* Copyright 2017 Adobe Systems Incorporated
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any. The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
**************************************************************************/
package com.day.cq.compat.codeupgrade;
import org.osgi.annotation.versioning.ProviderType;
import javax.annotation.Nonnull;
/**
* A service to check if delayed CodeUpgradeTasks are supposed to be executed.
* Checks for System Property {@link #PROP_MIGRATION}
*/
@ProviderType
public interface MigrationModeCheck {
/**
* System Property to be used to trigger forced migration of delayed {@link CodeUpgradeTask}s
*/
String PROP_MIGRATION = "com.adobe.upgrade.forcemigration";
/**
* @return {@code true} if any delayed CodeUpgradeTasks are to be executed
*/
boolean isDelayedMigrationActive();
/**
* Detect if a specified code upgrade task should be executed
*
* @param codeUpgradeTask the task to validate if it needs to be executed
* @return {@code true} if given delayed CodeUpgradeTasks is to be executed
*/
boolean isDelayedMigrationActive(CodeUpgradeTask codeUpgradeTask);
}