|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object iaik.smime.ess.MLReceiptPolicy
public class MLReceiptPolicy
This class implements the S/MIMEv3 MLReceiptPolicy
type.
The Enhanced Security Services
for S/MIMEv3 (ESS) (RFC 2634) specifies the MLReceiptPolicy
type for allowing a mailing list (ML) to supersede the originator request for
signed receipts:
MLReceiptPolicy ::= CHOICE { none [0] NULL, insteadOf [1] SEQUENCE SIZE (1..MAX) OF GeneralNames, inAdditionTo [2] SEQUENCE SIZE (1..MAX) OF GeneralNames }If present in a
MLData
of a
MLExpansionHistory
attribute, the
MLReceiptPolicy may indicate to return none
receipt, or to
return receipts to an alternate list of recipients instead
of the originator, or to return receipts to an list of recipients
in addition
to to the originator.
When creating
a MLReceiptPolicy object you have to specify
the policy value (NONE
, INSTEAD_OF
, or IN_ADDITION_TO
). If required a recipient list may be set by calling a proper setRecipientList
method, e.g.:
// a list of recipients to which receipts should be returned in addition to the originator: GeneralNames[] recipientList = ...; // create a MLReceiptPolicy of appropriate value: MLReceiptPolicy mlReceiptPolicy = new MLReceiptPolicy(MLReceiptPolicy.IN_ADDITION_TO); mlReceiptPolicy.setRecipientList(recipientList);
MLData
,
MLExpansionHistory
Field Summary | |
---|---|
static int |
IN_ADDITION_TO
Receipt policy value IN_ADDITION_TO (2). |
static int |
INSTEAD_OF
Receipt policy value INSTEAD_OF (1). |
static int |
NONE
Receipt policy value NONE (0). |
Constructor Summary | |
---|---|
MLReceiptPolicy(ASN1Object obj)
Creates a MLReceiptPolicy from its ASN.1 representation. |
|
MLReceiptPolicy(int value)
Creates a MLReceiptPolicy for given policy value and recipientList, if required. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns a clone of this object. |
boolean |
equals(java.lang.Object obj)
Compares this MLReceiptPolicy to the specified object. |
GeneralNames[] |
getRecipientList()
Returns the list of recipients to which a receipt should be returned instead of or in addition to the originator. |
int |
getValue()
Returns the value of this MLReceiptPolicy. |
int |
hashCode()
Returns a hashcode for this object. |
void |
setRecipientList(GeneralNames[] recipientList)
Sets the recipient list of this MLReceiptPolicy. |
void |
setRecipientList(java.lang.String[] recipients)
Sets the recipient address list of this MLReceiptPolicy. |
ASN1Object |
toASN1Object()
Returns this MLReceiptPolicy as ASN1Object. |
java.lang.String |
toString()
Returns a string representation of this MLReceiptPolicy. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int NONE
public static final int INSTEAD_OF
public static final int IN_ADDITION_TO
Constructor Detail |
---|
public MLReceiptPolicy(int value)
The policy value either may indicate to return NONE (value = 0) receipt, or to return receipts to an alternate list of recipients instead of the originator (value = 1), or to return receipts to an list of recipients in addition to (value = 2) to the originator. A recipientList only has to be supplied for policy value 1 (INSTEAD_OF) or 2 (IN_ADDITION_TO), e.g.:
// a list of recipients to which receipts should be returned in addition to the originator: GeneralNames recipientList = ...; // create a MLReceiptPolicy of appropriate value: MLReceiptPolicy mlReceiptPolicy = new MLReceiptPolicy(MLReceiptPolicy.IN_ADDITION_TO); mlReceiptPolicy.setRecipientList(recipientList);
value
- the policy value, either 0 (NONE)
1 (INSTEAD_OF)
2 (IN _ADDITION_TO)
java.lang.IllegalArgumentException
- if the value is invalid (not 0, 1 or 2)public MLReceiptPolicy(ASN1Object obj) throws CodingException
obj
- the MLReceiptPolicy as ASN1Object
CodingException
- if the ASN.1 structure is invalidMethod Detail |
---|
public void setRecipientList(GeneralNames[] recipientList)
recipientList
- the list of recipients to which receipts should be returned
instead of (value = 1) or in addition to (value = 2) to the
originator;
java.lang.IllegalArgumentException
- if no recipient list is required since this
MLRecipeiptPolicy does not require any receipt
to be sent (value = NONE)public void setRecipientList(java.lang.String[] recipients)
recipients
- the list of recipient addresses to which receipts should be returned
instead of (value = 1) or in addition to (value = 2) to the
originator;
java.lang.IllegalArgumentException
- if no recipient list is required since this
MLRecipeiptPolicy does not require any receipt
to be sent (value = NONE)public int getValue()
The policy value either may indicate to return NONE (value = 0) receipt, or to return receipts to an alternate list of recipients (value = 1), or to return receipts to an list of recipients in addition to (value = 2) the originator.
public GeneralNames[] getRecipientList()
This method only may be used if the policy value
is
1 (INSTEAD_OF
) or 2 (IN_ADDITION_TO
)
for getting the recipients to which a receipt should be returned instead of
or in addition to the originator.
public boolean equals(java.lang.Object obj)
MLReceiptPolicy
to the specified object.
equals
in class java.lang.Object
obj
- the object to compare this MLReceiptPolicy
against.
true
, if the given object is equal to this
MLReceiptPolicy
,
false
otherwisepublic int hashCode()
hashCode
in class java.lang.Object
public ASN1Object toASN1Object() throws CodingException
CodingException
- if an error occurs when creating the ASN1Objectpublic java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |