Interface URIBuilderForResource

    • Method Detail

      • buildForResource

        URI buildForResource​(String aResourcePath)
        Builds a URI for the specified web resource.

        The built-in URI does not hold any query parameter.

        Calling this method is the same as calling this.fromResource(aResourcePath).build().

        See Also:
        fromResource(String)
      • fromResource

        UriBuilder fromResource​(String aResourcePath)
        Creates a new UriBuilder instance representing a URI initialized from this builder state and the provided resource path.

        Overriding already provided values is not supported and must be avoided. These values can be: the scheme, the host, the port, the root path or some query parameters

        Parameters:
        aResourcePath - resource path interpreted as relative to the module (web application).
      • fromResource

        UriBuilder fromResource​(ResourceType aResourceType,
                                String aResourceName)
                         throws IllegalArgumentException
        Creates a new UriBuilder instance for the current module using current request's locale.

        Overriding already provided values is not supported and must be avoided. These values can be: the scheme, the host, the port, the root path or some query parameters.

        Parameters:
        aResourceType - the resource type
        aResourceName - the resource name
        Throws:
        IllegalArgumentException - if the provided ResourceType is null
      • fromResource

        UriBuilder fromResource​(SchemaNode aSchemaNode,
                                Object aValue)
                         throws IllegalArgumentException
        Creates a new UriBuilder instance for the current module and a node value.

        Overriding already provided values is not supported and must be avoided. These values can be: the scheme, the host, the port, the root path or some query parameters.

        Parameters:
        aSchemaNode - the schema node where the value comes from. it must be an osd:resource type.
        aValue - the value of the osd:resource type.
        Throws:
        IllegalArgumentException - if the schema node or the value is not an osd:resource type.