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.Loggerloggerprotected java.lang.StringmContextprotected ExtDataHashtable<java.lang.Object>mExtDataprotected java.lang.StringmOwnerprotected RequestIdmRequestIdprotected RequestStatusmRequestStatusprotected java.lang.StringmRequestTypeprotected java.lang.StringmSourceprotected java.lang.StringmSourceIdprotected java.lang.Stringrealm-
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 IAttrSetasIAttrSet()voidcopyContents(IRequest req)this isn't that efficient but will do for now.voiddeleteExtData(java.lang.String type)Removes the value of an extdata attribute.java.lang.StringgetContext()Gets context of this request.java.util.DategetCreationTime()Gets the time this request was created.java.lang.StringgetError(java.util.Locale locale)Gets localized error message from connector transfer.java.lang.StringgetErrorCode(java.util.Locale locale)Get error codeIAuthTokengetExtDataInAuthToken(java.lang.String key)Retrieves an authtoken.java.math.BigIntegergetExtDataInBigInteger(java.lang.String key)Retrieves a BigInteger value.java.math.BigInteger[]getExtDataInBigIntegerArray(java.lang.String key)Retrieves an array of BigIntegersbooleangetExtDataInBoolean(java.lang.String key, boolean defVal)Gets boolean value for given type or default value if attribute is absent.booleangetExtDataInBoolean(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.X509CertImplgetExtDataInCert(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.CertificateExtensionsgetExtDataInCertExts(java.lang.String key)Retrieves the CertificateExtensions associated with the key.org.mozilla.jss.netscape.security.x509.X509CertInfogetExtDataInCertInfo(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.CertificateSubjectNamegetExtDataInCertSubjectName(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.IntegergetExtDataInInteger(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.StringgetExtDataInString(java.lang.String key)Returns the String value stored for the String key.java.lang.StringgetExtDataInString(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.DategetModificationTime()Gets the time this request was last modified (defined as updated in the queue) (See ARequestQueue.update)java.lang.StringgetRealm()Get realmRequestIdgetRequestId()Gets the primary identifier for this request.java.lang.StringgetRequestOwner()Gets the current owner of this request.RequestStatusgetRequestStatus()Gets the current state of this request.java.lang.StringgetRequestType()Gets the type of this request.java.lang.StringgetRequestVersion()Gets the version of this request.java.lang.StringgetSourceId()Gets the "sourceId" for the request.booleanisSimpleExtDataValue(java.lang.String key)Checks whether the key is storing a simple String value, or a complex (Vector/hashtable) structure.booleanisSuccess()Gets status of connector transfer.protected booleanisValidExtDataHashtableValue(java.util.Hashtable<java.lang.String,java.lang.String> hash)protected booleanisValidExtDataKey(java.lang.String key)This function used to check that the keys obeyed LDAP attribute name syntax rules.voidsetContext(java.lang.String ctx)Sets context of this request.voidsetCreationTime(java.util.Date date)booleansetExtData(java.lang.String key, byte[] data)Stores a byte array as base64 encoded textbooleansetExtData(java.lang.String key, IAuthToken data)Stores an AuthToken the same as a Hashtable.booleansetExtData(java.lang.String key, java.lang.Integer value)Helper method to store an Integer value.booleansetExtData(java.lang.String key, java.lang.Integer[] data)Stores an array of IntegersbooleansetExtData(java.lang.String key, java.lang.String value)Sets an Extended Data string-key string-value pair.booleansetExtData(java.lang.String key, java.lang.String[] values)Stores an array of Strings in ExtData.booleansetExtData(java.lang.String key, java.lang.String subkey, java.lang.String value)Helper method to add subkey/value pair to a ExtData hashtable.booleansetExtData(java.lang.String key, java.lang.Throwable e)Helper method to store an exception.booleansetExtData(java.lang.String key, java.math.BigInteger value)Helper method to store a BigInteger value.booleansetExtData(java.lang.String key, java.math.BigInteger[] data)Stores an array of BigIntegersbooleansetExtData(java.lang.String key, java.util.Hashtable<java.lang.String,java.lang.String> value)Sets an Extended Data string-key string-value pair.booleansetExtData(java.lang.String key, java.util.Vector<?> stringVector)Stores the contents of the String Vector in ExtData.booleansetExtData(java.lang.String key, org.mozilla.jss.netscape.security.x509.CertificateExtensions data)Stores a CertificateExtensions in extdata.booleansetExtData(java.lang.String key, org.mozilla.jss.netscape.security.x509.CertificateSubjectName data)Stores a CertificateSubjectName in extdata.booleansetExtData(java.lang.String key, org.mozilla.jss.netscape.security.x509.RevokedCertImpl[] data)Stores an array of RevokedCertImpls as a base64 encoded text.booleansetExtData(java.lang.String key, org.mozilla.jss.netscape.security.x509.X509CertImpl data)Stores a X509CertImpl as base64 encoded text using the getEncode() method.booleansetExtData(java.lang.String key, org.mozilla.jss.netscape.security.x509.X509CertImpl[] data)Stores an array of X509CertImpls as a base64 encoded text.booleansetExtData(java.lang.String key, org.mozilla.jss.netscape.security.x509.X509CertInfo data)Stores a X509CertInfo as base64 encoded text using the getEncodedInfo() method.booleansetExtData(java.lang.String key, org.mozilla.jss.netscape.security.x509.X509CertInfo[] data)Stores an array of X509CertInfos as a base64 encoded text.voidsetModificationTime(java.util.Date date)voidsetRealm(java.lang.String realm)Set the realmvoidsetRequestOwner(java.lang.String id)Sets the current owner of this request.voidsetRequestStatus(RequestStatus s)Sets status of this request.voidsetRequestType(java.lang.String type)Sets the type or this request.voidsetSourceId(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:IRequestGets the primary identifier for this request.- Specified by:
getRequestIdin interfaceIRequest- Returns:
- request id
-
getRequestStatus
public RequestStatus getRequestStatus()
Description copied from interface:IRequestGets the current state of this request.- Specified by:
getRequestStatusin interfaceIRequest- Returns:
- request status
-
setRequestStatus
public void setRequestStatus(RequestStatus s)
Description copied from interface:IRequestSets status of this request.- Specified by:
setRequestStatusin interfaceIRequest- Parameters:
s- request status
-
isSuccess
public boolean isSuccess()
Description copied from interface:IRequestGets status of connector transfer.
-
getError
public java.lang.String getError(java.util.Locale locale)
Description copied from interface:IRequestGets localized error message from connector transfer.
-
getErrorCode
public java.lang.String getErrorCode(java.util.Locale locale)
Description copied from interface:IRequestGet error code- Specified by:
getErrorCodein interfaceIRequest- Parameters:
locale- request locale- Returns:
- error code
-
getSourceId
public java.lang.String getSourceId()
Description copied from interface:IRequestGets 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:
getSourceIdin interfaceIRequest- Returns:
- the sourceId value (or null if none has been set)
-
setSourceId
public void setSourceId(java.lang.String id)
Description copied from interface:IRequestSets 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:
setSourceIdin interfaceIRequest- Parameters:
id- source id for this request
-
getRequestOwner
public java.lang.String getRequestOwner()
Description copied from interface:IRequestGets the current owner of this request.- Specified by:
getRequestOwnerin interfaceIRequest- Returns:
- request owner
-
setRequestOwner
public void setRequestOwner(java.lang.String id)
Description copied from interface:IRequestSets the current owner of this request.- Specified by:
setRequestOwnerin 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:IRequestGets the type of this request.- Specified by:
getRequestTypein interfaceIRequest- Returns:
- request type
-
setRequestType
public void setRequestType(java.lang.String type)
Description copied from interface:IRequestSets the type or this request.- Specified by:
setRequestTypein interfaceIRequest- Parameters:
type- request type
-
getRequestVersion
public java.lang.String getRequestVersion()
Description copied from interface:IRequestGets the version of this request.- Specified by:
getRequestVersionin interfaceIRequest- Returns:
- request version
-
getCreationTime
public java.util.Date getCreationTime()
Description copied from interface:IRequestGets the time this request was created.- Specified by:
getCreationTimein interfaceIRequest- Returns:
- request creation time
-
setCreationTime
public void setCreationTime(java.util.Date date)
- Specified by:
setCreationTimein interfaceIRequest
-
getContext
public java.lang.String getContext()
Description copied from interface:IRequestGets context of this request.- Specified by:
getContextin interfaceIRequest- Returns:
- request context
-
setContext
public void setContext(java.lang.String ctx)
Description copied from interface:IRequestSets context of this request.- Specified by:
setContextin interfaceIRequest- Parameters:
ctx- request context
-
getModificationTime
public java.util.Date getModificationTime()
Description copied from interface:IRequestGets the time this request was last modified (defined as updated in the queue) (See ARequestQueue.update)- Specified by:
getModificationTimein interfaceIRequest- Returns:
- request last modification time
-
setModificationTime
public void setModificationTime(java.util.Date date)
- Specified by:
setModificationTimein interfaceIRequest
-
copyContents
public void copyContents(IRequest req)
this isn't that efficient but will do for now.- Specified by:
copyContentsin 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:IRequestSets an Extended Data string-key string-value pair. All keys are lower cased because LDAP does not preserve case.- Specified by:
setExtDatain 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:IRequestSets an Extended Data string-key string-value pair. The key and hashtable keys are all lowercased because LDAP does not preserve case.- Specified by:
setExtDatain 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:IRequestChecks whether the key is storing a simple String value, or a complex (Vector/hashtable) structure.- Specified by:
isSimpleExtDataValuein 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:IRequestReturns 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:
getExtDataInStringin 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:IRequestReturns 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:
getExtDataInHashtablein 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:IRequestReturns all the keys stored in ExtData- Specified by:
getExtDataKeysin interfaceIRequest- Returns:
- Enumeration of all the keys.
-
deleteExtData
public void deleteExtData(java.lang.String type)
Description copied from interface:IRequestRemoves the value of an extdata attribute.- Specified by:
deleteExtDatain 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:IRequestHelper 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:
setExtDatain 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:IRequestHelper method to retrieve an individual value from a Hashtable value.- Specified by:
getExtDataInStringin 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:IRequestHelper method to store an Integer value. It converts the integer value to a String and stores it.- Specified by:
setExtDatain 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:IRequestRetrieves an integer value. Returns null if not found or the value can't be represented as an Integer.- Specified by:
getExtDataInIntegerin 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:IRequestStores an array of Integers- Specified by:
setExtDatain 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:IRequestRetrieves an array of Integers- Specified by:
getExtDataInIntegerArrayin 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:IRequestHelper method to store a BigInteger value. It converts the integer value to a String and stores it.- Specified by:
setExtDatain 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:IRequestRetrieves a BigInteger value. Returns null if not found or the value can't be represented as a BigInteger.- Specified by:
getExtDataInBigIntegerin 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:IRequestStores an array of BigIntegers- Specified by:
setExtDatain 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:IRequestRetrieves an array of BigIntegers- Specified by:
getExtDataInBigIntegerArrayin 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:IRequestHelper method to store an exception. It actually stores the e.toString() value.- Specified by:
setExtDatain 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:IRequestStores a byte array as base64 encoded text- Specified by:
setExtDatain 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:IRequestRetrieves the data, which should be base64 encoded as a byte array.- Specified by:
getExtDataInByteArrayin 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:IRequestStores a X509CertImpl as base64 encoded text using the getEncode() method.- Specified by:
setExtDatain 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:IRequestRetrieves the data, which should be base64 encoded as a byte array.- Specified by:
getExtDataInCertin 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:IRequestStores an array of X509CertImpls as a base64 encoded text.- Specified by:
setExtDatain 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:IRequestRetrieves an array of X509CertImpl.- Specified by:
getExtDataInCertArrayin 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:IRequestStores a X509CertInfo as base64 encoded text using the getEncodedInfo() method.- Specified by:
setExtDatain 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:IRequestRetrieves the data, which should be base64 encoded as a byte array.- Specified by:
getExtDataInCertInfoin 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:IRequestStores an array of X509CertInfos as a base64 encoded text.- Specified by:
setExtDatain 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:IRequestRetrieves an array of X509CertInfo.- Specified by:
getExtDataInCertInfoArrayin 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:IRequestStores an array of RevokedCertImpls as a base64 encoded text.- Specified by:
setExtDatain 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:IRequestRetrieves an array of RevokedCertImpl.- Specified by:
getExtDataInRevokedCertArrayin 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:IRequestStores 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:
setExtDatain 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:IRequestReturns 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:
getExtDataInStringVectorin 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:IRequestGets boolean value for given type or default value if attribute is absent.- Specified by:
getExtDataInBooleanin 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:IRequestGets extdata boolean value for given type or default value if attribute is absent for this request with this prefix.- Specified by:
getExtDataInBooleanin 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:IRequestStores an AuthToken the same as a Hashtable.- Specified by:
setExtDatain 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:IRequestRetrieves an authtoken.- Specified by:
getExtDataInAuthTokenin 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:IRequestStores a CertificateExtensions in extdata.- Specified by:
setExtDatain 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:IRequestRetrieves the CertificateExtensions associated with the key.- Specified by:
getExtDataInCertExtsin 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:IRequestStores a CertificateSubjectName in extdata.- Specified by:
setExtDatain 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:IRequestRetrieves the CertificateSubjectName associated with the key.- Specified by:
getExtDataInCertSubjectNamein 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:IRequestStores an array of Strings in ExtData. The indices of the array are used as subkeys.- Specified by:
setExtDatain 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:IRequestRetrieves 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:
getExtDataInStringArrayin 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:
asIAttrSetin interfaceIRequest- Returns:
- IAttrSet wrapper with basic "get" functionality.
-
getRealm
public java.lang.String getRealm()
Description copied from interface:IRequestGet realm
-
-