Package com.netscape.cmscore.request
Class Request
- java.lang.Object
-
- com.netscape.cmscore.request.Request
-
- All Implemented Interfaces:
IRequest
,java.io.Serializable
public class Request extends java.lang.Object implements IRequest
Request - implementation of the IRequest interface. This version is returned by ARequestQueue (and its derivatives)- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.Logger
logger
protected java.lang.String
mContext
protected ExtDataHashtable<java.lang.Object>
mExtData
protected java.lang.String
mOwner
protected RequestId
mRequestId
protected RequestStatus
mRequestStatus
protected java.lang.String
mRequestType
protected java.lang.String
mSource
protected java.lang.String
mSourceId
protected java.lang.String
realm
-
Fields inherited from interface com.netscape.certsrv.request.IRequest
AGENT_PARAMS, ASYMKEY_GENERATION_REQUEST, ATTR_APPROVE_AGENTS, ATTR_REQUEST_OWNER, ATTR_REQUEST_STATUS, ATTR_REQUEST_TYPE, ATTR_SOURCE_ID, AUTH_TOKEN, AUTH_TOKEN_PREFIX, AUTHORITY_ID, CA_CERT, CACERTCHAIN, CEP_CERT, CERT_FILTER, CERT_INFO, CERT_STATUS, CERT_TYPE, CLA_CERT4CRL_REQUEST, CLA_UNCERT4CRL_REQUEST, CLIENT_CERT, CMC_RECIPIENTNONCE, CMC_REGINFO, CMC_REQIDS, CMC_SENDERNONCE, CMC_TRANSID, CMCREVOKE_REQUEST, CRL, CRL_PUBLISH_ERROR, CRL_PUBLISH_STATUS, CRL_UPDATE_ERROR, CRL_UPDATE_STATUS, CRMF_REQID, CTX_CERT_REQUEST, DOGETCACHAIN, ENROLLMENT_REQUEST, ERROR, ERROR_CODE, ERRORS, FINGERPRINTS, GETCACHAIN_REQUEST, GETCERT_STATUS_REQUEST, GETCERTS_FOR_CHALLENGE_REQUEST, GETCERTS_REQUEST, GETCRL_REQUEST, GETREVOCATIONINFO_REQUEST, HTTP_HEADERS, HTTP_PARAMS, ISSUED_CERTS, ISSUERDN, KEY_ARCHIVAL_REQUEST, KEY_GEN_ALGORITHM, KEY_GEN_SIZE, KEY_GEN_TRANS_WRAPPED_SESSION_KEY, KEY_GEN_USAGES, KEY_RECOVERY_REQUEST, KEYARCHIVAL_REQUEST, KEYRECOVERY_REQUEST, NETKEY_ATTR_ARCHIVE_FLAG, NETKEY_ATTR_CUID, NETKEY_ATTR_DRMTRANS_DES_KEY, NETKEY_ATTR_ENC_PRIVKEY_FLAG, NETKEY_ATTR_KEY_EC_CURVE, NETKEY_ATTR_KEY_SIZE, NETKEY_ATTR_KEY_TYPE, NETKEY_ATTR_KEYID, NETKEY_ATTR_SERVERSIDE_MUSCLE_FLAG, NETKEY_ATTR_USER_CERT, NETKEY_ATTR_USERID, NETKEY_KEYGEN_REQUEST, NETKEY_KEYRECOVERY_REQUEST, OBJECT_SIGNING, OBJECT_SIGNING_CERT, OCSP_CERT, OLD_CERTS, OLD_SERIALS, OTHER_CERT, PKCS10_REQID, PROFILE_ID, RA_CERT, REALM, REMOTE_REQID, REMOTE_SERVICE_AUTHORITY, REMOTE_STATUS, RENEWAL_REQUEST, REQ_FORMAT, REQ_STATUS, REQ_TYPE, REQ_VERSION, REQUEST_ALGORITHM_OID, REQUEST_ALGORITHM_PARAMS, REQUEST_ARCHIVE_OPTIONS, REQUEST_KEY, REQUEST_SECURITY_DATA, REQUEST_SESSION_KEY, REQUEST_SUBJECT_NAME, REQUEST_TRANSPORT_CERT, REQUEST_TRUSTEDMGR_PRIVILEGE, REQUESTOR_AGENT, REQUESTOR_COMMENTS, REQUESTOR_EE, REQUESTOR_EMAIL, REQUESTOR_KRA, REQUESTOR_NAME, REQUESTOR_NETKEY_RA, REQUESTOR_PHONE, REQUESTOR_RA, REQUESTOR_TYPE, RES_ERROR, RES_SUCCESS, RESULT, REVOCATION_CHECK_CHALLENGE_REQUEST, REVOCATION_REQUEST, REVOKED_CERT_RECORDS, REVOKED_CERTS, REVOKED_REASON, ROUTER_CERT, SECURITY_DATA_ALGORITHM, SECURITY_DATA_CLIENT_KEY_ID, SECURITY_DATA_ENROLLMENT_REQUEST, SECURITY_DATA_IV_STRING_IN, SECURITY_DATA_IV_STRING_OUT, SECURITY_DATA_PASS_WRAPPED_DATA, SECURITY_DATA_PL_ENCRYPTION_OID, SECURITY_DATA_PL_WRAPPED, SECURITY_DATA_PL_WRAPPING_NAME, SECURITY_DATA_RECOVERY_REQUEST, SECURITY_DATA_SESS_PASS_PHRASE, SECURITY_DATA_SESS_WRAPPED_DATA, SECURITY_DATA_STATUS, SECURITY_DATA_STRENGTH, SECURITY_DATA_TRANS_SESS_KEY, SECURITY_DATA_TYPE, SERVER_ATTRS, SERVER_CERT, SERVER_SIDE_KEYGEN_ENROLL_ENABLE_ARCHIVAL, SMIME, SSK_STAGE, SSK_STAGE_KEY_RETRIEVE, SSK_STAGE_KEYGEN, SSL_CLIENT, SVCERRORS, SYMKEY_GENERATION_REQUEST, UNREVOCATION_REQUEST, UPDATED_BY, USER_DATA
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IAttrSet
asIAttrSet()
void
copyContents(IRequest req)
this isn't that efficient but will do for now.void
deleteExtData(java.lang.String type)
Removes the value of an extdata attribute.java.lang.String
getContext()
Gets context of this request.java.util.Date
getCreationTime()
Gets the time this request was created.java.lang.String
getError(java.util.Locale locale)
Gets localized error message from connector transfer.java.lang.String
getErrorCode(java.util.Locale locale)
Get error codeIAuthToken
getExtDataInAuthToken(java.lang.String key)
Retrieves an authtoken.java.math.BigInteger
getExtDataInBigInteger(java.lang.String key)
Retrieves a BigInteger value.java.math.BigInteger[]
getExtDataInBigIntegerArray(java.lang.String key)
Retrieves an array of BigIntegersboolean
getExtDataInBoolean(java.lang.String key, boolean defVal)
Gets boolean value for given type or default value if attribute is absent.boolean
getExtDataInBoolean(java.lang.String prefix, java.lang.String type, boolean defVal)
Gets extdata boolean value for given type or default value if attribute is absent for this request with this prefix.byte[]
getExtDataInByteArray(java.lang.String key)
Retrieves the data, which should be base64 encoded as a byte array.org.mozilla.jss.netscape.security.x509.X509CertImpl
getExtDataInCert(java.lang.String key)
Retrieves the data, which should be base64 encoded as a byte array.org.mozilla.jss.netscape.security.x509.X509CertImpl[]
getExtDataInCertArray(java.lang.String key)
Retrieves an array of X509CertImpl.org.mozilla.jss.netscape.security.x509.CertificateExtensions
getExtDataInCertExts(java.lang.String key)
Retrieves the CertificateExtensions associated with the key.org.mozilla.jss.netscape.security.x509.X509CertInfo
getExtDataInCertInfo(java.lang.String key)
Retrieves the data, which should be base64 encoded as a byte array.org.mozilla.jss.netscape.security.x509.X509CertInfo[]
getExtDataInCertInfoArray(java.lang.String key)
Retrieves an array of X509CertInfo.org.mozilla.jss.netscape.security.x509.CertificateSubjectName
getExtDataInCertSubjectName(java.lang.String key)
Retrieves the CertificateSubjectName associated with the key.java.util.Hashtable<java.lang.String,java.lang.String>
getExtDataInHashtable(java.lang.String key)
Returns the Hashtable value for the String key.java.lang.Integer
getExtDataInInteger(java.lang.String key)
Retrieves an integer value.java.lang.Integer[]
getExtDataInIntegerArray(java.lang.String key)
Retrieves an array of Integersorg.mozilla.jss.netscape.security.x509.RevokedCertImpl[]
getExtDataInRevokedCertArray(java.lang.String key)
Retrieves an array of RevokedCertImpl.java.lang.String
getExtDataInString(java.lang.String key)
Returns the String value stored for the String key.java.lang.String
getExtDataInString(java.lang.String key, java.lang.String subkey)
Helper method to retrieve an individual value from a Hashtable value.java.lang.String[]
getExtDataInStringArray(java.lang.String key)
Retrieves an array of Strings stored with the key.java.util.Vector<java.lang.String>
getExtDataInStringVector(java.lang.String key)
Returns a vector of strings for the key.java.util.Enumeration<java.lang.String>
getExtDataKeys()
Returns all the keys stored in ExtDatajava.util.Date
getModificationTime()
Gets the time this request was last modified (defined as updated in the queue) (See ARequestQueue.update)java.lang.String
getRealm()
Get realmRequestId
getRequestId()
Gets the primary identifier for this request.java.lang.String
getRequestOwner()
Gets the current owner of this request.RequestStatus
getRequestStatus()
Gets the current state of this request.java.lang.String
getRequestType()
Gets the type of this request.java.lang.String
getRequestVersion()
Gets the version of this request.java.lang.String
getSourceId()
Gets the "sourceId" for the request.boolean
isSimpleExtDataValue(java.lang.String key)
Checks whether the key is storing a simple String value, or a complex (Vector/hashtable) structure.boolean
isSuccess()
Gets status of connector transfer.protected boolean
isValidExtDataHashtableValue(java.util.Hashtable<java.lang.String,java.lang.String> hash)
protected boolean
isValidExtDataKey(java.lang.String key)
This function used to check that the keys obeyed LDAP attribute name syntax rules.void
setContext(java.lang.String ctx)
Sets context of this request.void
setCreationTime(java.util.Date date)
boolean
setExtData(java.lang.String key, byte[] data)
Stores a byte array as base64 encoded textboolean
setExtData(java.lang.String key, IAuthToken data)
Stores an AuthToken the same as a Hashtable.boolean
setExtData(java.lang.String key, java.lang.Integer value)
Helper method to store an Integer value.boolean
setExtData(java.lang.String key, java.lang.Integer[] data)
Stores an array of Integersboolean
setExtData(java.lang.String key, java.lang.String value)
Sets an Extended Data string-key string-value pair.boolean
setExtData(java.lang.String key, java.lang.String[] values)
Stores an array of Strings in ExtData.boolean
setExtData(java.lang.String key, java.lang.String subkey, java.lang.String value)
Helper method to add subkey/value pair to a ExtData hashtable.boolean
setExtData(java.lang.String key, java.lang.Throwable e)
Helper method to store an exception.boolean
setExtData(java.lang.String key, java.math.BigInteger value)
Helper method to store a BigInteger value.boolean
setExtData(java.lang.String key, java.math.BigInteger[] data)
Stores an array of BigIntegersboolean
setExtData(java.lang.String key, java.util.Hashtable<java.lang.String,java.lang.String> value)
Sets an Extended Data string-key string-value pair.boolean
setExtData(java.lang.String key, java.util.Vector<?> stringVector)
Stores the contents of the String Vector in ExtData.boolean
setExtData(java.lang.String key, org.mozilla.jss.netscape.security.x509.CertificateExtensions data)
Stores a CertificateExtensions in extdata.boolean
setExtData(java.lang.String key, org.mozilla.jss.netscape.security.x509.CertificateSubjectName data)
Stores a CertificateSubjectName in extdata.boolean
setExtData(java.lang.String key, org.mozilla.jss.netscape.security.x509.RevokedCertImpl[] data)
Stores an array of RevokedCertImpls as a base64 encoded text.boolean
setExtData(java.lang.String key, org.mozilla.jss.netscape.security.x509.X509CertImpl data)
Stores a X509CertImpl as base64 encoded text using the getEncode() method.boolean
setExtData(java.lang.String key, org.mozilla.jss.netscape.security.x509.X509CertImpl[] data)
Stores an array of X509CertImpls as a base64 encoded text.boolean
setExtData(java.lang.String key, org.mozilla.jss.netscape.security.x509.X509CertInfo data)
Stores a X509CertInfo as base64 encoded text using the getEncodedInfo() method.boolean
setExtData(java.lang.String key, org.mozilla.jss.netscape.security.x509.X509CertInfo[] data)
Stores an array of X509CertInfos as a base64 encoded text.void
setModificationTime(java.util.Date date)
void
setRealm(java.lang.String realm)
Set the realmvoid
setRequestOwner(java.lang.String id)
Sets the current owner of this request.void
setRequestStatus(RequestStatus s)
Sets status of this request.void
setRequestType(java.lang.String type)
Sets the type or this request.void
setSourceId(java.lang.String id)
Sets the "sourceId" for this request.
-
-
-
Field Detail
-
logger
public static org.slf4j.Logger logger
-
mRequestId
protected RequestId mRequestId
-
mRequestStatus
protected RequestStatus mRequestStatus
-
mSourceId
protected java.lang.String mSourceId
-
mSource
protected java.lang.String mSource
-
mOwner
protected java.lang.String mOwner
-
mRequestType
protected java.lang.String mRequestType
-
mContext
protected java.lang.String mContext
-
realm
protected java.lang.String realm
-
mExtData
protected ExtDataHashtable<java.lang.Object> mExtData
-
-
Constructor Detail
-
Request
public Request(RequestId id)
-
-
Method Detail
-
getRequestId
public RequestId getRequestId()
Description copied from interface:IRequest
Gets the primary identifier for this request.- Specified by:
getRequestId
in interfaceIRequest
- Returns:
- request id
-
getRequestStatus
public RequestStatus getRequestStatus()
Description copied from interface:IRequest
Gets the current state of this request.- Specified by:
getRequestStatus
in interfaceIRequest
- Returns:
- request status
-
setRequestStatus
public void setRequestStatus(RequestStatus s)
Description copied from interface:IRequest
Sets status of this request.- Specified by:
setRequestStatus
in interfaceIRequest
- Parameters:
s
- request status
-
isSuccess
public boolean isSuccess()
Description copied from interface:IRequest
Gets status of connector transfer.
-
getError
public java.lang.String getError(java.util.Locale locale)
Description copied from interface:IRequest
Gets localized error message from connector transfer.
-
getErrorCode
public java.lang.String getErrorCode(java.util.Locale locale)
Description copied from interface:IRequest
Get error code- Specified by:
getErrorCode
in interfaceIRequest
- Parameters:
locale
- request locale- Returns:
- error code
-
getSourceId
public java.lang.String getSourceId()
Description copied from interface:IRequest
Gets the "sourceId" for the request. The sourceId is assigned by the originator of the request (for example, the EE servlet or the RA servlet.The sourceId should be unique so that it can be used to retrieve request later without knowing the locally assigned primary id (RequestID)
- Specified by:
getSourceId
in interfaceIRequest
- Returns:
- the sourceId value (or null if none has been set)
-
setSourceId
public void setSourceId(java.lang.String id)
Description copied from interface:IRequest
Sets the "sourceId" for this request. The request must be updated in the database for this change to take effect. This can be done by calling ARequestQueue.update() or by performing one of the other operations like processRequest or approveRequest.- Specified by:
setSourceId
in interfaceIRequest
- Parameters:
id
- source id for this request
-
getRequestOwner
public java.lang.String getRequestOwner()
Description copied from interface:IRequest
Gets the current owner of this request.- Specified by:
getRequestOwner
in interfaceIRequest
- Returns:
- request owner
-
setRequestOwner
public void setRequestOwner(java.lang.String id)
Description copied from interface:IRequest
Sets the current owner of this request.- Specified by:
setRequestOwner
in interfaceIRequest
- Parameters:
id
- The new owner of this request. If this value is set to null there will be no current owner
-
getRequestType
public java.lang.String getRequestType()
Description copied from interface:IRequest
Gets the type of this request.- Specified by:
getRequestType
in interfaceIRequest
- Returns:
- request type
-
setRequestType
public void setRequestType(java.lang.String type)
Description copied from interface:IRequest
Sets the type or this request.- Specified by:
setRequestType
in interfaceIRequest
- Parameters:
type
- request type
-
getRequestVersion
public java.lang.String getRequestVersion()
Description copied from interface:IRequest
Gets the version of this request.- Specified by:
getRequestVersion
in interfaceIRequest
- Returns:
- request version
-
getCreationTime
public java.util.Date getCreationTime()
Description copied from interface:IRequest
Gets the time this request was created.- Specified by:
getCreationTime
in interfaceIRequest
- Returns:
- request creation time
-
setCreationTime
public void setCreationTime(java.util.Date date)
- Specified by:
setCreationTime
in interfaceIRequest
-
getContext
public java.lang.String getContext()
Description copied from interface:IRequest
Gets context of this request.- Specified by:
getContext
in interfaceIRequest
- Returns:
- request context
-
setContext
public void setContext(java.lang.String ctx)
Description copied from interface:IRequest
Sets context of this request.- Specified by:
setContext
in interfaceIRequest
- Parameters:
ctx
- request context
-
getModificationTime
public java.util.Date getModificationTime()
Description copied from interface:IRequest
Gets the time this request was last modified (defined as updated in the queue) (See ARequestQueue.update)- Specified by:
getModificationTime
in interfaceIRequest
- Returns:
- request last modification time
-
setModificationTime
public void setModificationTime(java.util.Date date)
- Specified by:
setModificationTime
in interfaceIRequest
-
copyContents
public void copyContents(IRequest req)
this isn't that efficient but will do for now.- Specified by:
copyContents
in interfaceIRequest
- Parameters:
req
- another request
-
isValidExtDataKey
protected boolean isValidExtDataKey(java.lang.String key)
This function used to check that the keys obeyed LDAP attribute name syntax rules. Keys are being encoded now, so it is changed to just filter out null and empty string keys.- Parameters:
key
- The key to check- Returns:
- false if invalid
-
isValidExtDataHashtableValue
protected boolean isValidExtDataHashtableValue(java.util.Hashtable<java.lang.String,java.lang.String> hash)
-
setExtData
public boolean setExtData(java.lang.String key, java.lang.String value)
Description copied from interface:IRequest
Sets an Extended Data string-key string-value pair. All keys are lower cased because LDAP does not preserve case.- Specified by:
setExtData
in interfaceIRequest
- Parameters:
key
- The extended data keyvalue
- The extended data value- Returns:
- false if key is invalid.
-
setExtData
public boolean setExtData(java.lang.String key, java.util.Hashtable<java.lang.String,java.lang.String> value)
Description copied from interface:IRequest
Sets an Extended Data string-key string-value pair. The key and hashtable keys are all lowercased because LDAP does not preserve case.- Specified by:
setExtData
in interfaceIRequest
- Parameters:
key
- The extended data keyvalue
- The extended data value the Hashtable contains an illegal key.- Returns:
- false if the key or hashtable keys are invalid
-
isSimpleExtDataValue
public boolean isSimpleExtDataValue(java.lang.String key)
Description copied from interface:IRequest
Checks whether the key is storing a simple String value, or a complex (Vector/hashtable) structure.- Specified by:
isSimpleExtDataValue
in interfaceIRequest
- Parameters:
key
- The key to check for.- Returns:
- True if the key maps to a string. False if it maps to a hashtable.
-
getExtDataInString
public java.lang.String getExtDataInString(java.lang.String key)
Description copied from interface:IRequest
Returns the String value stored for the String key. Returns null if not found. Throws exception if key stores a complex data structure (Vector/Hashtable).- Specified by:
getExtDataInString
in interfaceIRequest
- Parameters:
key
- The key to lookup (case-insensitive)- Returns:
- The value associated with the key. null if not found or if the key is associated with a non-string value.
-
getExtDataInHashtable
public java.util.Hashtable<java.lang.String,java.lang.String> getExtDataInHashtable(java.lang.String key)
Description copied from interface:IRequest
Returns the Hashtable value for the String key. Returns null if not found. Throws exception if the key stores a String value. The Hashtable returned is actually a subclass of Hashtable that lowercases all keys used to access the hashtable. Its purpose is to to make lookups seemless, but be aware it is not a normal hashtable and might behave strangely in some cases (e.g., iterating keys)- Specified by:
getExtDataInHashtable
in interfaceIRequest
- Parameters:
key
- The key to lookup (case-insensitive)- Returns:
- The hashtable value associated with the key. null if not found or if the key is associated with a string-value.
-
getExtDataKeys
public java.util.Enumeration<java.lang.String> getExtDataKeys()
Description copied from interface:IRequest
Returns all the keys stored in ExtData- Specified by:
getExtDataKeys
in interfaceIRequest
- Returns:
- Enumeration of all the keys.
-
deleteExtData
public void deleteExtData(java.lang.String type)
Description copied from interface:IRequest
Removes the value of an extdata attribute.- Specified by:
deleteExtData
in interfaceIRequest
- Parameters:
type
- key to delete
-
setExtData
public boolean setExtData(java.lang.String key, java.lang.String subkey, java.lang.String value)
Description copied from interface:IRequest
Helper method to add subkey/value pair to a ExtData hashtable. If the hashtable it exists, the subkey/value are added to it. Otherwise a new hashtable is created. The key and subkey are lowercased because LDAP does not preserve case.- Specified by:
setExtData
in interfaceIRequest
- Parameters:
key
- The top level keysubkey
- The hashtable data keyvalue
- The hashtable value- Returns:
- False if the key or subkey are invalid
-
getExtDataInString
public java.lang.String getExtDataInString(java.lang.String key, java.lang.String subkey)
Description copied from interface:IRequest
Helper method to retrieve an individual value from a Hashtable value.- Specified by:
getExtDataInString
in interfaceIRequest
- Parameters:
key
- the ExtData keysubkey
- the key in the Hashtable value (case insensitive)- Returns:
- the value corresponding to the key/subkey
-
setExtData
public boolean setExtData(java.lang.String key, java.lang.Integer value)
Description copied from interface:IRequest
Helper method to store an Integer value. It converts the integer value to a String and stores it.- Specified by:
setExtData
in interfaceIRequest
- Parameters:
key
- the ExtData keyvalue
- the Integer to store (as a String)- Returns:
- False if the key or value are invalid
-
getExtDataInInteger
public java.lang.Integer getExtDataInInteger(java.lang.String key)
Description copied from interface:IRequest
Retrieves an integer value. Returns null if not found or the value can't be represented as an Integer.- Specified by:
getExtDataInInteger
in interfaceIRequest
- Parameters:
key
- The ExtData key to lookup- Returns:
- The integer value or null if not possible.
-
setExtData
public boolean setExtData(java.lang.String key, java.lang.Integer[] data)
Description copied from interface:IRequest
Stores an array of Integers- Specified by:
setExtData
in interfaceIRequest
- Parameters:
key
- The extdata keydata
- The array of Integers to store- Returns:
- false if the key is invalid
-
getExtDataInIntegerArray
public java.lang.Integer[] getExtDataInIntegerArray(java.lang.String key)
Description copied from interface:IRequest
Retrieves an array of Integers- Specified by:
getExtDataInIntegerArray
in interfaceIRequest
- Parameters:
key
- The extdata key- Returns:
- The array of Integers or null on error.
-
setExtData
public boolean setExtData(java.lang.String key, java.math.BigInteger value)
Description copied from interface:IRequest
Helper method to store a BigInteger value. It converts the integer value to a String and stores it.- Specified by:
setExtData
in interfaceIRequest
- Parameters:
key
- the ExtData keyvalue
- the BigInteger to store (as a String)- Returns:
- False if the key or value are invalid
-
getExtDataInBigInteger
public java.math.BigInteger getExtDataInBigInteger(java.lang.String key)
Description copied from interface:IRequest
Retrieves a BigInteger value. Returns null if not found or the value can't be represented as a BigInteger.- Specified by:
getExtDataInBigInteger
in interfaceIRequest
- Parameters:
key
- The ExtData key to lookup- Returns:
- The integer value or null if not possible.
-
setExtData
public boolean setExtData(java.lang.String key, java.math.BigInteger[] data)
Description copied from interface:IRequest
Stores an array of BigIntegers- Specified by:
setExtData
in interfaceIRequest
- Parameters:
key
- The extdata keydata
- The array of BigIntegers to store- Returns:
- false if the key is invalid
-
getExtDataInBigIntegerArray
public java.math.BigInteger[] getExtDataInBigIntegerArray(java.lang.String key)
Description copied from interface:IRequest
Retrieves an array of BigIntegers- Specified by:
getExtDataInBigIntegerArray
in interfaceIRequest
- Parameters:
key
- The extdata key- Returns:
- The array of BigIntegers or null on error.
-
setExtData
public boolean setExtData(java.lang.String key, java.lang.Throwable e)
Description copied from interface:IRequest
Helper method to store an exception. It actually stores the e.toString() value.- Specified by:
setExtData
in interfaceIRequest
- Parameters:
key
- The ExtData key to store undere
- The throwable to store- Returns:
- False if the key is invalid.
-
setExtData
public boolean setExtData(java.lang.String key, byte[] data)
Description copied from interface:IRequest
Stores a byte array as base64 encoded text- Specified by:
setExtData
in interfaceIRequest
- Parameters:
key
- The ExtData keydata
- The byte array to store- Returns:
- False if the key is invalid.
-
getExtDataInByteArray
public byte[] getExtDataInByteArray(java.lang.String key)
Description copied from interface:IRequest
Retrieves the data, which should be base64 encoded as a byte array.- Specified by:
getExtDataInByteArray
in interfaceIRequest
- Parameters:
key
- The ExtData key- Returns:
- The data, or null if an error occurs.
-
setExtData
public boolean setExtData(java.lang.String key, org.mozilla.jss.netscape.security.x509.X509CertImpl data)
Description copied from interface:IRequest
Stores a X509CertImpl as base64 encoded text using the getEncode() method.- Specified by:
setExtData
in interfaceIRequest
- Parameters:
key
- The ExtData keydata
- certificate- Returns:
- False if the key is invalid.
-
getExtDataInCert
public org.mozilla.jss.netscape.security.x509.X509CertImpl getExtDataInCert(java.lang.String key)
Description copied from interface:IRequest
Retrieves the data, which should be base64 encoded as a byte array.- Specified by:
getExtDataInCert
in interfaceIRequest
- Parameters:
key
- The ExtData key- Returns:
- The data, or null if an error occurs.
-
setExtData
public boolean setExtData(java.lang.String key, org.mozilla.jss.netscape.security.x509.X509CertImpl[] data)
Description copied from interface:IRequest
Stores an array of X509CertImpls as a base64 encoded text.- Specified by:
setExtData
in interfaceIRequest
- Parameters:
key
- The ExtData keydata
- The array of certs to store- Returns:
- False if the key or data is invalid.
-
getExtDataInCertArray
public org.mozilla.jss.netscape.security.x509.X509CertImpl[] getExtDataInCertArray(java.lang.String key)
Description copied from interface:IRequest
Retrieves an array of X509CertImpl.- Specified by:
getExtDataInCertArray
in interfaceIRequest
- Parameters:
key
- The ExtData key- Returns:
- Array of certs, or null if not found or invalid data.
-
setExtData
public boolean setExtData(java.lang.String key, org.mozilla.jss.netscape.security.x509.X509CertInfo data)
Description copied from interface:IRequest
Stores a X509CertInfo as base64 encoded text using the getEncodedInfo() method.- Specified by:
setExtData
in interfaceIRequest
- Parameters:
key
- The ExtData keydata
- certificate- Returns:
- False if the key is invalid.
-
getExtDataInCertInfo
public org.mozilla.jss.netscape.security.x509.X509CertInfo getExtDataInCertInfo(java.lang.String key)
Description copied from interface:IRequest
Retrieves the data, which should be base64 encoded as a byte array.- Specified by:
getExtDataInCertInfo
in interfaceIRequest
- Parameters:
key
- The ExtData key- Returns:
- The data, or null if an error occurs.
-
setExtData
public boolean setExtData(java.lang.String key, org.mozilla.jss.netscape.security.x509.X509CertInfo[] data)
Description copied from interface:IRequest
Stores an array of X509CertInfos as a base64 encoded text.- Specified by:
setExtData
in interfaceIRequest
- Parameters:
key
- The ExtData keydata
- The array of cert infos to store- Returns:
- False if the key or data is invalid.
-
getExtDataInCertInfoArray
public org.mozilla.jss.netscape.security.x509.X509CertInfo[] getExtDataInCertInfoArray(java.lang.String key)
Description copied from interface:IRequest
Retrieves an array of X509CertInfo.- Specified by:
getExtDataInCertInfoArray
in interfaceIRequest
- Parameters:
key
- The ExtData key- Returns:
- Array of cert infos, or null if not found or invalid data.
-
setExtData
public boolean setExtData(java.lang.String key, org.mozilla.jss.netscape.security.x509.RevokedCertImpl[] data)
Description copied from interface:IRequest
Stores an array of RevokedCertImpls as a base64 encoded text.- Specified by:
setExtData
in interfaceIRequest
- Parameters:
key
- The ExtData keydata
- The array of cert infos to store- Returns:
- False if the key or data is invalid.
-
getExtDataInRevokedCertArray
public org.mozilla.jss.netscape.security.x509.RevokedCertImpl[] getExtDataInRevokedCertArray(java.lang.String key)
Description copied from interface:IRequest
Retrieves an array of RevokedCertImpl.- Specified by:
getExtDataInRevokedCertArray
in interfaceIRequest
- Parameters:
key
- The ExtData key- Returns:
- Array of cert infos, or null if not found or invalid data.
-
setExtData
public boolean setExtData(java.lang.String key, java.util.Vector<?> stringVector)
Description copied from interface:IRequest
Stores the contents of the String Vector in ExtData. TODO - as soon as we're allowed to use JDK5 this should be changed to use Vectordata. Note that modifications to the Vector are not automatically reflected after it is stored. You must call set() again to make the changes. - Specified by:
setExtData
in interfaceIRequest
- Parameters:
key
- The extdata key to storestringVector
- A vector of Strings to store- Returns:
- False on key error or invalid data.
-
getExtDataInStringVector
public java.util.Vector<java.lang.String> getExtDataInStringVector(java.lang.String key)
Description copied from interface:IRequest
Returns a vector of strings for the key. Note that the returned vector, if modified, does not make changes in ExtData. You must call setExtData() to propogate changes back into ExtData.- Specified by:
getExtDataInStringVector
in interfaceIRequest
- Parameters:
key
- The extdata key- Returns:
- A Vector of strings, or null on error.
-
getExtDataInBoolean
public boolean getExtDataInBoolean(java.lang.String key, boolean defVal)
Description copied from interface:IRequest
Gets boolean value for given type or default value if attribute is absent.- Specified by:
getExtDataInBoolean
in interfaceIRequest
- Parameters:
key
- attribute typedefVal
- default attribute value- Returns:
- attribute value
-
getExtDataInBoolean
public boolean getExtDataInBoolean(java.lang.String prefix, java.lang.String type, boolean defVal)
Description copied from interface:IRequest
Gets extdata boolean value for given type or default value if attribute is absent for this request with this prefix.- Specified by:
getExtDataInBoolean
in interfaceIRequest
- Parameters:
prefix
- request prefixtype
- attribute typedefVal
- default attribute value- Returns:
- attribute value
-
setExtData
public boolean setExtData(java.lang.String key, IAuthToken data)
Description copied from interface:IRequest
Stores an AuthToken the same as a Hashtable.- Specified by:
setExtData
in interfaceIRequest
- Parameters:
key
- The ExtData keydata
- The authtoken to store- Returns:
- False if the key or data is invalid.
-
getExtDataInAuthToken
public IAuthToken getExtDataInAuthToken(java.lang.String key)
Description copied from interface:IRequest
Retrieves an authtoken.- Specified by:
getExtDataInAuthToken
in interfaceIRequest
- Parameters:
key
- The ExtData key- Returns:
- AuthToken, or null if not found or invalid data.
-
setExtData
public boolean setExtData(java.lang.String key, org.mozilla.jss.netscape.security.x509.CertificateExtensions data)
Description copied from interface:IRequest
Stores a CertificateExtensions in extdata.- Specified by:
setExtData
in interfaceIRequest
- Parameters:
key
- The ExtData keydata
- The CertificateExtensions to store- Returns:
- False if the key or data is invalid.
-
getExtDataInCertExts
public org.mozilla.jss.netscape.security.x509.CertificateExtensions getExtDataInCertExts(java.lang.String key)
Description copied from interface:IRequest
Retrieves the CertificateExtensions associated with the key.- Specified by:
getExtDataInCertExts
in interfaceIRequest
- Parameters:
key
- The ExtData key- Returns:
- the object, or null if not found or invalid data.
-
setExtData
public boolean setExtData(java.lang.String key, org.mozilla.jss.netscape.security.x509.CertificateSubjectName data)
Description copied from interface:IRequest
Stores a CertificateSubjectName in extdata.- Specified by:
setExtData
in interfaceIRequest
- Parameters:
key
- The ExtData keydata
- The CertificateSubjectName to store- Returns:
- False if the key or data is invalid.
-
getExtDataInCertSubjectName
public org.mozilla.jss.netscape.security.x509.CertificateSubjectName getExtDataInCertSubjectName(java.lang.String key)
Description copied from interface:IRequest
Retrieves the CertificateSubjectName associated with the key.- Specified by:
getExtDataInCertSubjectName
in interfaceIRequest
- Parameters:
key
- The ExtData key- Returns:
- the object, or null if not found or invalid data.
-
setExtData
public boolean setExtData(java.lang.String key, java.lang.String[] values)
Description copied from interface:IRequest
Stores an array of Strings in ExtData. The indices of the array are used as subkeys.- Specified by:
setExtData
in interfaceIRequest
- Parameters:
key
- the ExtData keyvalues
- the array of string values to store- Returns:
- False if the key is invalid
-
getExtDataInStringArray
public java.lang.String[] getExtDataInStringArray(java.lang.String key)
Description copied from interface:IRequest
Retrieves an array of Strings stored with the key. This only works if the data was stored as an array. If the data is not correct, this method will return null.- Specified by:
getExtDataInStringArray
in interfaceIRequest
- Parameters:
key
- The ExtData key- Returns:
- The value. Null if not found or the data isn't an array.
-
asIAttrSet
public IAttrSet asIAttrSet()
- Specified by:
asIAttrSet
in interfaceIRequest
- Returns:
- IAttrSet wrapper with basic "get" functionality.
-
getRealm
public java.lang.String getRealm()
Description copied from interface:IRequest
Get realm
-
-