net.sf.javaprinciples.resource.ResourceIdentifierParser Maven / Gradle / Ivy
package net.sf.javaprinciples.resource;
import javax.servlet.http.HttpServletRequest;
/**
* Interface representing a method of parsing some form of URI into a ResourceIdentifier.
* Currently this only supports parsing a String representation of a URI, however it is
* possible that in future it might need to also support parsing a URI object. It's not
* here now, 'cause YAGNI.
*
* @author rvl
*
*/
public interface ResourceIdentifierParser
{
/**
* Parse the provided String version of a URI to produce a ResourceIdentifier.
* @param request The request containing the URI attributes to parse.
* @return A ResourceIdentifier containing the elements of the URI that identify
* the Resource.
* @throws ResourceParseException if there is any problem encountered parsing the URI.
*/
ResourceIdentifier parse(HttpServletRequest request) throws ResourceParseException;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy