Package com.netscape.certsrv.request
Interface IRequest
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
Request
An interface that defines abilities of request objects,
- Version:
- $Revision$, $Date$
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
ID of requested certificate authority (absense implies host authority)static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Name of request attribute that stores the User Supplied Certificate Request.static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Symmetric Key algorithm OID passed into DRM archival servicestatic final String
Symmetric key algorithm params passed into DRM archival servicestatic final String
Name of request attribute that stores the End-User Supplied PKI Archive Option extension.static final String
Name of request attribute that stores the End-User Supplied Key.static final String
Session wrapped security data passed in to the DRM archival servicestatic final String
Transport Key wrapped session key passed into DRM archival service.static final String
Name of request attribute that stores the End-User Supplied Subject Name.static final String
Name of request attribute that stores the transport certificate.static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final Integer
static final Integer
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Arbitrary user-supplied data that will be saved in request. -
Method Summary
Modifier and TypeMethodDescriptionvoid
copyContents
(IRequest req) Copies meta attributes (excluding request Id, etc.) of another request to this request.void
deleteExtData
(String type) Removes the value of an extdata attribute.Gets context of this request.Gets the time this request was created.Gets localized error message from connector transfer.getErrorCode
(Locale locale) Get error codeRetrieves an authtoken.Retrieves a BigInteger value.Retrieves an array of BigIntegersboolean
getExtDataInBoolean
(String type, boolean defVal) Gets boolean value for given type or default value if attribute is absent.boolean
getExtDataInBoolean
(String prefix, 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[]
Retrieves the data, which should be base64 encoded as a byte array.org.mozilla.jss.netscape.security.x509.X509CertImpl
getExtDataInCert
(String key) Retrieves the data, which should be base64 encoded as a byte array.org.mozilla.jss.netscape.security.x509.X509CertImpl[]
Retrieves an array of X509CertImpl.org.mozilla.jss.netscape.security.x509.CertificateExtensions
Retrieves the CertificateExtensions associated with the key.org.mozilla.jss.netscape.security.x509.X509CertInfo
Retrieves the data, which should be base64 encoded as a byte array.org.mozilla.jss.netscape.security.x509.X509CertInfo[]
Retrieves an array of X509CertInfo.org.mozilla.jss.netscape.security.x509.CertificateSubjectName
Retrieves the CertificateSubjectName associated with the key.Returns the Hashtable value for the String key.Retrieves an integer value.Integer[]
Retrieves an array of Integersorg.mozilla.jss.netscape.security.x509.RevokedCertImpl[]
Retrieves an array of RevokedCertImpl.getExtDataInString
(String key) Returns the String value stored for the String key.getExtDataInString
(String key, String subkey) Helper method to retrieve an individual value from a Hashtable value.String[]
Retrieves an array of Strings stored with the key.Returns a vector of strings for the key.Returns all the keys stored in ExtDataGets the time this request was last modified (defined as updated in the queue) (See ARequestQueue.update)getRealm()
Get realmGets the primary identifier for this request.Gets the current owner of this request.Gets the current state of this request.Gets the type of this request.Gets the version of this request.Gets the "sourceId" for the request.boolean
Checks whether the key is storing a simple String value, or a complex (Vector/hashtable) structure.boolean
Gets status of connector transfer.void
setContext
(String ctx) Sets context of this request.void
setCreationTime
(Date date) boolean
setExtData
(String key, byte[] data) Stores a byte array as base64 encoded textboolean
setExtData
(String key, IAuthToken data) Stores an AuthToken the same as a Hashtable.boolean
setExtData
(String key, Integer value) Helper method to store an Integer value.boolean
setExtData
(String key, Integer[] values) Stores an array of Integersboolean
setExtData
(String key, String value) Sets an Extended Data string-key string-value pair.boolean
setExtData
(String key, String[] values) Stores an array of Strings in ExtData.boolean
setExtData
(String key, String subkey, String value) Helper method to add subkey/value pair to a ExtData hashtable.boolean
setExtData
(String key, Throwable e) Helper method to store an exception.boolean
setExtData
(String key, BigInteger value) Helper method to store a BigInteger value.boolean
setExtData
(String key, BigInteger[] values) Stores an array of BigIntegersboolean
setExtData
(String key, Hashtable<String, String> value) Sets an Extended Data string-key string-value pair.boolean
setExtData
(String key, Vector<?> data) Stores the contents of the String Vector in ExtData.boolean
setExtData
(String key, org.mozilla.jss.netscape.security.x509.CertificateExtensions data) Stores a CertificateExtensions in extdata.boolean
setExtData
(String key, org.mozilla.jss.netscape.security.x509.CertificateSubjectName data) Stores a CertificateSubjectName in extdata.boolean
setExtData
(String key, org.mozilla.jss.netscape.security.x509.RevokedCertImpl[] data) Stores an array of RevokedCertImpls as a base64 encoded text.boolean
setExtData
(String key, org.mozilla.jss.netscape.security.x509.X509CertImpl data) Stores a X509CertImpl as base64 encoded text using the getEncode() method.boolean
setExtData
(String key, org.mozilla.jss.netscape.security.x509.X509CertImpl[] data) Stores an array of X509CertImpls as a base64 encoded text.boolean
setExtData
(String key, org.mozilla.jss.netscape.security.x509.X509CertInfo data) Stores a X509CertInfo as base64 encoded text using the getEncodedInfo() method.boolean
setExtData
(String key, org.mozilla.jss.netscape.security.x509.X509CertInfo[] data) Stores an array of X509CertInfos as a base64 encoded text.void
setModificationTime
(Date date) void
Set the realmvoid
setRequestOwner
(String owner) Sets the current owner of this request.void
Sets status of this request.void
setRequestType
(String type) Sets the type or this request.void
setSourceId
(String id) Sets the "sourceId" for this request.
-
Field Details
-
REQ_VERSION
- See Also:
-
REQ_STATUS
- See Also:
-
REQ_TYPE
- See Also:
-
REQ_FORMAT
- See Also:
-
ENROLLMENT_REQUEST
- See Also:
-
RENEWAL_REQUEST
- See Also:
-
REVOCATION_REQUEST
- See Also:
-
CMCREVOKE_REQUEST
- See Also:
-
UNREVOCATION_REQUEST
- See Also:
-
KEYARCHIVAL_REQUEST
- See Also:
-
KEYRECOVERY_REQUEST
- See Also:
-
KEY_RECOVERY_REQUEST
- See Also:
-
KEY_ARCHIVAL_REQUEST
- See Also:
-
GETCACHAIN_REQUEST
- See Also:
-
GETREVOCATIONINFO_REQUEST
- See Also:
-
GETCRL_REQUEST
- See Also:
-
GETCERTS_REQUEST
- See Also:
-
REVOCATION_CHECK_CHALLENGE_REQUEST
- See Also:
-
GETCERT_STATUS_REQUEST
- See Also:
-
GETCERTS_FOR_CHALLENGE_REQUEST
- See Also:
-
CLA_CERT4CRL_REQUEST
- See Also:
-
CLA_UNCERT4CRL_REQUEST
- See Also:
-
NETKEY_KEYGEN_REQUEST
- See Also:
-
NETKEY_KEYRECOVERY_REQUEST
- See Also:
-
REQUESTOR_NAME
- See Also:
-
REQUESTOR_PHONE
- See Also:
-
REQUESTOR_EMAIL
- See Also:
-
REQUESTOR_COMMENTS
- See Also:
-
AUTH_TOKEN
- See Also:
-
HTTP_PARAMS
- See Also:
-
HTTP_HEADERS
- See Also:
-
AGENT_PARAMS
- See Also:
-
SERVER_ATTRS
- See Also:
-
AUTH_TOKEN_PREFIX
- See Also:
-
PROFILE_ID
- See Also:
-
AUTHORITY_ID
ID of requested certificate authority (absense implies host authority)- See Also:
-
USER_DATA
-
RESULT
- See Also:
-
RES_SUCCESS
-
RES_ERROR
-
REMOTE_SERVICE_AUTHORITY
- See Also:
-
SVCERRORS
- See Also:
-
REMOTE_STATUS
- See Also:
-
REMOTE_REQID
- See Also:
-
CERT_STATUS
- See Also:
-
CERT_TYPE
- See Also:
-
CRMF_REQID
- See Also:
-
PKCS10_REQID
- See Also:
-
CMC_REQIDS
- See Also:
-
CMC_TRANSID
- See Also:
-
CMC_SENDERNONCE
- See Also:
-
CMC_RECIPIENTNONCE
- See Also:
-
CMC_REGINFO
- See Also:
-
CERT_INFO
- See Also:
-
ISSUED_CERTS
- See Also:
-
REQUEST_TRUSTEDMGR_PRIVILEGE
- See Also:
-
FINGERPRINTS
- See Also:
-
SERVER_CERT
- See Also:
-
CLIENT_CERT
- See Also:
-
CA_CERT
- See Also:
-
RA_CERT
- See Also:
-
OCSP_CERT
- See Also:
-
OBJECT_SIGNING_CERT
- See Also:
-
OTHER_CERT
- See Also:
-
ROUTER_CERT
- See Also:
-
CEP_CERT
- See Also:
-
OLD_CERTS
- See Also:
-
OLD_SERIALS
- See Also:
-
ISSUERDN
- See Also:
-
REVOKED_CERTS
- See Also:
-
REVOKED_REASON
- See Also:
-
REVOKED_CERT_RECORDS
- See Also:
-
CRL_UPDATE_STATUS
- See Also:
-
CRL_UPDATE_ERROR
- See Also:
-
CRL_PUBLISH_STATUS
- See Also:
-
CRL_PUBLISH_ERROR
- See Also:
-
REQUESTOR_TYPE
- See Also:
-
NETKEY_ATTR_CUID
- See Also:
-
NETKEY_ATTR_USERID
- See Also:
-
NETKEY_ATTR_DRMTRANS_DES_KEY
- See Also:
-
NETKEY_ATTR_ARCHIVE_FLAG
- See Also:
-
NETKEY_ATTR_SERVERSIDE_MUSCLE_FLAG
- See Also:
-
NETKEY_ATTR_ENC_PRIVKEY_FLAG
- See Also:
-
NETKEY_ATTR_USER_CERT
- See Also:
-
NETKEY_ATTR_KEYID
- See Also:
-
NETKEY_ATTR_KEY_SIZE
- See Also:
-
NETKEY_ATTR_KEY_TYPE
- See Also:
-
NETKEY_ATTR_KEY_EC_CURVE
- See Also:
-
SECURITY_DATA_ENROLLMENT_REQUEST
- See Also:
-
SECURITY_DATA_RECOVERY_REQUEST
- See Also:
-
SECURITY_DATA_CLIENT_KEY_ID
- See Also:
-
SECURITY_DATA_STRENGTH
- See Also:
-
SECURITY_DATA_ALGORITHM
- See Also:
-
SECURITY_DATA_TYPE
- See Also:
-
SECURITY_DATA_STATUS
- See Also:
-
SECURITY_DATA_TRANS_SESS_KEY
- See Also:
-
SECURITY_DATA_SESS_PASS_PHRASE
- See Also:
-
SECURITY_DATA_IV_STRING_IN
- See Also:
-
SECURITY_DATA_IV_STRING_OUT
- See Also:
-
SECURITY_DATA_SESS_WRAPPED_DATA
- See Also:
-
SECURITY_DATA_PASS_WRAPPED_DATA
- See Also:
-
SECURITY_DATA_PL_ENCRYPTION_OID
- See Also:
-
SECURITY_DATA_PL_WRAPPING_NAME
- See Also:
-
SECURITY_DATA_PL_WRAPPED
- See Also:
-
ASYMKEY_GENERATION_REQUEST
- See Also:
-
SYMKEY_GENERATION_REQUEST
- See Also:
-
KEY_GEN_ALGORITHM
- See Also:
-
KEY_GEN_SIZE
- See Also:
-
KEY_GEN_USAGES
- See Also:
-
KEY_GEN_TRANS_WRAPPED_SESSION_KEY
- See Also:
-
SERVER_SIDE_KEYGEN_ENROLL_ENABLE_ARCHIVAL
- See Also:
-
SSK_STAGE
- See Also:
-
SSK_STAGE_KEYGEN
- See Also:
-
SSK_STAGE_KEY_RETRIEVE
- See Also:
-
REQUESTOR_EE
- See Also:
-
REQUESTOR_RA
- See Also:
-
REQUESTOR_NETKEY_RA
- See Also:
-
REQUESTOR_KRA
- See Also:
-
REQUESTOR_AGENT
- See Also:
-
CACERTCHAIN
- See Also:
-
CRL
- See Also:
-
DOGETCACHAIN
- See Also:
-
CERT_FILTER
- See Also:
-
ERRORS
- See Also:
-
SMIME
- See Also:
-
OBJECT_SIGNING
- See Also:
-
SSL_CLIENT
- See Also:
-
REQUEST_SUBJECT_NAME
Name of request attribute that stores the End-User Supplied Subject Name.The value is of type org.mozilla.jss.netscape.security.x509.CertificateSubjectName
- See Also:
-
REQUEST_KEY
Name of request attribute that stores the End-User Supplied Key.The value is of type org.mozilla.jss.netscape.security.x509.CertificateX509Key
- See Also:
-
REQUEST_TRANSPORT_CERT
Name of request attribute that stores the transport certificate.The value is of type String including base64 encoded certificate.
- See Also:
-
REQUEST_ARCHIVE_OPTIONS
Name of request attribute that stores the End-User Supplied PKI Archive Option extension. This extension is extracted from a CRMF request that has the user-provided private key.The value is of type byte []
- See Also:
-
REQUEST_SESSION_KEY
Transport Key wrapped session key passed into DRM archival service.- See Also:
-
REQUEST_SECURITY_DATA
Session wrapped security data passed in to the DRM archival service- See Also:
-
REQUEST_ALGORITHM_PARAMS
Symmetric key algorithm params passed into DRM archival service- See Also:
-
REQUEST_ALGORITHM_OID
Symmetric Key algorithm OID passed into DRM archival service- See Also:
-
CTX_CERT_REQUEST
Name of request attribute that stores the User Supplied Certificate Request.- See Also:
-
ATTR_REQUEST_OWNER
- See Also:
-
ATTR_REQUEST_STATUS
- See Also:
-
ATTR_SOURCE_ID
- See Also:
-
ATTR_REQUEST_TYPE
- See Also:
-
ATTR_APPROVE_AGENTS
- See Also:
-
UPDATED_BY
- See Also:
-
ERROR
- See Also:
-
ERROR_CODE
- See Also:
-
REALM
- See Also:
-
-
Method Details
-
getRequestId
-
getRequestStatus
-
getSourceId
String getSourceId()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)
- Returns:
- the sourceId value (or null if none has been set)
-
setSourceId
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.- Parameters:
id
- source id for this request
-
getRequestOwner
-
setRequestOwner
Sets the current owner of this request.- Parameters:
owner
- The new owner of this request. If this value is set to null there will be no current owner
-
getRequestType
-
setRequestType
-
getRequestVersion
-
getCreationTime
-
setCreationTime
-
getModificationTime
Date getModificationTime()Gets the time this request was last modified (defined as updated in the queue) (See ARequestQueue.update)- Returns:
- request last modification time
-
setModificationTime
-
copyContents
Copies meta attributes (excluding request Id, etc.) of another request to this request.- Parameters:
req
- another request
-
getContext
-
setContext
-
setRequestStatus
-
isSuccess
boolean isSuccess()Gets status of connector transfer.- Returns:
- status of connector transfer
-
getError
-
getErrorCode
-
setExtData
-
setExtData
Sets an Extended Data string-key string-value pair. The key and hashtable keys are all lowercased because LDAP does not preserve case.- 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
Checks whether the key is storing a simple String value, or a complex (Vector/hashtable) structure.- Parameters:
key
- The key to check for.- Returns:
- True if the key maps to a string. False if it maps to a hashtable.
-
getExtDataInString
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).- 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
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)- 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
Enumeration<String> getExtDataKeys()Returns all the keys stored in ExtData- Returns:
- Enumeration of all the keys.
-
setExtData
-
getExtDataInStringArray
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.- Parameters:
key
- The ExtData key- Returns:
- The value. Null if not found or the data isn't an array.
-
deleteExtData
Removes the value of an extdata attribute.- Parameters:
type
- key to delete
-
setExtData
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.- Parameters:
key
- The top level keysubkey
- The hashtable data keyvalue
- The hashtable value- Returns:
- False if the key or subkey are invalid
-
getExtDataInString
-
setExtData
-
getExtDataInInteger
-
setExtData
-
getExtDataInIntegerArray
-
setExtData
Helper method to store a BigInteger value. It converts the integer value to a String and stores it.- Parameters:
key
- the ExtData keyvalue
- the BigInteger to store (as a String)- Returns:
- False if the key or value are invalid
-
getExtDataInBigInteger
Retrieves a BigInteger value. Returns null if not found or the value can't be represented as a BigInteger.- Parameters:
key
- The ExtData key to lookup- Returns:
- The integer value or null if not possible.
-
setExtData
Stores an array of BigIntegers- Parameters:
key
- The extdata keyvalues
- The array of BigIntegers to store- Returns:
- false if the key is invalid
-
getExtDataInBigIntegerArray
Retrieves an array of BigIntegers- Parameters:
key
- The extdata key- Returns:
- The array of BigIntegers or null on error.
-
setExtData
-
setExtData
Stores a byte array as base64 encoded text- Parameters:
key
- The ExtData keydata
- The byte array to store- Returns:
- False if the key is invalid.
-
getExtDataInByteArray
Retrieves the data, which should be base64 encoded as a byte array.- Parameters:
key
- The ExtData key- Returns:
- The data, or null if an error occurs.
-
setExtData
Stores a X509CertImpl as base64 encoded text using the getEncode() method.- Parameters:
key
- The ExtData keydata
- certificate- Returns:
- False if the key is invalid.
-
getExtDataInCert
Retrieves the data, which should be base64 encoded as a byte array.- Parameters:
key
- The ExtData key- Returns:
- The data, or null if an error occurs.
-
setExtData
Stores an array of X509CertImpls as a base64 encoded text.- Parameters:
key
- The ExtData keydata
- The array of certs to store- Returns:
- False if the key or data is invalid.
-
getExtDataInCertArray
Retrieves an array of X509CertImpl.- Parameters:
key
- The ExtData key- Returns:
- Array of certs, or null if not found or invalid data.
-
setExtData
Stores a X509CertInfo as base64 encoded text using the getEncodedInfo() method.- Parameters:
key
- The ExtData keydata
- certificate- Returns:
- False if the key is invalid.
-
getExtDataInCertInfo
Retrieves the data, which should be base64 encoded as a byte array.- Parameters:
key
- The ExtData key- Returns:
- The data, or null if an error occurs.
-
setExtData
Stores an array of X509CertInfos as a base64 encoded text.- Parameters:
key
- The ExtData keydata
- The array of cert infos to store- Returns:
- False if the key or data is invalid.
-
getExtDataInCertInfoArray
Retrieves an array of X509CertInfo.- Parameters:
key
- The ExtData key- Returns:
- Array of cert infos, or null if not found or invalid data.
-
setExtData
Stores an array of RevokedCertImpls as a base64 encoded text.- Parameters:
key
- The ExtData keydata
- The array of cert infos to store- Returns:
- False if the key or data is invalid.
-
getExtDataInRevokedCertArray
Retrieves an array of RevokedCertImpl.- Parameters:
key
- The ExtData key- Returns:
- Array of cert infos, or null if not found or invalid data.
-
setExtData
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. - Parameters:
key
- The extdata key to storedata
- A vector of Strings to store- Returns:
- False on key error or invalid data.
-
getExtDataInStringVector
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.- Parameters:
key
- The extdata key- Returns:
- A Vector of strings, or null on error.
-
getExtDataInBoolean
Gets boolean value for given type or default value if attribute is absent.- Parameters:
type
- attribute typedefVal
- default attribute value- Returns:
- attribute value
-
getExtDataInBoolean
Gets extdata boolean value for given type or default value if attribute is absent for this request with this prefix.- Parameters:
prefix
- request prefixtype
- attribute typedefVal
- default attribute value- Returns:
- attribute value
-
setExtData
Stores an AuthToken the same as a Hashtable.- Parameters:
key
- The ExtData keydata
- The authtoken to store- Returns:
- False if the key or data is invalid.
-
getExtDataInAuthToken
Retrieves an authtoken.- Parameters:
key
- The ExtData key- Returns:
- AuthToken, or null if not found or invalid data.
-
setExtData
Stores a CertificateExtensions in extdata.- Parameters:
key
- The ExtData keydata
- The CertificateExtensions to store- Returns:
- False if the key or data is invalid.
-
getExtDataInCertExts
Retrieves the CertificateExtensions associated with the key.- Parameters:
key
- The ExtData key- Returns:
- the object, or null if not found or invalid data.
-
setExtData
Stores a CertificateSubjectName in extdata.- Parameters:
key
- The ExtData keydata
- The CertificateSubjectName to store- Returns:
- False if the key or data is invalid.
-
getExtDataInCertSubjectName
org.mozilla.jss.netscape.security.x509.CertificateSubjectName getExtDataInCertSubjectName(String key) Retrieves the CertificateSubjectName associated with the key.- Parameters:
key
- The ExtData key- Returns:
- the object, or null if not found or invalid data.
-
asIAttrSet
IAttrSet asIAttrSet()- Returns:
- IAttrSet wrapper with basic "get" functionality.
-
getRealm
-
setRealm
-