| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.persistence.jest.AbstractCommand
abstract class AbstractCommand
The abstract base class for all commands available to JEST.
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from interface org.apache.openjpa.persistence.jest.JESTCommand | 
|---|
| JESTCommand.Format | 
| Field Summary | |
|---|---|
| protected  JPAServletContext | _ctx | 
| protected  ObjectFormatter<?> | _formatter | 
| protected static Localizer | _loc | 
| static Collection<String> | EMPTY_LIST | 
| static char | EQUAL | 
| static String | PATH_SEPARATOR | 
| Constructor Summary | |
|---|---|
| protected  | AbstractCommand(JPAServletContext ctx) | 
| Method Summary | |
|---|---|
| protected  void | debug(HttpServletRequest request,
      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. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface org.apache.openjpa.persistence.jest.JESTCommand | 
|---|
| process | 
| Field Detail | 
|---|
public 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
| Constructor Detail | 
|---|
protected AbstractCommand(JPAServletContext ctx)
| Method Detail | 
|---|
public JPAServletContext getExecutionContext()
JESTCommand
getExecutionContext in interface JESTCommandpublic String getMandatoryArgument(String key)
public String getArgument(String key)
JESTCommand
getArgument in interface JESTCommandpublic boolean hasArgument(String key)
JESTCommand
hasArgument in interface JESTCommandpublic Map<String,String> getArguments()
JESTCommand
getArguments in interface JESTCommandpublic String getQualifier(String key)
JESTCommand
getQualifier in interface JESTCommandpublic boolean hasQualifier(String key)
JESTCommand
hasQualifier in interface JESTCommandprotected boolean isBooleanQualifier(String key)
public Map<String,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 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(HttpServletRequest request,
                     HttpServletResponse response,
                     JPAServletContext ctx)
              throws IOException
IOException| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||