|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.command.registrar.CommandRequest
public final class CommandRequest
Defines a request to obtain commands from a command registry.
Constructor Summary | ||
---|---|---|
CommandRequest()
Creates a CommandRequest instance. |
||
CommandRequest(String commandId)
Creates a CommandRequest instance with a specified command identifier. |
||
CommandRequest(CategoryCollection commandCategories)
Creates a CommandRequest instance containing specified command categories. |
||
CommandRequest(CategoryCollection commandCategories,
CategoryCollection contextCategories)
Create a CommandRequest instance containing specified command categories and context categories. |
Method Summary | ||
---|---|---|
CategoryCollection |
getCommandCategories()
Returns the command categories. |
|
String |
getCommandId()
Returns the command identifier. |
|
Object |
getContext()
Returns the context object. |
|
CategoryCollection |
getContextCategories()
Returns the context categories. |
|
boolean |
isAndContextCategories()
Determines whether the command registrar will logically AND the context categories when searching for commands. |
|
void |
setAndContextCategories(boolean andContextCategories)
Sets whether the command registrar should logically AND the context categories when searching for commands, that is, return commands only if they match all context categories. |
|
void |
setCommandCategories(CategoryCollection categories)
Sets the command categories to query. |
|
void |
setCommandId(String commandId)
Sets the command identifier to query. |
|
void |
setContext(Object context)
Sets the context that is planned to be passed to the retrieved command(s). |
|
void |
setContextCategories(CategoryCollection categories)
Sets the context categories to query. |
|
String |
toString()
Returns a string representation of the instance. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CommandRequest()
CommandRequest
instance.
public CommandRequest(CategoryCollection commandCategories)
CommandRequest
instance containing specified command categories.
commandCategories
- Command categories to query.public CommandRequest(CategoryCollection commandCategories, CategoryCollection contextCategories)
CommandRequest
instance containing specified command categories and context categories.
commandCategories
- Command categories to query.contextCategories
- Context categories to query.public CommandRequest(String commandId)
CommandRequest
instance with a specified command identifier.
commandId
- Identifier of the command to query.Method Detail |
---|
public void setCommandId(String commandId)
commandId
- The command identifier.public String getCommandId()
null
if no command identifier has been set for this request.public void setContext(Object context)
null
, the command registrar's getCommand()
and
getCommands()
methods will only return commands whose canExecute()
method returns true
.
context
- The context object.public Object getContext()
null
if no context object has been set for this request.public void setCommandCategories(CategoryCollection categories)
categories
- The command categories.public CategoryCollection getCommandCategories()
null
. If no command categories have been set for the
request, returns a NullCategoryCollection
singleton instance.public void setContextCategories(CategoryCollection categories)
categories
- The context categories.public CategoryCollection getContextCategories()
null
. If no context categories have been set for the
request, returns a NullCategoryCollection
singleton instance.public void setAndContextCategories(boolean andContextCategories)
andContextCategories
- Indicates whether the command registrar
should return commands only if they match all context categories.public boolean isAndContextCategories()
CommandRequest.setAndContextCategories(boolean)
has never been called, returns true
.
true
if context categories are to be ANDed, false
otherwise.public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.