All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.memority.toolkit.rule.api.ActionRule Maven / Gradle / Ivy

Go to download

This artifact provides the API classes that are necessary to implement the contracts of Memority configuration Rules.

There is a newer version: 3.43.1
Show newest version
/*
 * Copyright (c) 2016-2023 Memority. All Rights Reserved.
 *
 * This file is part of Memority Toolkit API , a Memority project.
 *
 * This file is released under the Memority Public Artifacts End-User License Agreement,
 * see 
 * Unauthorized copying of this file, via any medium is strictly prohibited.
 */
package com.memority.toolkit.rule.api;

import com.memority.toolkit.rule.api.context.Context;

/**
 * An Action Rule is used to execute a command that will, typically, have side effects. It returns a simple
 * information that indicates whether or not the action execution was successful, failed, or did not run at all (no-op).
 */
public interface ActionRule extends Rule {

    /**
     * Run the Action with the given context and return an {@link ActionOutcome}.
     *
     * @param context the execution context
     * @return the action outcome, never null
     */
    ActionOutcome run(final Context context);

    default RuleType getRuleType() {
        return RuleType.ACTION;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy