Package org.fcrepo.http.commons.domain
Class PreferTag
- java.lang.Object
-
- org.fcrepo.http.commons.domain.PreferTag
-
- All Implemented Interfaces:
Comparable<PreferTag>
- Direct Known Subclasses:
LdpPreferTag
public class PreferTag extends Object implements Comparable<PreferTag>
Parse a single prefer tag, value and any optional parameters- Author:
- cabeer
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addResponseHeaders(javax.servlet.http.HttpServletResponse servletResponse)
Add appropriate response headers to indicate that the incoming preferences were acknowledgedint
compareTo(PreferTag otherTag)
We consider tags with the same name to be equal, because the definition of Prefer headers does not permit that tags with the same name be consumed except by selecting for the first appearing tag.static PreferTag
emptyTag()
Create an empty PreferTagboolean
equals(Object obj)
Map<String,String>
getParams()
Get any additional parameters for the prefer tagString
getTag()
Get the tag nameString
getValue()
Get the default value for the tagint
hashCode()
-
-
-
Method Detail
-
getValue
public String getValue()
Get the default value for the tag- Returns:
- default value for the tag
-
getParams
public Map<String,String> getParams()
Get any additional parameters for the prefer tag- Returns:
- additional parameters for the prefer tag
-
addResponseHeaders
public void addResponseHeaders(javax.servlet.http.HttpServletResponse servletResponse)
Add appropriate response headers to indicate that the incoming preferences were acknowledged- Parameters:
servletResponse
- the servlet response
-
compareTo
public int compareTo(PreferTag otherTag)
We consider tags with the same name to be equal, because the definition of Prefer headers does not permit that tags with the same name be consumed except by selecting for the first appearing tag.- Specified by:
compareTo
in interfaceComparable<PreferTag>
- See Also:
Comparable.compareTo(java.lang.Object)
-
-