Package org.apache.james.jdkim.tagvalue
Class TagValue
- java.lang.Object
-
- org.apache.james.jdkim.tagvalue.TagValue
-
- Direct Known Subclasses:
PublicKeyRecordImpl
,SignatureRecordImpl
public class TagValue extends Object
This class handle a tag=value list string as defined by DKIM specification It also supports mandatoryTags and default values as a commodity to subclasses.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
debug
protected Map<String,CharSequence>
defaults
protected Set<String>
mandatoryTags
protected static boolean
VALIDATION
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
containsTag(String tag)
protected void
debugMsg(String msg)
boolean
equals(Object obj)
protected CharSequence
getDefault(String key)
Set<String>
getTags()
protected CharSequence
getValue(String key)
int
hashCode()
protected void
init()
protected boolean
isInListCaseInsensitive(CharSequence hash, List<CharSequence> hashes)
protected Map<String,CharSequence>
newTagValue()
protected void
parse(String data)
subclasses have to make sure tagValues is initialized during init().protected void
setValue(String tag, String value)
protected List<CharSequence>
stringToColonSeparatedList(String h, Pattern pattern)
protected Set<String>
tagSet()
String
toString()
protected CharSequence
trimFWS(CharSequence data, int tStart, int tStop, boolean trimWSP)
void
validate()
-
-
-
Field Detail
-
debug
protected boolean debug
-
VALIDATION
protected static final boolean VALIDATION
- See Also:
- Constant Field Values
-
defaults
protected Map<String,CharSequence> defaults
-
-
Constructor Detail
-
TagValue
public TagValue(String data)
-
-
Method Detail
-
containsTag
protected boolean containsTag(String tag)
-
trimFWS
protected CharSequence trimFWS(CharSequence data, int tStart, int tStop, boolean trimWSP)
-
newTagValue
protected Map<String,CharSequence> newTagValue()
-
init
protected void init()
-
parse
protected void parse(String data)
subclasses have to make sure tagValues is initialized during init().- Parameters:
data
- the string to be parsed
-
getValue
protected CharSequence getValue(String key)
-
getDefault
protected CharSequence getDefault(String key)
-
validate
public void validate()
-
stringToColonSeparatedList
protected List<CharSequence> stringToColonSeparatedList(String h, Pattern pattern)
-
isInListCaseInsensitive
protected boolean isInListCaseInsensitive(CharSequence hash, List<CharSequence> hashes)
-
debugMsg
protected void debugMsg(String msg)
- Parameters:
msg
- the message
-
-