Package org.apache.james.jdkim.tagvalue
Class SignatureRecordImpl
- java.lang.Object
-
- org.apache.james.jdkim.tagvalue.TagValue
-
- org.apache.james.jdkim.tagvalue.SignatureRecordImpl
-
- All Implemented Interfaces:
SignatureRecord
public class SignatureRecordImpl extends TagValue implements SignatureRecord
-
-
Field Summary
-
Fields inherited from class org.apache.james.jdkim.tagvalue.TagValue
debug, defaults, mandatoryTags, VALIDATION
-
Fields inherited from interface org.apache.james.jdkim.api.SignatureRecord
ALL, ISCHEDULE_RELAXED, RELAXED, SIMPLE
-
-
Constructor Summary
Constructors Constructor Description SignatureRecordImpl(String data)
-
Method Summary
-
Methods inherited from class org.apache.james.jdkim.tagvalue.TagValue
containsTag, debugMsg, equals, getTags, getValue, hashCode, isInListCaseInsensitive, newTagValue, parse, setValue, stringToColonSeparatedList, tagSet, toString, trimFWS
-
-
-
-
Constructor Detail
-
SignatureRecordImpl
public SignatureRecordImpl(String data)
-
-
Method Detail
-
forIschedule
public static SignatureRecordImpl forIschedule(String data)
-
validate
public void validate() throws IllegalStateException
- Specified by:
validate
in interfaceSignatureRecord
- Overrides:
validate
in classTagValue
- Throws:
IllegalStateException
- See Also:
SignatureRecord.validate()
-
getHeaders
public List<CharSequence> getHeaders()
Description copied from interface:SignatureRecord
Return list of signed headers - that is the value of the "h" tag.- Specified by:
getHeaders
in interfaceSignatureRecord
- Returns:
- list of headers,
- See Also:
SignatureRecord.getHeaders()
-
getDefault
protected CharSequence getDefault(String tag)
- Overrides:
getDefault
in classTagValue
-
getIdentityLocalPart
public CharSequence getIdentityLocalPart()
- Specified by:
getIdentityLocalPart
in interfaceSignatureRecord
- See Also:
SignatureRecord.getIdentityLocalPart()
-
getIdentity
public CharSequence getIdentity()
This may throws IllegalArgumentException on invalid "i" content, but should always happen during validation!- Specified by:
getIdentity
in interfaceSignatureRecord
- See Also:
SignatureRecord.getIdentity()
-
getHttpVals
public String[] getHttpVals()
This may throws IllegalArgumentException on invalid "http" content, but should always happen during validation!- Returns:
- String[] [http-method, uri]
-
dkimQuotedPrintableDecode
public static String dkimQuotedPrintableDecode(CharSequence input) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
getHashKeyType
public CharSequence getHashKeyType()
- Specified by:
getHashKeyType
in interfaceSignatureRecord
- See Also:
SignatureRecord.getHashKeyType()
-
getHashMethod
public CharSequence getHashMethod()
- Specified by:
getHashMethod
in interfaceSignatureRecord
- See Also:
SignatureRecord.getHashMethod()
-
getHashAlgo
public CharSequence getHashAlgo()
- Specified by:
getHashAlgo
in interfaceSignatureRecord
- See Also:
SignatureRecord.getHashAlgo()
-
getSelector
public CharSequence getSelector()
- Specified by:
getSelector
in interfaceSignatureRecord
- See Also:
SignatureRecord.getSelector()
-
getDToken
public CharSequence getDToken()
- Specified by:
getDToken
in interfaceSignatureRecord
- See Also:
SignatureRecord.getDToken()
-
getBodyHash
public byte[] getBodyHash()
- Specified by:
getBodyHash
in interfaceSignatureRecord
-
getSignature
public byte[] getSignature()
- Specified by:
getSignature
in interfaceSignatureRecord
-
getBodyHashLimit
public int getBodyHashLimit()
- Specified by:
getBodyHashLimit
in interfaceSignatureRecord
-
getSignatureTimestamp
public Long getSignatureTimestamp()
- Specified by:
getSignatureTimestamp
in interfaceSignatureRecord
-
getBodyCanonicalisationMethod
public String getBodyCanonicalisationMethod()
- Specified by:
getBodyCanonicalisationMethod
in interfaceSignatureRecord
-
getHeaderCanonicalisationMethod
public String getHeaderCanonicalisationMethod()
- Specified by:
getHeaderCanonicalisationMethod
in interfaceSignatureRecord
-
getRecordLookupMethods
public List<CharSequence> getRecordLookupMethods()
- Specified by:
getRecordLookupMethods
in interfaceSignatureRecord
-
setSignature
public void setSignature(byte[] newSignature)
- Specified by:
setSignature
in interfaceSignatureRecord
-
setBodyHash
public void setBodyHash(byte[] newBodyHash)
- Specified by:
setBodyHash
in interfaceSignatureRecord
-
toUnsignedString
public String toUnsignedString()
- Specified by:
toUnsignedString
in interfaceSignatureRecord
-
-