Class ActionDescriptor

java.lang.Object
org.sourceid.saml20.adapter.gui.ActionDescriptor
All Implemented Interfaces:
Serializable

public class ActionDescriptor extends Object implements Serializable
An ActionDescriptor can be used to invoke arbitrary actions on an adapter via the GUI.
See Also:
  • Constructor Details

    • ActionDescriptor

      public ActionDescriptor(String name, String description, ActionDescriptor.Action action)
      Constructor to create a new ActionDescriptor.
      Parameters:
      name - the name of the action
      description - a description of the action
      action - an implementation of the Action interface that will be invoked when the user selects this action in the GUI.
    • ActionDescriptor

      public ActionDescriptor(String name, String description, String contentType, String filename, ActionDescriptor.Action action)
      Constructor to create a new ActionDescriptor that represents a download action from the GUI.
      Parameters:
      name - the name of the action
      description - a description of the action
      contentType - the content-type that should be used when downloading the result of the action
      filename - the default filename that should be used when downloading the result of the action
      action - an implementation of the Action interface that will be invoked
  • Method Details

    • getName

      public String getName()
      Gets the name of this action.
      Returns:
      The name of this action.
    • getDescription

      public String getDescription()
      Gets the description of this action.
      Returns:
      The description of this action.
    • getAction

      public ActionDescriptor.Action getAction()
      Gets the actual ActionDescriptor.Action implementations associated with this ActionDescriptor.
      Returns:
      The action implementation.
    • isDownload

      public boolean isDownload()
      Returns whether or not the action result should be downloaded instead of displayed.
      Returns:
      A boolean indicating if the action result should be downloaded instead of displayed
    • getDownloadContentType

      public String getDownloadContentType()
      Gets the content type of this download action.
      Returns:
      Content type string of action result or null if this is not a download action.
    • getDownloadFilename

      public String getDownloadFilename()
      Get the download filename of this download action.
      Returns:
      Default filename used when downloading action result
    • addParameter

      public void addParameter(FieldDescriptor fieldDescriptor)
      Add a user-modifiable parameter to this action descriptor. The fields will be rendered on the Actions page in the plugin configuration in the order that they were added.

      Supported FieldDescriptor classes are: Please note that FieldDescriptor names must be unique per descriptor.
      Parameters:
      fieldDescriptor - the field to add.
      Since:
      11.0
    • getParameters

      public List<FieldDescriptor> getParameters()
      Gets the ordered list of FieldDescriptors.
      Returns:
      a List of FieldDescriptors.
      Since:
      11.0