Interface IRequest

All Superinterfaces:
Serializable
All Known Implementing Classes:
Request

public interface IRequest extends Serializable
An interface that defines abilities of request objects,
Version:
$Revision$, $Date$
  • Field Details

  • Method Details

    • getRequestId

      RequestId getRequestId()
      Gets the primary identifier for this request.
      Returns:
      request id
    • getRequestStatus

      RequestStatus getRequestStatus()
      Gets the current state of this request.
      Returns:
      request status
    • 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

      void setSourceId(String id)
      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

      String getRequestOwner()
      Gets the current owner of this request.
      Returns:
      request owner
    • setRequestOwner

      void setRequestOwner(String owner)
      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

      String getRequestType()
      Gets the type of this request.
      Returns:
      request type
    • setRequestType

      void setRequestType(String type)
      Sets the type or this request.
      Parameters:
      type - request type
    • getRequestVersion

      String getRequestVersion()
      Gets the version of this request.
      Returns:
      request version
    • getCreationTime

      Date getCreationTime()
      Gets the time this request was created.
      Returns:
      request creation time
    • setCreationTime

      void setCreationTime(Date date)
    • 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

      void setModificationTime(Date date)
    • copyContents

      void copyContents(IRequest req)
      Copies meta attributes (excluding request Id, etc.) of another request to this request.
      Parameters:
      req - another request
    • getContext

      String getContext()
      Gets context of this request.
      Returns:
      request context
    • setContext

      void setContext(String ctx)
      Sets context of this request.
      Parameters:
      ctx - request context
    • setRequestStatus

      void setRequestStatus(RequestStatus s)
      Sets status of this request.
      Parameters:
      s - request status
    • isSuccess

      boolean isSuccess()
      Gets status of connector transfer.
      Returns:
      status of connector transfer
    • getError

      String getError(Locale locale)
      Gets localized error message from connector transfer.
      Parameters:
      locale - request locale
      Returns:
      error message from connector transfer
    • getErrorCode

      String getErrorCode(Locale locale)
      Get error code
      Parameters:
      locale - request locale
      Returns:
      error code
    • setExtData

      boolean setExtData(String key, String value)
      Sets an Extended Data string-key string-value pair. All keys are lower cased because LDAP does not preserve case.
      Parameters:
      key - The extended data key
      value - The extended data value
      Returns:
      false if key is invalid.
    • setExtData

      boolean setExtData(String key, Hashtable<String,String> value)
      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 key
      value - The extended data value the Hashtable contains an illegal key.
      Returns:
      false if the key or hashtable keys are invalid
    • isSimpleExtDataValue

      boolean isSimpleExtDataValue(String key)
      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

      String getExtDataInString(String key)
      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

      Hashtable<String,String> getExtDataInHashtable(String key)
      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

      boolean setExtData(String key, String[] values)
      Stores an array of Strings in ExtData. The indices of the array are used as subkeys.
      Parameters:
      key - the ExtData key
      values - the array of string values to store
      Returns:
      False if the key is invalid
    • getExtDataInStringArray

      String[] getExtDataInStringArray(String key)
      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

      void deleteExtData(String type)
      Removes the value of an extdata attribute.
      Parameters:
      type - key to delete
    • setExtData

      boolean setExtData(String key, String subkey, String value)
      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 key
      subkey - The hashtable data key
      value - The hashtable value
      Returns:
      False if the key or subkey are invalid
    • getExtDataInString

      String getExtDataInString(String key, String subkey)
      Helper method to retrieve an individual value from a Hashtable value.
      Parameters:
      key - the ExtData key
      subkey - the key in the Hashtable value (case insensitive)
      Returns:
      the value corresponding to the key/subkey
    • setExtData

      boolean setExtData(String key, Integer value)
      Helper method to store an Integer value. It converts the integer value to a String and stores it.
      Parameters:
      key - the ExtData key
      value - the Integer to store (as a String)
      Returns:
      False if the key or value are invalid
    • getExtDataInInteger

      Integer getExtDataInInteger(String key)
      Retrieves an integer value. Returns null if not found or the value can't be represented as an Integer.
      Parameters:
      key - The ExtData key to lookup
      Returns:
      The integer value or null if not possible.
    • setExtData

      boolean setExtData(String key, Integer[] values)
      Stores an array of Integers
      Parameters:
      key - The extdata key
      values - The array of Integers to store
      Returns:
      false if the key is invalid
    • getExtDataInIntegerArray

      Integer[] getExtDataInIntegerArray(String key)
      Retrieves an array of Integers
      Parameters:
      key - The extdata key
      Returns:
      The array of Integers or null on error.
    • setExtData

      boolean setExtData(String key, BigInteger value)
      Helper method to store a BigInteger value. It converts the integer value to a String and stores it.
      Parameters:
      key - the ExtData key
      value - the BigInteger to store (as a String)
      Returns:
      False if the key or value are invalid
    • getExtDataInBigInteger

      BigInteger getExtDataInBigInteger(String key)
      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

      boolean setExtData(String key, BigInteger[] values)
      Stores an array of BigIntegers
      Parameters:
      key - The extdata key
      values - The array of BigIntegers to store
      Returns:
      false if the key is invalid
    • getExtDataInBigIntegerArray

      BigInteger[] getExtDataInBigIntegerArray(String key)
      Retrieves an array of BigIntegers
      Parameters:
      key - The extdata key
      Returns:
      The array of BigIntegers or null on error.
    • setExtData

      boolean setExtData(String key, Throwable e)
      Helper method to store an exception. It actually stores the e.toString() value.
      Parameters:
      key - The ExtData key to store under
      e - The throwable to store
      Returns:
      False if the key is invalid.
    • setExtData

      boolean setExtData(String key, byte[] data)
      Stores a byte array as base64 encoded text
      Parameters:
      key - The ExtData key
      data - The byte array to store
      Returns:
      False if the key is invalid.
    • getExtDataInByteArray

      byte[] getExtDataInByteArray(String key)
      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

      boolean setExtData(String key, org.mozilla.jss.netscape.security.x509.X509CertImpl data)
      Stores a X509CertImpl as base64 encoded text using the getEncode() method.
      Parameters:
      key - The ExtData key
      data - certificate
      Returns:
      False if the key is invalid.
    • getExtDataInCert

      org.mozilla.jss.netscape.security.x509.X509CertImpl getExtDataInCert(String key)
      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

      boolean setExtData(String key, org.mozilla.jss.netscape.security.x509.X509CertImpl[] data)
      Stores an array of X509CertImpls as a base64 encoded text.
      Parameters:
      key - The ExtData key
      data - The array of certs to store
      Returns:
      False if the key or data is invalid.
    • getExtDataInCertArray

      org.mozilla.jss.netscape.security.x509.X509CertImpl[] getExtDataInCertArray(String key)
      Retrieves an array of X509CertImpl.
      Parameters:
      key - The ExtData key
      Returns:
      Array of certs, or null if not found or invalid data.
    • setExtData

      boolean setExtData(String key, org.mozilla.jss.netscape.security.x509.X509CertInfo data)
      Stores a X509CertInfo as base64 encoded text using the getEncodedInfo() method.
      Parameters:
      key - The ExtData key
      data - certificate
      Returns:
      False if the key is invalid.
    • getExtDataInCertInfo

      org.mozilla.jss.netscape.security.x509.X509CertInfo getExtDataInCertInfo(String key)
      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

      boolean setExtData(String key, org.mozilla.jss.netscape.security.x509.X509CertInfo[] data)
      Stores an array of X509CertInfos as a base64 encoded text.
      Parameters:
      key - The ExtData key
      data - The array of cert infos to store
      Returns:
      False if the key or data is invalid.
    • getExtDataInCertInfoArray

      org.mozilla.jss.netscape.security.x509.X509CertInfo[] getExtDataInCertInfoArray(String key)
      Retrieves an array of X509CertInfo.
      Parameters:
      key - The ExtData key
      Returns:
      Array of cert infos, or null if not found or invalid data.
    • setExtData

      boolean setExtData(String key, org.mozilla.jss.netscape.security.x509.RevokedCertImpl[] data)
      Stores an array of RevokedCertImpls as a base64 encoded text.
      Parameters:
      key - The ExtData key
      data - The array of cert infos to store
      Returns:
      False if the key or data is invalid.
    • getExtDataInRevokedCertArray

      org.mozilla.jss.netscape.security.x509.RevokedCertImpl[] getExtDataInRevokedCertArray(String key)
      Retrieves an array of RevokedCertImpl.
      Parameters:
      key - The ExtData key
      Returns:
      Array of cert infos, or null if not found or invalid data.
    • setExtData

      boolean setExtData(String key, Vector<?> data)
      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 Vector data. 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 store
      data - A vector of Strings to store
      Returns:
      False on key error or invalid data.
    • getExtDataInStringVector

      Vector<String> getExtDataInStringVector(String key)
      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

      boolean getExtDataInBoolean(String type, boolean defVal)
      Gets boolean value for given type or default value if attribute is absent.
      Parameters:
      type - attribute type
      defVal - default attribute value
      Returns:
      attribute value
    • getExtDataInBoolean

      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.
      Parameters:
      prefix - request prefix
      type - attribute type
      defVal - default attribute value
      Returns:
      attribute value
    • setExtData

      boolean setExtData(String key, IAuthToken data)
      Stores an AuthToken the same as a Hashtable.
      Parameters:
      key - The ExtData key
      data - The authtoken to store
      Returns:
      False if the key or data is invalid.
    • getExtDataInAuthToken

      IAuthToken getExtDataInAuthToken(String key)
      Retrieves an authtoken.
      Parameters:
      key - The ExtData key
      Returns:
      AuthToken, or null if not found or invalid data.
    • setExtData

      boolean setExtData(String key, org.mozilla.jss.netscape.security.x509.CertificateExtensions data)
      Stores a CertificateExtensions in extdata.
      Parameters:
      key - The ExtData key
      data - The CertificateExtensions to store
      Returns:
      False if the key or data is invalid.
    • getExtDataInCertExts

      org.mozilla.jss.netscape.security.x509.CertificateExtensions getExtDataInCertExts(String key)
      Retrieves the CertificateExtensions associated with the key.
      Parameters:
      key - The ExtData key
      Returns:
      the object, or null if not found or invalid data.
    • setExtData

      boolean setExtData(String key, org.mozilla.jss.netscape.security.x509.CertificateSubjectName data)
      Stores a CertificateSubjectName in extdata.
      Parameters:
      key - The ExtData key
      data - 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

      String getRealm()
      Get realm
      Returns:
      String
    • setRealm

      void setRealm(String realm)
      Set the realm
      Parameters:
      realm -