CPKIFEnvelopedData.java

Go to the documentation of this file.
00001 /* ----------------------------------------------------------------------------
00002  * This file was automatically generated by SWIG (http://www.swig.org).
00003  * Version 2.0.1
00004  *
00005  * Do not make changes to this file unless you know what you are doing--modify
00006  * the SWIG interface file instead.
00007  * ----------------------------------------------------------------------------- */
00008 
00009 package com.orionsec.jpkif;
00010 
00011 public class CPKIFEnvelopedData extends IPKIFHasAttributes {
00012   private long swigCPtr;
00013 
00014   public CPKIFEnvelopedData(long cPtr, boolean cMemoryOwn) {
00015     super(pkif_moduleJNI.CPKIFEnvelopedData_SWIGUpcast(cPtr), cMemoryOwn);
00016     swigCPtr = cPtr;
00017   }
00018 
00019   public static long getCPtr(CPKIFEnvelopedData obj) {
00020     return (obj == null) ? 0 : obj.swigCPtr;
00021   }
00022 
00023   protected void finalize() {
00024     delete();
00025   }
00026 
00027   public synchronized void delete() {
00028     if (swigCPtr != 0) {
00029       if (swigCMemOwn) {
00030         swigCMemOwn = false;
00031         pkif_moduleJNI.delete_CPKIFEnvelopedData(swigCPtr);
00032       }
00033       swigCPtr = 0;
00034     }
00035     super.delete();
00036   }
00037 
00038   public CPKIFEnvelopedData() {
00039     this(pkif_moduleJNI.new_CPKIFEnvelopedData(), true);
00040   }
00041 
00042   public CPKIFEnvelopedData.CMSVersion GetVersion() {
00043     return CPKIFEnvelopedData.CMSVersion.swigToEnum(pkif_moduleJNI.CPKIFEnvelopedData_GetVersion(swigCPtr, this));
00044   }
00045 
00046   public void AddOriginatorCertificate(CPKIFCertificatePtr cert) {
00047     pkif_moduleJNI.CPKIFEnvelopedData_AddOriginatorCertificate(swigCPtr, this, CPKIFCertificatePtr.getCPtr(cert), cert);
00048   }
00049 
00050   public void AddOriginatorCRL(CPKIFCRLPtr crl) {
00051     pkif_moduleJNI.CPKIFEnvelopedData_AddOriginatorCRL(swigCPtr, this, CPKIFCRLPtr.getCPtr(crl), crl);
00052   }
00053 
00054   public void SetOriginatorCredential(CPKIFCredentialPtr cred) {
00055     pkif_moduleJNI.CPKIFEnvelopedData_SetOriginatorCredential(swigCPtr, this, CPKIFCredentialPtr.getCPtr(cred), cred);
00056   }
00057 
00058   public void GetOriginatorCertificates(CPKIFCertificateList certs) {
00059     pkif_moduleJNI.CPKIFEnvelopedData_GetOriginatorCertificates(swigCPtr, this, CPKIFCertificateList.getCPtr(certs), certs);
00060   }
00061 
00062   public void GetOriginatorCRLs(CPKIFCRLList crls) {
00063     pkif_moduleJNI.CPKIFEnvelopedData_GetOriginatorCRLs(swigCPtr, this, CPKIFCRLList.getCPtr(crls), crls);
00064   }
00065 
00066   public void GetRecipientInfos(CPKIFRecipientInfos recipInfos) {
00067     pkif_moduleJNI.CPKIFEnvelopedData_GetRecipientInfos(swigCPtr, this, CPKIFRecipientInfos.getCPtr(recipInfos), recipInfos);
00068   }
00069 
00070   public void AddRecipient(CPKIFCertificatePtr cert, CMSPathValidationStatus minStatus) {
00071     pkif_moduleJNI.CPKIFEnvelopedData_AddRecipient__SWIG_0(swigCPtr, this, CPKIFCertificatePtr.getCPtr(cert), cert, minStatus.swigValue());
00072   }
00073 
00074   public void AddRecipient(CPKIFCertificatePtr cert) {
00075     pkif_moduleJNI.CPKIFEnvelopedData_AddRecipient__SWIG_1(swigCPtr, this, CPKIFCertificatePtr.getCPtr(cert), cert);
00076   }
00077 
00078   public void AddRecipient(CPKIFCertificatePtr cert, CPKIFCertificatePathPtr path, CPKIFPathValidationResultsPtr valResults, CMSPathValidationStatus minStatus) {
00079     pkif_moduleJNI.CPKIFEnvelopedData_AddRecipient__SWIG_2(swigCPtr, this, CPKIFCertificatePtr.getCPtr(cert), cert, CPKIFCertificatePathPtr.getCPtr(path), path, CPKIFPathValidationResultsPtr.getCPtr(valResults), valResults, minStatus.swigValue());
00080   }
00081 
00082   public void AddRecipient(CPKIFCertificatePtr cert, CPKIFCertificatePathPtr path, CPKIFPathValidationResultsPtr valResults) {
00083     pkif_moduleJNI.CPKIFEnvelopedData_AddRecipient__SWIG_3(swigCPtr, this, CPKIFCertificatePtr.getCPtr(cert), cert, CPKIFCertificatePathPtr.getCPtr(path), path, CPKIFPathValidationResultsPtr.getCPtr(valResults), valResults);
00084   }
00085 
00086   public void AddRecipient(CPKIFKEKRecipInfoDetailsPtr kek) {
00087     pkif_moduleJNI.CPKIFEnvelopedData_AddRecipient__SWIG_4(swigCPtr, this, CPKIFKEKRecipInfoDetailsPtr.getCPtr(kek), kek);
00088   }
00089 
00090   public void SetDataToEncrypt(CPKIFEncryptedContentInfoPtr buf) {
00091     pkif_moduleJNI.CPKIFEnvelopedData_SetDataToEncrypt(swigCPtr, this, CPKIFEncryptedContentInfoPtr.getCPtr(buf), buf);
00092   }
00093 
00094   public CPKIFEncryptedContentInfoPtr GetEncryptedData() {
00095     return new CPKIFEncryptedContentInfoPtr(pkif_moduleJNI.CPKIFEnvelopedData_GetEncryptedData(swigCPtr, this), true);
00096   }
00097 
00098   public void AddUnprotectedAttribute(CPKIFAttributePtr attr) {
00099     pkif_moduleJNI.CPKIFEnvelopedData_AddUnprotectedAttribute(swigCPtr, this, CPKIFAttributePtr.getCPtr(attr), attr);
00100   }
00101 
00102   public void GetUnprotectedAttributes(SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_PKIFAllocT_boost__shared_ptrT_CPKIFAttribute_t_t_t ual) {
00103     pkif_moduleJNI.CPKIFEnvelopedData_GetUnprotectedAttributes(swigCPtr, this, SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_PKIFAllocT_boost__shared_ptrT_CPKIFAttribute_t_t_t.getCPtr(ual));
00104   }
00105 
00106   public void GetEncodedUnprotectedAttributes(CPKIFBufferPtr buf) {
00107     pkif_moduleJNI.CPKIFEnvelopedData_GetEncodedUnprotectedAttributes(swigCPtr, this, CPKIFBufferPtr.getCPtr(buf), buf);
00108   }
00109 
00110   public void _GetUnprotectedAttributes(SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_t attrVector) {
00111     pkif_moduleJNI.CPKIFEnvelopedData__GetUnprotectedAttributes(swigCPtr, this, SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_t.getCPtr(attrVector));
00112   }
00113 
00114   public void ClearContent() {
00115     pkif_moduleJNI.CPKIFEnvelopedData_ClearContent(swigCPtr, this);
00116   }
00117 
00118   public void SetAlgorithmAndMode(SYMKEY_ALG alg, SYMKEY_MODE mode) {
00119     pkif_moduleJNI.CPKIFEnvelopedData_SetAlgorithmAndMode(swigCPtr, this, alg.swigValue(), mode.swigValue());
00120   }
00121 
00122   public SYMKEY_ALG GetAlgorithm() {
00123     return SYMKEY_ALG.swigToEnum(pkif_moduleJNI.CPKIFEnvelopedData_GetAlgorithm(swigCPtr, this));
00124   }
00125 
00126   public SYMKEY_MODE GetMode() {
00127     return SYMKEY_MODE.swigToEnum(pkif_moduleJNI.CPKIFEnvelopedData_GetMode(swigCPtr, this));
00128   }
00129 
00130   public CPKIFBufferPtr Encode() {
00131     return new CPKIFBufferPtr(pkif_moduleJNI.CPKIFEnvelopedData_Encode(swigCPtr, this), true);
00132   }
00133 
00134   public void Decode(CPKIFBufferPtr buf) {
00135     pkif_moduleJNI.CPKIFEnvelopedData_Decode(swigCPtr, this, CPKIFBufferPtr.getCPtr(buf), buf);
00136   }
00137 
00138   public void SetPathSettings(CPKIFPathSettingsPtr settings) {
00139     pkif_moduleJNI.CPKIFEnvelopedData_SetPathSettings(swigCPtr, this, CPKIFPathSettingsPtr.getCPtr(settings), settings);
00140   }
00141 
00142   public CPKIFBufferPtr Decrypt(CPKIFCredentialPtr cred) {
00143     return new CPKIFBufferPtr(pkif_moduleJNI.CPKIFEnvelopedData_Decrypt__SWIG_0(swigCPtr, this, CPKIFCredentialPtr.getCPtr(cred), cred), true);
00144   }
00145 
00146   public CPKIFBufferPtr Decrypt(CPKIFKEKRecipInfoDetailsPtr kek) {
00147     return new CPKIFBufferPtr(pkif_moduleJNI.CPKIFEnvelopedData_Decrypt__SWIG_1(swigCPtr, this, CPKIFKEKRecipInfoDetailsPtr.getCPtr(kek), kek), true);
00148   }
00149 
00150   public void GetAddedUnprotectedAttributes(SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_t attr) {
00151     pkif_moduleJNI.CPKIFEnvelopedData_GetAddedUnprotectedAttributes(swigCPtr, this, SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_t.getCPtr(attr));
00152   }
00153 
00154   public void SetMediator(IPKIFColleaguePtr m) {
00155     pkif_moduleJNI.CPKIFEnvelopedData_SetMediator(swigCPtr, this, IPKIFColleaguePtr.getCPtr(m), m);
00156   }
00157 
00158   public IPKIFColleaguePtr GetMediator() {
00159     return new IPKIFColleaguePtr(pkif_moduleJNI.CPKIFEnvelopedData_GetMediator(swigCPtr, this), true);
00160   }
00161 
00162   public final static class CMSVersion {
00163     public final static CMSVersion CMSv0 = new CMSVersion("CMSv0", pkif_moduleJNI.CPKIFEnvelopedData_CMSv0_get());
00164     public final static CMSVersion CMSv1 = new CMSVersion("CMSv1", pkif_moduleJNI.CPKIFEnvelopedData_CMSv1_get());
00165     public final static CMSVersion CMSv2 = new CMSVersion("CMSv2", pkif_moduleJNI.CPKIFEnvelopedData_CMSv2_get());
00166     public final static CMSVersion CMSv3 = new CMSVersion("CMSv3", pkif_moduleJNI.CPKIFEnvelopedData_CMSv3_get());
00167     public final static CMSVersion CMSv4 = new CMSVersion("CMSv4", pkif_moduleJNI.CPKIFEnvelopedData_CMSv4_get());
00168 
00169     public final int swigValue() {
00170       return swigValue;
00171     }
00172 
00173     public String toString() {
00174       return swigName;
00175     }
00176 
00177     public static CMSVersion swigToEnum(int swigValue) {
00178       if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
00179         return swigValues[swigValue];
00180       for (int i = 0; i < swigValues.length; i++)
00181         if (swigValues[i].swigValue == swigValue)
00182           return swigValues[i];
00183       throw new IllegalArgumentException("No enum " + CMSVersion.class + " with value " + swigValue);
00184     }
00185 
00186     private CMSVersion(String swigName) {
00187       this.swigName = swigName;
00188       this.swigValue = swigNext++;
00189     }
00190 
00191     private CMSVersion(String swigName, int swigValue) {
00192       this.swigName = swigName;
00193       this.swigValue = swigValue;
00194       swigNext = swigValue+1;
00195     }
00196 
00197     private CMSVersion(String swigName, CMSVersion swigEnum) {
00198       this.swigName = swigName;
00199       this.swigValue = swigEnum.swigValue;
00200       swigNext = this.swigValue+1;
00201     }
00202 
00203     private static CMSVersion[] swigValues = { CMSv0, CMSv1, CMSv2, CMSv3, CMSv4 };
00204     private static int swigNext = 0;
00205     private final int swigValue;
00206     private final String swigName;
00207   }
00208 
00209 }

Generated on Mon Nov 15 11:15:48 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6