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
Parse a single prefer tag, value and any optional parameters
- Author:
- cabeer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddResponseHeaders(javax.servlet.http.HttpServletResponse servletResponse) Add appropriate response headers to indicate that the incoming preferences were acknowledgedintWe 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 PreferTagemptyTag()Create an empty PreferTagbooleanGet any additional parameters for the prefer taggetTag()Get the tag namegetValue()Get the default value for the taginthashCode()
-
Constructor Details
-
PreferTag
Create a new PreferTag from an existing tag- Parameters:
preferTag- the preferTag
-
PreferTag
Create a blank prefer tag- Parameters:
inputTag- the input tag
-
-
Method Details
-
emptyTag
Create an empty PreferTag- Returns:
- the empty PreferTag
-
getTag
Get the tag name- Returns:
- tag name
-
getValue
Get the default value for the tag- Returns:
- default value for the tag
-
getParams
Get any additional parameters for the prefer tag- Returns:
- additional parameters for the prefer tag
-
addResponseHeaders
Add appropriate response headers to indicate that the incoming preferences were acknowledged- Parameters:
servletResponse- the servlet response
-
compareTo
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:
compareToin interfaceComparable<PreferTag>- See Also:
-
equals
-
hashCode
-