abstract class AbstractCommand extends java.lang.Object implements JESTCommand
JESTCommand.Format
Modifier and Type | Field and Description |
---|---|
protected JPAServletContext |
_ctx |
protected ObjectFormatter<?> |
_formatter |
protected static Localizer |
_loc |
static java.util.Collection<java.lang.String> |
EMPTY_LIST |
static char |
EQUAL |
static java.lang.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) |
java.lang.String |
getArgument(java.lang.String key)
Get the value of this command's argument of the given name.
|
java.util.Map<java.lang.String,java.lang.String> |
getArguments()
Get this command's arguments.
|
protected JESTCommand.Format |
getDefaultFormat() |
JPAServletContext |
getExecutionContext()
Get the execution context of this command.
|
java.lang.String |
getMandatoryArgument(java.lang.String key) |
protected java.util.Collection<java.lang.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() |
java.lang.String |
getQualifier(java.lang.String key)
Get the value of this command's qualifier of the given name.
|
java.util.Map<java.lang.String,java.lang.String> |
getQualifiers()
Get this command's qualifiers.
|
protected java.util.Collection<java.lang.String> |
getValidQualifiers()
Gets the valid qualifiers.
|
boolean |
hasArgument(java.lang.String key)
Affirm this command contains an argument of the given name.
|
boolean |
hasQualifier(java.lang.String key)
Affirm this command contains an qualifier of the given name.
|
protected boolean |
isBooleanQualifier(java.lang.String key) |
void |
parse()
Parses HTTP Request for the qualifier and argument of a command.
|
protected void |
popFetchPlan(boolean finder) |
protected void |
pushFetchPlan(java.lang.Object target) |
protected java.util.List<OpenJPAStateManager> |
toStateManager(java.util.Collection<?> objects) |
protected OpenJPAStateManager |
toStateManager(java.lang.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, wait
process
public static final char EQUAL
public static final java.lang.String PATH_SEPARATOR
public static final java.util.Collection<java.lang.String> EMPTY_LIST
protected ObjectFormatter<?> _formatter
protected final JPAServletContext _ctx
protected static Localizer _loc
protected AbstractCommand(JPAServletContext ctx)
public JPAServletContext getExecutionContext()
JESTCommand
getExecutionContext
in interface JESTCommand
public java.lang.String getMandatoryArgument(java.lang.String key)
public java.lang.String getArgument(java.lang.String key)
JESTCommand
getArgument
in interface JESTCommand
public boolean hasArgument(java.lang.String key)
JESTCommand
hasArgument
in interface JESTCommand
public java.util.Map<java.lang.String,java.lang.String> getArguments()
JESTCommand
getArguments
in interface JESTCommand
public java.lang.String getQualifier(java.lang.String key)
JESTCommand
getQualifier
in interface JESTCommand
public boolean hasQualifier(java.lang.String key)
JESTCommand
hasQualifier
in interface JESTCommand
protected boolean isBooleanQualifier(java.lang.String key)
public java.util.Map<java.lang.String,java.lang.String> getQualifiers()
JESTCommand
getQualifiers
in interface JESTCommand
public 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 JESTCommand
ProcessingException
protected java.util.Collection<java.lang.String> getMandatoryArguments()
protected int getMinimumArguments()
protected int getMaximumArguments()
protected JESTCommand.Format getDefaultFormat()
protected java.util.Collection<java.lang.String> getValidQualifiers()
protected void validate()
public ObjectFormatter<?> getObjectFormatter()
protected OpenJPAStateManager toStateManager(java.lang.Object obj)
protected java.util.List<OpenJPAStateManager> toStateManager(java.util.Collection<?> objects)
protected void pushFetchPlan(java.lang.Object target)
protected void popFetchPlan(boolean finder)
protected void debug(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, JPAServletContext ctx) throws java.io.IOException
java.io.IOException
Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.