abstract class AbstractCommand extends Object implements JESTCommand
JESTCommand.Format| Modifier and Type | Field and Description |
|---|---|
protected JPAServletContext |
_ctx |
protected ObjectFormatter<?> |
_formatter |
protected static Localizer |
_loc |
static Collection<String> |
EMPTY_LIST |
static char |
EQUAL |
static String |
PATH_SEPARATOR |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCommand(JPAServletContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
debug(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
JPAServletContext ctx) |
String |
getArgument(String key)
Get the value of this command's argument of the given name.
|
Map<String,String> |
getArguments()
Get this command's arguments.
|
protected JESTCommand.Format |
getDefaultFormat() |
JPAServletContext |
getExecutionContext()
Get the execution context of this command.
|
String |
getMandatoryArgument(String key) |
protected Collection<String> |
getMandatoryArguments()
Gets the mandatory arguments.
|
protected int |
getMaximumArguments()
Gets the maximum number of arguments excluding the mandatory arguments.
|
protected int |
getMinimumArguments()
Gets the minimum number of arguments excluding the mandatory arguments.
|
ObjectFormatter<?> |
getObjectFormatter() |
String |
getQualifier(String key)
Get the value of this command's qualifier of the given name.
|
Map<String,String> |
getQualifiers()
Get this command's qualifiers.
|
protected Collection<String> |
getValidQualifiers()
Gets the valid qualifiers.
|
boolean |
hasArgument(String key)
Affirm this command contains an argument of the given name.
|
boolean |
hasQualifier(String key)
Affirm this command contains an qualifier of the given name.
|
protected boolean |
isBooleanQualifier(String key) |
void |
parse()
Parses HTTP Request for the qualifier and argument of a command.
|
protected void |
popFetchPlan(boolean finder) |
protected void |
pushFetchPlan(Object target) |
protected List<OpenJPAStateManager> |
toStateManager(Collection<?> objects) |
protected OpenJPAStateManager |
toStateManager(Object obj) |
protected void |
validate()
Called post-parse to validate this command has requisite qualifiers and arguments.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprocesspublic static final char EQUAL
public static final String PATH_SEPARATOR
public static final Collection<String> EMPTY_LIST
protected ObjectFormatter<?> _formatter
protected final JPAServletContext _ctx
protected static Localizer _loc
protected AbstractCommand(JPAServletContext ctx)
public JPAServletContext getExecutionContext()
JESTCommandgetExecutionContext in interface JESTCommandpublic String getArgument(String key)
JESTCommandgetArgument in interface JESTCommandpublic boolean hasArgument(String key)
JESTCommandhasArgument in interface JESTCommandpublic Map<String,String> getArguments()
JESTCommandgetArguments in interface JESTCommandpublic String getQualifier(String key)
JESTCommandgetQualifier in interface JESTCommandpublic boolean hasQualifier(String key)
JESTCommandhasQualifier in interface JESTCommandprotected boolean isBooleanQualifier(String key)
public Map<String,String> getQualifiers()
JESTCommandgetQualifiers in interface JESTCommandpublic void parse()
throws ProcessingException
type must be mandatory argument for find command,
or q for query. The mandatory arguments, if any, are not captured
in the argument list.
parse in interface JESTCommandProcessingExceptionprotected Collection<String> getMandatoryArguments()
protected int getMinimumArguments()
protected int getMaximumArguments()
protected JESTCommand.Format getDefaultFormat()
protected Collection<String> getValidQualifiers()
protected void validate()
public ObjectFormatter<?> getObjectFormatter()
protected OpenJPAStateManager toStateManager(Object obj)
protected List<OpenJPAStateManager> toStateManager(Collection<?> objects)
protected void pushFetchPlan(Object target)
protected void popFetchPlan(boolean finder)
protected void debug(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
JPAServletContext ctx)
throws IOException
IOExceptionCopyright © 2006–2013 Apache Software Foundation. All rights reserved.