Package org.sourceid.saml20.adapter.gui
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceActionDescriptor.ActionThe action to perform.
-
Constructor Summary
Constructors Constructor Description 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.ActionDescriptor(String name, String description, ActionDescriptor.Action action)Constructor to create a new ActionDescriptor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddParameter(FieldDescriptor fieldDescriptor)Add a user-modifiable parameter to this action descriptor.ActionDescriptor.ActiongetAction()Gets the actualActionDescriptor.Actionimplementations associated with this ActionDescriptor.StringgetDescription()Gets the description of this action.StringgetDownloadContentType()Gets the content type of this download action.StringgetDownloadFilename()Get the download filename of this download action.StringgetName()Gets the name of this action.List<FieldDescriptor>getParameters()Gets the ordered list of FieldDescriptors.booleanisDownload()Returns whether or not the action result should be downloaded instead of displayed.
-
-
-
Constructor Detail
-
ActionDescriptor
public ActionDescriptor(String name, String description, ActionDescriptor.Action action)
Constructor to create a new ActionDescriptor.- Parameters:
name- the name of the actiondescription- a description of the actionaction- 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 actiondescription- a description of the actioncontentType- the content-type that should be used when downloading the result of the actionfilename- the default filename that should be used when downloading the result of the actionaction- an implementation of the Action interface that will be invoked
-
-
Method Detail
-
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 actualActionDescriptor.Actionimplementations 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
-
-