Skip to content

Commit

Permalink
MID-8842 ninja - task policy rule processor description added
Browse files Browse the repository at this point in the history
(cherry picked from commit 8ce402a)
  • Loading branch information
1azyman committed Jul 26, 2023
1 parent 17a8080 commit 5879e59
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
public interface UpgradeObjectProcessor<T extends Objectable> extends ProcessorMixin {

/**
* @return Unique identifier of the processor. By default it is class name without "Processor" suffix.
* @return Unique identifier of the processor. By default, it is class name without "Processor" suffix.
*/
default String getIdentifier() {
return getIdentifier(getClass());
Expand Down Expand Up @@ -43,6 +43,7 @@ default String getIdentifier() {
* @param path
* @return Returns description of the upgrade if not done automatically.
* Should be single line (might end up in CSV) without any special characters.
* Certainly not semicolon (;) and double quote (").
* Best approach is to put in short description and link to documentation.
*/
default String upgradeDescription(PrismObject<T> object, ItemPath path) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ public boolean isApplicable(PrismObject<?> object, ItemPath path) {
return matchParentTypeAndItemName(object, path, TaskType.class, TaskType.F_POLICY_RULE);
}

@Override
public String upgradeDescription(PrismObject<TaskType> object, ItemPath path) {
return "There is a migration to the use of focusValidityScan.validityConstraint item, although not a complete one: "
+ "even if the ability to recompute objects is retained, custom policy actions can no longer be defined.";
}

@Override
public boolean process(PrismObject<TaskType> object, ItemPath path) throws Exception {
return false;
Expand Down

0 comments on commit 5879e59

Please sign in to comment.