Package org.sourceid.saml20.adapter.gui
Class ActionDescriptor
java.lang.Object
org.sourceid.saml20.adapter.gui.ActionDescriptor
- All Implemented Interfaces:
Serializable
An ActionDescriptor can be used to invoke arbitrary actions on an adapter via the GUI.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionActionDescriptor(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
Modifier and TypeMethodDescriptionvoidaddParameter(FieldDescriptor fieldDescriptor) Add a user-modifiable parameter to this action descriptor.Gets the actualActionDescriptor.Actionimplementations associated with this ActionDescriptor.Gets the description of this action.Gets the content type of this download action.Get the download filename of this download action.getName()Gets the name of this action.Gets the ordered list of FieldDescriptors.booleanReturns whether or not the action result should be downloaded instead of displayed.
-
Constructor Details
-
ActionDescriptor
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 Details
-
getName
Gets the name of this action.- Returns:
- The name of this action.
-
getDescription
Gets the description of this action.- Returns:
- The description of this 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
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
Get the download filename of this download action.- Returns:
- Default filename used when downloading action result
-
addParameter
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
Gets the ordered list of FieldDescriptors.- Returns:
- a List of FieldDescriptors.
- Since:
- 11.0
-