pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1677891 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel: ./ interactive/digitalsignature/
Date Tue, 05 May 2015 21:18:09 GMT
Author: tilman
Date: Tue May  5 21:18:09 2015
New Revision: 1677891

URL: http://svn.apache.org/r1677891
Log:
PDFBOX-2783: Use getCOSObject() instead of getDictionary()

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDPropBuild.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDPropBuildDataDict.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValue.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValueMDP.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValueTimeStamp.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java?rev=1677891&r1=1677890&r2=1677891&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java Tue May  5
21:18:09 2015
@@ -287,7 +287,7 @@ public class PDDocument implements Close
             if (pdField instanceof PDSignatureField)
             {
                 PDSignature signature = ((PDSignatureField) pdField).getSignature();
-                if (signature != null && signature.getDictionary().equals(sigObject.getDictionary()))
+                if (signature != null && signature.getCOSObject().equals(sigObject.getCOSObject()))
                 {
                     signatureField = (PDSignatureField) pdField;
                 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDPropBuild.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDPropBuild.java?rev=1677891&r1=1677890&r2=1677891&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDPropBuild.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDPropBuild.java
Tue May  5 21:18:09 2015
@@ -57,21 +57,11 @@ public class PDPropBuild implements COSO
     }
 
     /**
-     * Convert this standard java object to a COS object.
-     *
-     * @return The cos object that matches this Java object.
-     */
-    public COSBase getCOSObject()
-    {
-        return getDictionary();
-    }
-
-    /**
      * Convert this standard java object to a COS dictionary.
      *
      * @return The COS dictionary that matches this Java object.
      */
-    public COSDictionary getDictionary()
+    public COSDictionary getCOSObject()
     {
         return dictionary;
     }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDPropBuildDataDict.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDPropBuildDataDict.java?rev=1677891&r1=1677890&r2=1677891&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDPropBuildDataDict.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDPropBuildDataDict.java
Tue May  5 21:18:09 2015
@@ -51,23 +51,12 @@ public class PDPropBuildDataDict impleme
         dictionary.setDirect(true); // the specification claim to use direct objects
     }
 
-
-    /**
-     * Convert this standard java object to a COS object.
-     *
-     * @return The cos object that matches this Java object.
-     */
-    public COSBase getCOSObject()
-    {
-        return getDictionary();
-    }
-
     /**
      * Convert this standard java object to a COS dictionary.
      *
      * @return The COS dictionary that matches this Java object.
      */
-    public COSDictionary getDictionary()
+    public COSDictionary getCOSObject()
     {
         return dictionary;
     }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValue.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValue.java?rev=1677891&r1=1677890&r2=1677891&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValue.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValue.java
Tue May  5 21:18:09 2015
@@ -91,24 +91,13 @@ public class PDSeedValue implements COSO
         dictionary.setDirect(true); // the specification claim to use direct objects
     }
 
-
-    /**
-     * Convert this standard java object to a COS object.
-     *
-     * @return The cos object that matches this Java object.
-     */
-    @Override
-    public COSBase getCOSObject()
-    {
-        return getDictionary();
-    }
-
     /**
      * Convert this standard java object to a COS dictionary.
      *
      * @return The COS dictionary that matches this Java object.
      */
-    public COSDictionary getDictionary()
+    @Override
+    public COSDictionary getCOSObject()
     {
         return dictionary;
     }
