Class QueryParameters.QueryParametersBuilder

    • Method Detail

      • require

        public QueryParameters.QueryParametersBuilder require​(QueryParameter... parameters)
        Indicates some query parameters that are required to be present on the HTTP request. When building, if one of these parameters is absent from the request, an exception with an OSLC Error is thrown.
        Parameters:
        parameters - the required parameters
        Returns:
        this builder instance
      • reject

        public QueryParameters.QueryParametersBuilder reject​(QueryParameter... parameters)
        Indicates some query parameters that are not supported by the application. When building, if one of these parameters is present in the request, an exception with an OSLC Error is throw.
        Parameters:
        parameters - the parameters to reject.
        Returns:
        this builder instance
      • resourceShape

        public QueryParameters.QueryParametersBuilder resourceShape​(Class<?>... resourceClasses)
        Indicates the resource shapes from which OSLC prefixes can be determined.

        The prefixes used in the parameters like oslc.select or oslc.where are resolved to namespaces using the oslc.prefix parameter, if any, but also with ones defined on the OslcSchema of the given resource shapes and, last, with well known OSLC prefixes (RDF, OSLC Core, etc.).

        Parameters:
        resourceClasses - classes whose owning package define an OslcSchema annotation
        Returns:
        this builder instance
      • build

        public QueryParameters build()
        Parses the query parameters part of the scope.
        Returns:
        the parsed query parameters
        Throws:
        WebApplicationException - if some required parameters are missing, or some unsupported parameters are present, or some syntax in supported parameters is invalid.