public class NotifyPortletView extends PortalCommand
A notification (as defined by the JSON RPC specification) to be sent to the portlet view (the browser).
Constructor and Description |
---|
NotifyPortletView(String portletType,
String portletId,
String method,
Object... params)
Creates a new event.
|
Modifier and Type | Method and Description |
---|---|
String |
method()
Returns the method to be executed.
|
Object[] |
params()
Returns the parameters.
|
String |
portletId()
Returns the portlet id.
|
String |
portletType()
Returns the portlet class.
|
void |
toJson(Writer writer)
Writes the event as JSON notification to the given writer.
|
toJson
addCompletionEvent, associated, cancel, channels, channels, completionEvents, currentResults, defaultCriterion, forChannels, get, get, handled, handlingError, isCancelled, isDone, isEligibleFor, isStopped, processedBy, results, results, setAssociated, setChannels, setRequiresResult, setResult, stop, tieTo, toString
disableTracking, enqueued, firstResultAssigned, isTracked
public NotifyPortletView(String portletType, String portletId, String method, Object... params)
Creates a new event.
portletType
- the portlet type (used by the portal
core JS to look up the available functions, see AddPortletType
)portletId
- the portlet (view) instance that the
notification is directed atmethod
- the method (function) to be executed, must
have been registered by handling AddPortletType
params
- the parameterspublic String portletType()
Returns the portlet class.
public void toJson(Writer writer) throws IOException
PortalCommand
Writes the event as JSON notification to the given writer.
Derived classes usually simply call
PortalCommand.toJson(Writer, String, Object...)
with the method
name and parameters.
toJson
in class PortalCommand
writer
- the writerIOException