|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--iaik.x509.extensions.qualified.structures.QCStatementInfo | +--iaik.x509.extensions.qualified.structures.etsi.QcEuLimitValue
This class implements the ETSI QcEuLimitValue
QCStatementInfo.
The QcEuLimitValue statement info is associated with a specific statement identifier, derived from:
id-etsi-qcs OBJECT IDENTIFIER ::= { itu-t(0) identified-organization(4) etsi(0) id-qc-profile(1862) 1 } id-etsi-qcs-QcLimitValue OBJECT IDENTIFIER ::= { id-etsi-qcs 2 }
which corresponds to the OID string "0.4.0.1862.1.2".
The ETSI Qualified Certificate Profile (TS 101 862 V1.2.1) specifies the QcEuLimitValue statement info for indicating the limits on the value of transactions for which the qualified certificate can be used.
ASN.1 definition:
QcEuLimitValue ::= MonetaryValue MonetaryValue::= SEQUENCE { currency Iso4217CurrencyCode, amount INTEGER, exponent INTEGER} -- value = amount * 10^exponent Iso4217CurrencyCode ::= CHOICE { alphabetic PrintableString (SIZE 3), -- Recommended numeric INTEGER (1..999) } -- Alphabetic or numeric currency code as defined in ISO 4217 -- It is recommended that the Alphabetic form is used
Supply currency, amount and exponent when creating
a QcEuLimitValue
object. Subsequently create a QCStatement
object for the QcEuLimitValue and add the QCStatement to
a QCStatements
certificate extension. To, for instance, limit transactions to 10000 EURO,
set amount to 1 and exponent to 4.:
String currency = "EUR"; int amount = 1; int exponent = 4; // create the QcEuLimitValue: QcEuLimitValue limit = new QcEuLimitValue(currency, amount, exponent); // create a QCStatement for the QcEuLimitValue QCStatement[] qcStatements = ...; qcStatements[0] = new QCStatement(limit); // add any further QCStatements ... // create a QCStatements extension from the QCStatements: QCStatements qcStatementsExt = new QCStatements(qcStatements);For adding a
QCStatements
extension object to a QualifiedCertificate, use
the addExtension
or setQCStatements
method of the QualifiedCertificate
class:
QualifiedCertificate cert = new QualifiedCertificate(); ... cert.setQCStatements(qcStatementsExt);
QCStatementInfo
,
QCStatement
,
QCStatements
Field Summary | |
static ObjectID |
statementID
The statement id for this QcEuLimitValue statement info. |
Constructor Summary | |
QcEuLimitValue()
Default constructor. |
|
QcEuLimitValue(int iso4217CurrencyCode,
int amount,
int exponent)
Creates QcEuLimitValue statement for given currency code, amount and exponent |
|
QcEuLimitValue(String iso4217CurrencyCode,
int amount,
int exponent)
Creates QcEuLimitValue statement for given currency code, amount and exponent |
Method Summary | |
void |
decode(ASN1Object obj)
Decodes the QcEuLimitValue. |
int |
getAmount()
Gets the amount. |
Object |
getCurrency()
Gets the currency. |
int |
getExponent()
Gets the exponent. |
ObjectID |
getStatementID()
Returns the statement ID identifying this QcEuLimitValue
statement info.
|
BigInteger |
getValue()
Gets the value. |
ASN1Object |
toASN1Object()
Returns an ASN.1 representation of this QcEuLimitValue. |
String |
toString()
Returns a string representation of the statement info |
Methods inherited from class iaik.x509.extensions.qualified.structures.QCStatementInfo |
getName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final ObjectID statementID
Constructor Detail |
public QcEuLimitValue()
public QcEuLimitValue(int iso4217CurrencyCode, int amount, int exponent) throws IllegalArgumentException
iso4217CurrencyCode
- the currency code as integer between 1..999amount
- the amount from which to calculate the value of (amount * 10^exponent)exponent
- the exponent from which to calculate the value of (amount * 10^exponent)IllegalArgumentException
- if the currency is not between 1..999public QcEuLimitValue(String iso4217CurrencyCode, int amount, int exponent) throws IllegalArgumentException
iso4217CurrencyCode
- the currency code as String of 3 charactersamount
- the amount from which to calculate the value of (amount * 10^exponent)exponent
- the exponent from which to calculate the value of (amount * 10^exponent)IllegalArgumentException
- if the currency code is null or of length different from 3Method Detail |
public ObjectID getStatementID()
QcEuLimitValue
statement info.
The corresponding OID string is "0.4.0.1862.1.2".getStatementID
in class QCStatementInfo
QcEuLimitValue
statement infopublic Object getCurrency()
public int getAmount()
public int getExponent()
public BigInteger getValue()
public void decode(ASN1Object obj) throws CodingException
decode
in class QCStatementInfo
the
- QcEuLimitValue as ASN1Objectpublic ASN1Object toASN1Object()
toASN1Object
in class QCStatementInfo
public String toString()
toString
in class QCStatementInfo
|
This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |