Class PropertiesCommand

java.lang.Object
org.apache.openjpa.persistence.jest.PropertiesCommand
All Implemented Interfaces:
JESTCommand

public class PropertiesCommand extends Object
Represents configuration properties in HTML.
Author:
Pinaki Poddar
  • Field Details

  • Constructor Details

  • Method Details

    • getMaximumArguments

      protected int getMaximumArguments()
      Gets the maximum number of arguments excluding the mandatory arguments.
      Returns:
      Integer.MAX_VALUE by default.
    • process

      public void process() throws ProcessingException, IOException
      Description copied from interface: JESTCommand
      Process the given request and write the output on to the given response in the given context.
      Throws:
      ProcessingException
      IOException
    • getDefaultFormat

      protected JESTCommand.Format getDefaultFormat()
    • getExecutionContext

      public JPAServletContext getExecutionContext()
      Description copied from interface: JESTCommand
      Get the execution context of this command.
      Specified by:
      getExecutionContext in interface JESTCommand
      Returns:
      the execution context. never null.
    • getMandatoryArgument

      public String getMandatoryArgument(String key)
    • getArgument

      public String getArgument(String key)
      Description copied from interface: JESTCommand
      Get the value of this command's argument of the given name.
      Specified by:
      getArgument in interface JESTCommand
      Returns:
      null if the argument does not exist.
    • hasArgument

      public boolean hasArgument(String key)
      Description copied from interface: JESTCommand
      Affirm this command contains an argument of the given name.
      Specified by:
      hasArgument in interface JESTCommand
    • getArguments

      public Map<String,String> getArguments()
      Description copied from interface: JESTCommand
      Get this command's arguments.
      Specified by:
      getArguments in interface JESTCommand
    • getQualifier

      public String getQualifier(String key)
      Description copied from interface: JESTCommand
      Get the value of this command's qualifier of the given name.
      Specified by:
      getQualifier in interface JESTCommand
      Returns:
      null if the qualifier does not exist.
    • hasQualifier

      public boolean hasQualifier(String key)
      Description copied from interface: JESTCommand
      Affirm this command contains an qualifier of the given name.
      Specified by:
      hasQualifier in interface JESTCommand
    • isBooleanQualifier

      protected boolean isBooleanQualifier(String key)
    • getQualifiers

      public Map<String,String> getQualifiers()
      Description copied from interface: JESTCommand
      Get this command's qualifiers.
      Specified by:
      getQualifiers in interface JESTCommand
    • parse

      public void parse() throws ProcessingException
      Parses HTTP Request for the qualifier and argument of a command.
      Each servlet path segment, except the first (which is the command name itself), is a qualifier. Each qualifier can be either a key or a key-value pair separated by a = sign.
      Each request parameter key-value pair is an argument. A concrete command may specify mandatory arguments (e.g. type must be mandatory argument for find command, or q for query. The mandatory arguments, if any, are not captured in the argument list.
      The qualifiers and arguments are immutable after parse.
      Specified by:
      parse in interface JESTCommand
      Throws:
      ProcessingException
    • getMandatoryArguments

      protected Collection<String> getMandatoryArguments()
      Gets the mandatory arguments.
      Returns:
      empty list by default.
    • getMinimumArguments

      protected int getMinimumArguments()
      Gets the minimum number of arguments excluding the mandatory arguments.
      Returns:
      zero by default.
    • getValidQualifiers

      protected Collection<String> getValidQualifiers()
      Gets the valid qualifiers.
      Returns:
      empty list by default.
    • validate

      protected void validate()
      Called post-parse to validate this command has requisite qualifiers and arguments.
    • getObjectFormatter

      public ObjectFormatter<?> getObjectFormatter()
    • toStateManager

      protected OpenJPAStateManager toStateManager(Object obj)
    • toStateManager

      protected List<OpenJPAStateManager> toStateManager(Collection<?> objects)
    • pushFetchPlan

      protected void pushFetchPlan(Object target)
    • popFetchPlan

      protected void popFetchPlan(boolean finder)
    • debug

      protected void debug(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, JPAServletContext ctx) throws IOException
      Throws:
      IOException