@@ -119,7 +108,7 @@ public class PDSeedValue implements COSO
      */
     public boolean isFilterRequired()
     {
-        return getDictionary().getFlag( COSName.FF, FLAG_FILTER);
+        return getCOSObject().getFlag( COSName.FF, FLAG_FILTER);
     }
 
     /**
@@ -129,7 +118,7 @@ public class PDSeedValue implements COSO
      */
     public void setFilterRequired(boolean flag)
     {
-        getDictionary().setFlag( COSName.FF, FLAG_FILTER, flag);
+        getCOSObject().setFlag( COSName.FF, FLAG_FILTER, flag);
     }
 
     /**
@@ -138,7 +127,7 @@ public class PDSeedValue implements COSO
      */
     public boolean isSubFilterRequired()
     {
-        return getDictionary().getFlag( COSName.FF, FLAG_SUBFILTER);
+        return getCOSObject().getFlag( COSName.FF, FLAG_SUBFILTER);
     }
 
     /**
@@ -148,7 +137,7 @@ public class PDSeedValue implements COSO
      */
     public void setSubFilterRequired(boolean flag)
     {
-        getDictionary().setFlag( COSName.FF, FLAG_SUBFILTER, flag);
+        getCOSObject().setFlag( COSName.FF, FLAG_SUBFILTER, flag);
     }
 
     /**
@@ -157,7 +146,7 @@ public class PDSeedValue implements COSO
     */
     public boolean isDigestMethodRequired()
     {
-        return getDictionary().getFlag( COSName.FF, FLAG_DIGEST_METHOD);
+        return getCOSObject().getFlag( COSName.FF, FLAG_DIGEST_METHOD);
     }
 
     /**
@@ -167,7 +156,7 @@ public class PDSeedValue implements COSO
      */
     public void setDigestMethodRequired(boolean flag)
     {
-        getDictionary().setFlag( COSName.FF, FLAG_DIGEST_METHOD, flag);
+        getCOSObject().setFlag( COSName.FF, FLAG_DIGEST_METHOD, flag);
     }
 
     /**
@@ -176,7 +165,7 @@ public class PDSeedValue implements COSO
     */
     public boolean isVRequired()
     {
-        return getDictionary().getFlag( COSName.FF, FLAG_V);
+        return getCOSObject().getFlag( COSName.FF, FLAG_V);
     }
 
     /**
@@ -186,7 +175,7 @@ public class PDSeedValue implements COSO
      */
     public void setVRequired(boolean flag)
     {
-        getDictionary().setFlag( COSName.FF, FLAG_V, flag);
+        getCOSObject().setFlag( COSName.FF, FLAG_V, flag);
     }
 
     /**
@@ -195,7 +184,7 @@ public class PDSeedValue implements COSO
     */
     public boolean isReasonRequired()
     {
-        return getDictionary().getFlag( COSName.FF, FLAG_REASON);
+        return getCOSObject().getFlag( COSName.FF, FLAG_REASON);
     }
 
     /**
@@ -205,7 +194,7 @@ public class PDSeedValue implements COSO
      */
     public void setReasonRequired(boolean flag)
     {
-        getDictionary().setFlag( COSName.FF, FLAG_REASON, flag);
+        getCOSObject().setFlag( COSName.FF, FLAG_REASON, flag);
     }
 
     /**
@@ -214,7 +203,7 @@ public class PDSeedValue implements COSO
     */
     public boolean isLegalAttestationRequired()
     {
-        return getDictionary().getFlag( COSName.FF, FLAG_LEGAL_ATTESTATION);
+        return getCOSObject().getFlag( COSName.FF, FLAG_LEGAL_ATTESTATION);
     }
 
     /**
@@ -224,7 +213,7 @@ public class PDSeedValue implements COSO
      */
     public void setLegalAttestationRequired(boolean flag)
     {
-        getDictionary().setFlag( COSName.FF, FLAG_LEGAL_ATTESTATION, flag);
+        getCOSObject().setFlag( COSName.FF, FLAG_LEGAL_ATTESTATION, flag);
     }
 
     /**
@@ -233,7 +222,7 @@ public class PDSeedValue implements COSO
     */
     public boolean isAddRevInfoRequired()
     {
-        return getDictionary().getFlag( COSName.FF, FLAG_ADD_REV_INFO);
+        return getCOSObject().getFlag( COSName.FF, FLAG_ADD_REV_INFO);
     }
 
     /**
@@ -243,7 +232,7 @@ public class PDSeedValue implements COSO
      */
     public void setAddRevInfoRequired(boolean flag)
     {
-        getDictionary().setFlag( COSName.FF, FLAG_ADD_REV_INFO, flag);
+        getCOSObject().setFlag( COSName.FF, FLAG_ADD_REV_INFO, flag);
     }
 
     /**

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValueMDP.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValueMDP.java?rev=1677891&r1=1677890&r2=1677891&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValueMDP.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValueMDP.java
Tue May  5 21:18:09 2015
@@ -50,23 +50,12 @@ public class PDSeedValueMDP
         dictionary.setDirect(true);
     }
 
-
-    /**
-     * Convert this standard java object to a COS object.
-     *
-     * @return The cos object that matches this Java object.
-     */
-    public COSBase getCOSObject()
-    {
-        return getDictionary();
-    }
-
     /**
      * Convert this standard java object to a COS dictionary.
      *
      * @return The COS dictionary that matches this Java object.
      */
-    public COSDictionary getDictionary()
+    public COSDictionary getCOSObject()
     {
         return dictionary;
     }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValueTimeStamp.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValueTimeStamp.java?rev=1677891&r1=1677890&r2=1677891&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValueTimeStamp.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValueTimeStamp.java
Tue May  5 21:18:09 2015
@@ -50,23 +50,12 @@ public class PDSeedValueTimeStamp
         dictionary.setDirect(true);
     }
 
-
-    /**
-     * Convert this standard java object to a COS object.
-     *
-     * @return The cos object that matches this Java object.
-     */
-    public COSBase getCOSObject()
-    {
-        return getDictionary();
-    }
-
     /**
      * Convert this standard java object to a COS dictionary.
      *
      * @return The COS dictionary that matches this Java object.
      */
-    public COSDictionary getDictionary()
+    public COSDictionary getCOSObject()
     {
         return dictionary;
     }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature.java?rev=1677891&r1=1677890&r2=1677891&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature.java
Tue May  5 21:18:09 2015
@@ -99,22 +99,11 @@ public class PDSignature implements COSO
     }
 
     /**
-     * Convert this standard java object to a COS object.
-     *
-     * @return The cos object that matches this Java object.
-     */
-    @Override
-    public COSBase getCOSObject()
-    {
-        return getDictionary();
-    }
-
-    /**
      * Convert this standard java object to a COS dictionary.
      *
      * @return The COS dictionary that matches this Java object.
      */
-    public COSDictionary getDictionary()
+    public COSDictionary getCOSObject()
     {
         return dictionary;
     }



Mime
View raw message