|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface SendCommandContextFilter
Defines a filter on the content context object of a SendCommand
object.
The defined filter will be invoked before the SendCommand
is executed. A class that implements this interface is registered with a
SendCommand by invoking
SendCommand.setSendCommandContextFilter(SendCommandContextFilter),
and is used to modify the context object of the SendCommand
prior to the SendCommand.run() method actually using it. The primary
use case for a filter is to provide intelligently shortened strings in the
context object with content exceeding a maximum character limit,
if one exists for the SendCommand's target application.
For example, suppose an application's message may not exceed 140
characters. A SendCommandContextFilter registered with the
application's SendCommand could shorten long URLs using
http://tinyurl.com to fit within the 140 character limit.
| Method Summary | ||
|---|---|---|
|
JSONObject |
filterContext(SendCommand sendCommand)
Filters the JSONObject context data of the specified
SendCommand object. |
| Method Detail |
|---|
JSONObject filterContext(SendCommand sendCommand)
JSONObject context data of the specified
SendCommand object.
The modified JSONObject context object is to be returned
by this method. The parameter SendCommand object is to be
executed with the returned JSONObject.
sendCommand - The SendCommand whose
JSONObject context object is to be filtered/modified prior
to the SendCommand.run() method actually using it. If the
parameter sendCommand is null, then behaviour
is undefined.
null may be returned.
If a non-null JSONObject context object is
returned, then (a copy of) it will be used by the caller instead of
the JSONObject context object of the specified
SendCommand. If null is returned, then (a copy
of) the JSONObject context object of the specified
SendCommand will be used by the caller.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal