Class PropertiesCommand

  • All Implemented Interfaces:
    JESTCommand

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

      • getMaximumArguments

        protected int getMaximumArguments()
        Gets the maximum number of arguments excluding the mandatory arguments.
        Returns:
        Integer.MAX_VALUE by default.
      • 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
      • 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)
      • 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.
      • pushFetchPlan

        protected void pushFetchPlan​(Object target)
      • popFetchPlan

        protected void popFetchPlan​(boolean finder)