Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## madkit.pluginmanager
Interface Action

All Known Implementing Classes:
  AddDocumentationReference

    public interface Action

Defines the actions a plugin can request to execute after installation. An action is defined in a plugin's xml file. The declaration is: <action id="actionname" set of parameters>
The only registered attribute name is `id`, used to identify the action. The set of parameters depends on each action type.

Version:
  $Revision: 1.2 $
Author:
  Sebastian Rodriguez - sebastian.rodriguez@utbm.fr

Method Summary
`boolean` | `execute()` Request the action to execute.
`java.lang.String` | `getFailureReason()` Gets the failure reason.
`java.util.Collection` | `getMandatoryParameters()` Get the Madatory parameters needed by the action to execute
`java.lang.String` | `getName()` Gets the action name.
`java.util.Collection` | `getOptionalParameters()` Get the Optional/b> parameters needed by the action to execute
`java.lang.String` | `getOwnerPlugin()` Gets the name of the plugin owner of this action
`Version` | `getOwnerPluginVersion()` Gets the version of the plugin owner of this action
`java.lang.String` | `getQuestionToUser()` If showAskUser() returns true, this method is called to get the Question.
`java.util.Collection` | `requiredPlugins()` Gets the required plugins to execute this action.
`void` | `setParamenters(java.util.Properties params)` Sets the parameters obtained from the plugin xml file.
`boolean` | `shouldAskUser()` Should the Plugin Manager ask for user confirmation before executing the action.

Method Detail

### getName

    java.lang.String getName()

  Gets the action name.

  Returns:
    Action name

### requiredPlugins

    java.util.Collection requiredPlugins()

  Gets the required plugins to execute this action.

  Returns:

### getMandatoryParameters

    java.util.Collection getMandatoryParameters()

  Get the Madatory parameters needed by the action to execute

  Returns:
    a collection of Strings with the paraments names
  See Also:
    `Action.getOptionalParameters()`

### getOptionalParameters

    java.util.Collection getOptionalParameters()

  Get the Optional/b> parameters needed by the action to execute

  Returns:
    a collection of Strings with the paraments names
  See Also:
    `Action.getMadatoryParameters()`

### setParamenters

    void setParamenters(java.util.Properties params)

  Sets the parameters obtained from the plugin xml file. `params` will contain both, mandatory and optional parameters

  Parameters:
    `params` - set of parameters

### execute

    boolean execute()

  Request the action to execute.

  Returns:
    true if and only if the action execution was successful

### getFailureReason

    java.lang.String getFailureReason()

  Gets the failure reason. This method will be called only if execute return `false`

  Returns:
    failure reason

### shouldAskUser

    boolean shouldAskUser()

  Should the Plugin Manager ask for user confirmation before executing the action.

  Returns:
    true if the action requires user confirmation.

### getQuestionToUser

    java.lang.String getQuestionToUser()

  If showAskUser() returns true, this method is called to get the Question. Please formulate your question so that "yes" means execute the Action

  Returns:

### getOwnerPlugin

    java.lang.String getOwnerPlugin()

  Gets the name of the plugin owner of this action

  Returns:

### getOwnerPluginVersion

    Version getOwnerPluginVersion()

  Gets the version of the plugin owner of this action

  Returns:

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Madkit Team (O. Gutknecht, J. Ferber, F. Michel et al.) All Rights Reserved.