Package org.fcrepo.http.commons.domain
Class SinglePrefer
- java.lang.Object
-
- org.fcrepo.http.commons.domain.SinglePrefer
-
- Direct Known Subclasses:
MultiPrefer
public class SinglePrefer extends Object
JAX-RS HTTP parameter parser for the Prefer header- Author:
- cabeer, ajs6f, acoburn
-
-
Constructor Summary
Constructors Constructor Description SinglePrefer(String header)
Parse a Prefer: header
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PreferTag
getHandling()
Get the return tag, or a blank default, if none exists.PreferTag
getReturn()
Get the return tag, or a blank default, if none exists.Boolean
hasHandling()
Does the Prefer: header have a return tagBoolean
hasReturn()
Does the Prefer: header have a return tagprotected Set<PreferTag>
preferTags()
-
-
-
Constructor Detail
-
SinglePrefer
public SinglePrefer(String header)
Parse a Prefer: header- Parameters:
header
- the header
-
-
Method Detail
-
hasReturn
public Boolean hasReturn()
Does the Prefer: header have a return tag- Returns:
- true if the header has a return tag
-
hasHandling
public Boolean hasHandling()
Does the Prefer: header have a return tag- Returns:
- true if the header has a return tag
-
getReturn
public PreferTag getReturn()
Get the return tag, or a blank default, if none exists.- Returns:
- return tag, or a blank default, if none exists
-
getHandling
public PreferTag getHandling()
Get the return tag, or a blank default, if none exists.- Returns:
- return tag, or a blank default, if none exists
-
preferTags
protected Set<PreferTag> preferTags()
-
-