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

hudson.plugins.helpers.AbstractProjectAction Maven / Gradle / Ivy

The newest version!
package hudson.plugins.helpers;

import hudson.model.AbstractProject;
import hudson.model.Actionable;

/**
 * An action that is associated with a project.
 *
 * @author Stephen Connolly
 * @param  the type of project that this action is associated with.
 * @since 04-Feb-2008 19:42:40
 */
abstract public class AbstractProjectAction> extends Actionable {
    /**
     * The owner of this action.
     */
    private final PROJECT project;

    protected AbstractProjectAction(PROJECT project) {
        this.project = project;
    }

    /**
     * Getter for property 'project'.
     *
     * @return Value for property 'project'.
     */
    public PROJECT getProject() {
        return project;
    }

    /**
     * Override to control when the floating box should be displayed.
     *
     * @return true if the floating box should be visible.
     */
    public boolean isFloatingBoxActive() {
        return true;
    }

    /**
     * Override to control when the action displays a trend graph.
     *
     * @return true if the action should show a trend graph.
     */
    public boolean isGraphActive() {
        return false;
    }

    /**
     * Override to define the graph name.
     *
     * @return The graph name.
     */
    public String getGraphName() {
        return getDisplayName();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy