Oracle Application Server Certificate Authority Java API Reference
10g (9.0.4)
B12079-01

oracle.security.oca.policy
Class OCAPolicyRequest

java.lang.Object
  |
  +--oracle.security.oca.policy.OCAPolicyRequest

public final class OCAPolicyRequest
extends java.lang.Object

OCAPolicyRequest contains the attributes which can be read/configured by policy plug-ins. For each request, OCA's policy processor constructs OCAPolicyRequest. Once OCAPolicyRequest is constructed, it is sent as an input parameter to all the custom plug-ins. Plug-ins can use the API's to get or set values.

Since:
9.0.4
See Also:
OCAX509Certificate, OCMPolicyConstants


 

Method Summary
 java.lang.String getAuthType()
          Gets the authentication type.
 java.util.Date getCACertExpiryDate()
          Gets the CA Certificate's expiry date.
 java.util.Date getCACertIssuanceDate()
          Gets the CA certificate's issuance date.
 java.lang.String getCACertIssuerName()
          Gets the Issuer's DN of the CA Certificate.
 java.lang.String getCACertSubjectName()
          Gets the DN of the CA Certificate.
 java.math.BigInteger getCAPathLength()
          Gets the Path length of the CA Certificate.
 java.lang.String getCertType()
          Gets the Type of the certificate.
 java.lang.String getCertUsage()
          Gets the Certificate Usage of the certificate / certificate request.
 java.lang.String getCommonName()
          Gets the Common Name set in the DN.
 java.lang.String getCountry()
          Gets the Country set in the DN.
 java.lang.String getDistinguishedName()
          Gets the Distinguished Name associated with the request.
 java.lang.String getEMail()
          Gets the EMail set in the DN.
 java.lang.String getKeyAlgorithm()
          Gets the Key Algorithm assoicated with the request.
 int getKeySize()
          Gets the Key Size associated with the request.
 java.lang.String getLocality()
          Gets the Locality set in the DN.
 java.util.Date getNotAfterDate()
          Gets the not after date associated with the user certificate for Renewal and Revocation request.
 java.util.Date getNotBeforeDate()
          Gets the Not before date associated with the user certificate for Renewal and Revocation request.
 java.lang.String getOrganization()
          Gets the Organization set in the DN.
 java.lang.String getOrganizationalUnit()
          Gets the Organizational Unit set in the DN.
 java.lang.String getRequestOperation()
          Gets the Certificate Operation.
 java.lang.String getState()
          Gets the State set in the DN.
 oracle.security.oca.policy.OCAX509Certificate[] getTrustPoints()
          Gets the trust points of the CA.
 int getValidityPeriod()
          Gets the validity period for the request.
 void setError(java.lang.String pluginName, java.lang.String errorType, java.lang.String errorMessage)
          Set Plug-in name, error type and error message.
 void setError(java.lang.String pluginName, java.lang.String errorType, java.lang.String errorMessage, java.lang.Object[] params)
          Set Plug-in name, error type and error message.
 void setPluginResult(java.lang.String pluginName, java.lang.Boolean status)
          Sets the result of the plugin.
 void setValidityPeriod(int valPeriod)
          Sets the validity period for the request.


 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 


 

Method Detail

getRequestOperation

public java.lang.String getRequestOperation()
Gets the Certificate Operation. The request can be enrollment / revoke / renew.
Returns:
The certificate operation associated with the current request.
Since:
9.0.4
See Also:
OCMPolicyConstants.CERT_OP_ENROLLMENT, OCMPolicyConstants.CERT_OP_RENEWAL, OCMPolicyConstants.CERT_OP_REVOCATION

getCACertExpiryDate

public java.util.Date getCACertExpiryDate()
Gets the CA Certificate's expiry date.
Returns:
The Expiry Date of the CA Certificate.
Since:
9.0.4

getCACertIssuanceDate

public java.util.Date getCACertIssuanceDate()
Gets the CA certificate's issuance date.
Returns:
The isssuance Date of the CA Certificate.
Since:
9.0.4

getCACertIssuerName

public java.lang.String getCACertIssuerName()
Gets the Issuer's DN of the CA Certificate.
Returns:
The DN of the signer of the CA Certificate.
Since:
9.0.4

getCACertSubjectName

public java.lang.String getCACertSubjectName()
Gets the DN of the CA Certificate.
Returns:
The DN of the CA Certificate.
Since:
9.0.4

getCAPathLength

public java.math.BigInteger getCAPathLength()
Gets the Path length of the CA Certificate. The path length defines the depth of the CA - SubCA hierarchy.
Returns:
The Path length of the CA.
Since:
9.0.4

getCertType

public java.lang.String getCertType()
Gets the Type of the certificate.
Returns:
The type of certificate requested.
Since:
9.0.4
See Also:
OCMPolicyConstants.CERT_TYPE_CLIENT, OCMPolicyConstants.CERT_TYPE_SERVER, OCMPolicyConstants.CERT_TYPE_CA

getCertUsage

public java.lang.String getCertUsage()
Gets the Certificate Usage of the certificate / certificate request.
Returns:
The certificate usage requested.
Since:
9.0.4
See Also:
OCMPolicyConstants.CERT_USAGE_CA_SIGN, OCMPolicyConstants.CERT_USAGE_SMIME_SIGN, OCMPolicyConstants.CERT_USAGE_SMIME_ENC, OCMPolicyConstants.CERT_USAGE_CODE_SIGN, OCMPolicyConstants.CERT_USAGE_SSL

setError

public void setError(java.lang.String pluginName,
                     java.lang.String errorType,
                     java.lang.String errorMessage)
              throws oracle.security.oca.exception.OCMException
Set Plug-in name, error type and error message. Set Error type to OCMPolicyConstants.POLICY_ERROR or OCMPolicyConstants.POLICY_WARNING.

If the error type is set to OCMPolicyConstants.POLICY_ERROR then policy processor or plugin has come across a non-compliance and the request (enrollment, revoke or renew) should not be done. In both atomatic and manual cases the request is rejected.
If the error type is set to OCMPolicyConstants.POLICY_WARNING, then this means that the policy non-compliance is minimal. That means either processor or plug-in has detected the non-compliance and either neglected or corrected the non-compliance. errorMessage should contain the description of the non-compliance and action taken by processor or plug-in. In automatic case, the request is accepted and for manual case the warning is displayed to the administrator before he accepts it.
Parameters:
pluginName - Plug-in Name.
errorType - Error Type.
errorMessage - Error Message string.
oracle.security.oca.exception.OCMException
Since:
9.0.4
See Also:
OCMPolicyConstants.POLICY_ERROR, OCMPolicyConstants.POLICY_WARNING

setError

public void setError(java.lang.String pluginName,
                     java.lang.String errorType,
                     java.lang.String errorMessage,
                     java.lang.Object[] params)
              throws oracle.security.oca.exception.OCMException
Set Plug-in name, error type and error message. Set Error type to OCMPolicyConstants.POLICY_ERROR or OCMPolicyConstants.POLICY_WARNING.

If the error type is set to OCMPolicyConstants.POLICY_ERROR then policy processor or plugin has come across a non-compliance and the request (enrollment, revoke or renew) should not be done. In both atomatic and manual cases the request is rejected.
If the error type is set to OCMPolicyConstants.POLICY_WARNING, then this means that the policy non-compliance is minimal. That means either processor or plug-in has detected the non-compliance and either neglected or corrected the non-compliance. errorMessage should contain the description of the non-compliance and action taken by processor or plug-in. In automatic case, the request is accepted and for manual case the warning is displayed to the administrator before he accepts it.
Parameters:
pluginName - Plug-in Name.
errorType - Error Type.
errorMessage - Error Message string.
params - The list of paramters for the string
oracle.security.oca.exception.OCMException
Since:
9.0.4
See Also:
OCMPolicyConstants.POLICY_ERROR, OCMPolicyConstants.POLICY_WARNING

setPluginResult

public void setPluginResult(java.lang.String pluginName,
                            java.lang.Boolean status)
Sets the result of the plugin.
Since:
9.0.4

getDistinguishedName

public java.lang.String getDistinguishedName()
Gets the Distinguished Name associated with the request.
Returns:
The Distinguished Name.
Since:
9.0.4

getKeyAlgorithm

public java.lang.String getKeyAlgorithm()
Gets the Key Algorithm assoicated with the request.
Returns:
The Key Algorithm.
Since:
9.0.4
See Also:
OCMPolicyConstants.RSA_KEY_ALGO

getNotAfterDate

public java.util.Date getNotAfterDate()
Gets the not after date associated with the user certificate for Renewal and Revocation request.
Returns:
The Not After Date. null if not available.
Since:
9.0.4

getNotBeforeDate

public java.util.Date getNotBeforeDate()
Gets the Not before date associated with the user certificate for Renewal and Revocation request.
Returns:
The Not Before Date. null if not available.
Since:
9.0.4

getKeySize

public int getKeySize()
Gets the Key Size associated with the request.
Returns:
The Key Size.
Since:
9.0.4

getAuthType

public java.lang.String getAuthType()
Gets the authentication type.
Returns:
The authentication type for this request. The possible values are SSO, SSL and MANUAL, which are the authentication mechanisms supported by OCA.
Since:
9.0.4
See Also:
OCMPolicyConstants.AUTH_TYPE_MANUAL, OCMPolicyConstants.AUTH_TYPE_SSO, OCMPolicyConstants.AUTH_TYPE_SSL

setValidityPeriod

public void setValidityPeriod(int valPeriod)
                       throws java.lang.Exception
Sets the validity period for the request.
Throws:
Exception, - If the validity period is outside the CA's validity.
java.lang.Exception
Since:
9.0.4

getValidityPeriod

public int getValidityPeriod()
Gets the validity period for the request. The validity period requested by the user.
Returns:
The validity period.
Since:
9.0.4

getCommonName

public java.lang.String getCommonName()
Gets the Common Name set in the DN.
Returns:
The Common Name.
Since:
9.0.4

getCountry

public java.lang.String getCountry()
Gets the Country set in the DN.
Returns:
The Country.s
Since:
9.0.4

getEMail

public java.lang.String getEMail()
Gets the EMail set in the DN.
Returns:
The EMail ID.
Since:
9.0.4

getOrganization

public java.lang.String getOrganization()
Gets the Organization set in the DN.
Returns:
The Organization
Since:
9.0.4

getOrganizationalUnit

public java.lang.String getOrganizationalUnit()
Gets the Organizational Unit set in the DN.
Returns:
The Organizational Unit
Since:
9.0.4

getState

public java.lang.String getState()
Gets the State set in the DN.
Returns:
The State
Since:
9.0.4

getLocality

public java.lang.String getLocality()
Gets the Locality set in the DN.
Returns:
The locality
Since:
9.0.4

getTrustPoints

public oracle.security.oca.policy.OCAX509Certificate[] getTrustPoints()
Gets the trust points of the CA. Trust points are the CA certificates that is trusted by the CA.
Returns:
A array of Trust points certificates.
Since:
9.0.4
See Also:
OCAX509Certificate

Oracle Application Server Certificate Authority Java API Reference
10g (9.0.4)
B12079-01

Copyright © 2000, 2003 Oracle Corporation. All Rights Reserved.