Class QueryDescriptor

    • Method Detail

      • getCategory

        public java.lang.String getCategory()
        The menu category provided by Category.
        Returns:
        the category as a translated string
      • getCommandType

        public java.lang.Class<? extends IQuery> getCommandType()
        The type of the query object, to be instantiated and the arguments injected when the query is run.
        Returns:
        the type, suitable for instantiation with Class.newInstance() or Constructor.newInstance(Object...)
      • createNewArgumentSet

        public ArgumentSet createNewArgumentSet​(IQueryContext context)
                                         throws SnapshotException
        Create ArgumentSet.
        Parameters:
        context - The context holding data which could be supplied into the argument set for a query.
        Returns:
        The ArgumentSet for a query holding the data from the context required for the query.
        Throws:
        SnapshotException - if there is a problem creating an argument set from the context.
      • getShortDescription

        public java.lang.String getShortDescription()
        A short description of the query - about 80 characters, truncated from the full help at a sentence boundary.
        Returns:
        a translated short description
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • accept

        public boolean accept​(IQueryContext context)
        Can the query be satisfied by the current context, possibly with other user supplied arguments?
        Parameters:
        context - The data that could be supplied, for example the selected objects.
        Returns:
        true if the query is suitable for use with the current context
      • explain

        public java.lang.String explain​(IQueryContext context)
        Explain any parameters which cannot be filled in from the provided context.
        Parameters:
        context - The data that could be supplied, for example the selected objects.
        Returns:
        a description of the problem arguments
      • getArgumentByName

        public ArgumentDescriptor getArgumentByName​(java.lang.String name)
      • isShallow

        public boolean isShallow()
        Whether to not prompt the user for further arguments.
        Returns:
        false if the query is a standard query where the user can be asked for more arguments