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 booleandebugprotected Map<String,CharSequence>defaultsprotected Set<String>mandatoryTagsprotected static booleanVALIDATION
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancontainsTag(String tag)protected voiddebugMsg(String msg)booleanequals(Object obj)protected CharSequencegetDefault(String key)Set<String>getTags()protected CharSequencegetValue(String key)inthashCode()protected voidinit()protected booleanisInListCaseInsensitive(CharSequence hash, List<CharSequence> hashes)protected Map<String,CharSequence>newTagValue()protected voidparse(String data)subclasses have to make sure tagValues is initialized during init().protected voidsetValue(String tag, String value)protected List<CharSequence>stringToColonSeparatedList(String h, Pattern pattern)protected Set<String>tagSet()StringtoString()protected CharSequencetrimFWS(CharSequence data, int tStart, int tStop, boolean trimWSP)voidvalidate()
-
-
-
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
-
-