public class PreviewActionProvider extends AbstractMetacardActionProvider
Modifier | Constructor and Description |
---|---|
|
PreviewActionProvider(String actionProviderId) |
protected |
PreviewActionProvider(String actionProviderId,
String title,
String description)
Constructor that accepts the values to be used when a new
Action is created by this
ActionProvider . |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canHandleMetacard(Metacard metacard)
Determines if this
ActionProvider can handle this Metacard . |
protected Action |
createMetacardAction(String actionProviderId,
String title,
String description,
URL url)
Factory method that creates the proper
Action object from the information provided. |
protected URL |
getMetacardActionUrl(String metacardSource,
Metacard metacard)
|
canHandle, getAction, getId, getMetacardAction, toString
protected PreviewActionProvider(String actionProviderId, String title, String description)
Action
is created by this
ActionProvider
.actionProviderId
- ID that will be assigned to the Action
that will be created.
Cannot be empty or blank.title
- title that will be used when this ActionProvider
creates a new
Action
description
- description that will be used when this ActionProvider
creates a new Action
public PreviewActionProvider(String actionProviderId)
protected boolean canHandleMetacard(Metacard metacard)
AbstractMetacardActionProvider
ActionProvider
can handle this Metacard
. Returns true
by default. Should be overwritten if more complex verification is needed.canHandleMetacard
in class AbstractMetacardActionProvider
metacard
- metacard to which this ActionProvider
could applytrue
if this ActionProvider
applies to the Metacard
protected Action createMetacardAction(String actionProviderId, String title, String description, URL url)
AbstractMetacardActionProvider
Action
object from the information provided.
Must be implemented by sub-classes.createMetacardAction
in class AbstractMetacardActionProvider
actionProviderId
- Action
IDtitle
- Action
titledescription
- Action
descriptionurl
- Action
urlAction
object. Cannot be null
.protected URL getMetacardActionUrl(String metacardSource, Metacard metacard) throws Exception
AbstractMetacardActionProvider
getMetacardActionUrl
in class AbstractMetacardActionProvider
metacardSource
- source ID of the Metacard
metacard
- Metacard
for which a URL
needs to be createdURL
that will be used to create the Action
Exception
- thrown if the URL
couldn't be createdThis work is licensed under a Creative Commons Attribution 4.0 International License.