Home » pdfbox-1.1.0-src » org.apache.pdfbox.pdmodel.encryption » [javadoc | source]

    1   /*
    2    * Licensed to the Apache Software Foundation (ASF) under one or more
    3    * contributor license agreements.  See the NOTICE file distributed with
    4    * this work for additional information regarding copyright ownership.
    5    * The ASF licenses this file to You under the Apache License, Version 2.0
    6    * (the "License"); you may not use this file except in compliance with
    7    * the License.  You may obtain a copy of the License at
    8    *
    9    *      http://www.apache.org/licenses/LICENSE-2.0
   10    *
   11    * Unless required by applicable law or agreed to in writing, software
   12    * distributed under the License is distributed on an "AS IS" BASIS,
   13    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   14    * See the License for the specific language governing permissions and
   15    * limitations under the License.
   16    */
   17   package org.apache.pdfbox.pdmodel.encryption;
   18   
   19   import java.security.cert.X509Certificate;
   20   
   21   /**
   22    * Represents a recipient in the public key protection policy.
   23    *
   24    * @see PublicKeyProtectionPolicy
   25    *
   26    * @author Benoit Guillon (benoit.guillon@snv.jussieu.fr)
   27    *
   28    * @version $Revision: 1.2 $
   29    */
   30   public class PublicKeyRecipient
   31   {
   32       private X509Certificate x509;
   33   
   34       private AccessPermission permission;
   35   
   36       /**
   37        * Returns the X509 certificate of the recipient.
   38        *
   39        * @return The X509 certificate
   40        */
   41       public X509Certificate getX509()
   42       {
   43           return x509;
   44       }
   45   
   46       /**
   47        * Set the X509 certificate of the recipient.
   48        *
   49        * @param aX509 The X509 certificate
   50        */
   51       public void setX509(X509Certificate aX509)
   52       {
   53           this.x509 = aX509;
   54       }
   55   
   56       /**
   57        * Returns the access permission granted to the recipient.
   58        *
   59        * @return The access permission object.
   60        */
   61       public AccessPermission getPermission()
   62       {
   63           return permission;
   64       }
   65   
   66       /**
   67        * Set the access permission granted to the recipient.
   68        *
   69        * @param permissions The permission to set.
   70        */
   71       public void setPermission(AccessPermission permissions)
   72       {
   73           this.permission = permissions;
   74       }
   75   }

Home » pdfbox-1.1.0-src » org.apache.pdfbox.pdmodel.encryption » [javadoc | source]