src/share/classes/com/sun/org/apache/xml/internal/security/signature/MissingResourceFailureException.java

Print this page


   1 /*
   2  * reserved comment block
   3  * DO NOT REMOVE OR ALTER!
   4  */
   5 /*
   6  * Copyright  1999-2004 The Apache Software Foundation.
   7  *
   8  *  Licensed under the Apache License, Version 2.0 (the "License");
   9  *  you may not use this file except in compliance with the License.
  10  *  You may obtain a copy of the License at


  11  *
  12  *      http://www.apache.org/licenses/LICENSE-2.0
  13  *
  14  *  Unless required by applicable law or agreed to in writing, software
  15  *  distributed under the License is distributed on an "AS IS" BASIS,
  16  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17  *  See the License for the specific language governing permissions and
  18  *  limitations under the License.
  19  *
  20  */
  21 package com.sun.org.apache.xml.internal.security.signature;
  22 
  23 
  24 
  25 
  26 
  27 /**
  28  * Thrown by {@link com.sun.org.apache.xml.internal.security.signature.SignedInfo#verify()} when
  29  * testing the signature fails because of uninitialized
  30  * {@link com.sun.org.apache.xml.internal.security.signature.Reference}s.
  31  *
  32  * @author Christian Geuer-Pollmann
  33  * @see ReferenceNotInitializedException
  34  */
  35 public class MissingResourceFailureException extends XMLSignatureException {
  36 
  37    /**
  38          *
  39          */
  40         private static final long serialVersionUID = 1L;

  41    /** Field uninitializedReference */
  42    Reference uninitializedReference = null;
  43 
  44    /**
  45     * MissingKeyResourceFailureException constructor.
  46     * @param _msgID
  47     * @param reference
  48     * @see #getReference
  49     */
  50    public MissingResourceFailureException(String _msgID, Reference reference) {
  51 
  52       super(_msgID);
  53 
  54       this.uninitializedReference = reference;
  55    }
  56 
  57    /**
  58     * Constructor MissingResourceFailureException
  59     *
  60     * @param _msgID
  61     * @param exArgs
  62     * @param reference
  63     * @see #getReference
  64     */
  65    public MissingResourceFailureException(String _msgID, Object exArgs[],
  66                                           Reference reference) {
  67 
  68       super(_msgID, exArgs);
  69 
  70       this.uninitializedReference = reference;
  71    }
  72 
  73    /**
  74     * Constructor MissingResourceFailureException
  75     *
  76     * @param _msgID
  77     * @param _originalException
  78     * @param reference
  79     * @see #getReference
  80     */
  81    public MissingResourceFailureException(String _msgID,
  82                                           Exception _originalException,
  83                                           Reference reference) {
  84 
  85       super(_msgID, _originalException);
  86 
  87       this.uninitializedReference = reference;
  88    }
  89 
  90    /**
  91     * Constructor MissingResourceFailureException
  92     *
  93     * @param _msgID
  94     * @param exArgs
  95     * @param _originalException
  96     * @param reference
  97     * @see #getReference
  98     */
  99    public MissingResourceFailureException(String _msgID, Object exArgs[],
 100                                           Exception _originalException,
 101                                           Reference reference) {
 102 
 103       super(_msgID, exArgs, _originalException);
 104 
 105       this.uninitializedReference = reference;
 106    }
 107 
 108    /**
 109     * used to set the uninitialized {@link com.sun.org.apache.xml.internal.security.signature.Reference}
 110     *
 111     * @param reference the Reference object
 112     * @see #getReference
 113     */
 114    public void setReference(Reference reference) {
 115       this.uninitializedReference = reference;
 116    }
 117 
 118    /**
 119     * used to get the uninitialized {@link com.sun.org.apache.xml.internal.security.signature.Reference}
 120     *
 121     * This allows to supply the correct {@link com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput}
 122     * to the {@link com.sun.org.apache.xml.internal.security.signature.Reference} to try again verification.
 123     *
   1 /*
   2  * reserved comment block
   3  * DO NOT REMOVE OR ALTER!
   4  */
   5 /**
   6  * Licensed to the Apache Software Foundation (ASF) under one
   7  * or more contributor license agreements. See the NOTICE file
   8  * distributed with this work for additional information
   9  * regarding copyright ownership. The ASF licenses this file
  10  * to you under the Apache License, Version 2.0 (the
  11  * "License"); you may not use this file except in compliance
  12  * with the License. You may obtain a copy of the License at
  13  *
  14  * http://www.apache.org/licenses/LICENSE-2.0
  15  *
  16  * Unless required by applicable law or agreed to in writing,
  17  * software distributed under the License is distributed on an
  18  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  19  * KIND, either express or implied. See the License for the
  20  * specific language governing permissions and limitations
  21  * under the License.
  22  */
  23 package com.sun.org.apache.xml.internal.security.signature;
  24 




  25 /**
  26  * Thrown by {@link com.sun.org.apache.xml.internal.security.signature.SignedInfo#verify()} when
  27  * testing the signature fails because of uninitialized
  28  * {@link com.sun.org.apache.xml.internal.security.signature.Reference}s.
  29  *
  30  * @author Christian Geuer-Pollmann
  31  * @see ReferenceNotInitializedException
  32  */
  33 public class MissingResourceFailureException extends XMLSignatureException {
  34 
  35     /**
  36      * 
  37      */
  38     private static final long serialVersionUID = 1L;
  39     
  40     /** Field uninitializedReference */
  41     private Reference uninitializedReference = null;
  42 
  43     /**
  44      * MissingKeyResourceFailureException constructor.
  45      * @param msgID
  46      * @param reference
  47      * @see #getReference
  48      */
  49     public MissingResourceFailureException(String msgID, Reference reference) {
  50         super(msgID);

  51 
  52         this.uninitializedReference = reference;
  53     }
  54 
  55     /**
  56      * Constructor MissingResourceFailureException
  57      *
  58      * @param msgID
  59      * @param exArgs
  60      * @param reference
  61      * @see #getReference
  62      */
  63     public MissingResourceFailureException(String msgID, Object exArgs[], Reference reference) {
  64         super(msgID, exArgs);


  65 
  66         this.uninitializedReference = reference;
  67     }
  68 
  69     /**
  70      * Constructor MissingResourceFailureException
  71      *
  72      * @param msgID
  73      * @param originalException
  74      * @param reference
  75      * @see #getReference
  76      */
  77     public MissingResourceFailureException(
  78         String msgID, Exception originalException, Reference reference
  79     ) {
  80         super(msgID, originalException);

  81 
  82         this.uninitializedReference = reference;
  83     }
  84 
  85     /**
  86      * Constructor MissingResourceFailureException
  87      *
  88      * @param msgID
  89      * @param exArgs
  90      * @param originalException
  91      * @param reference
  92      * @see #getReference
  93      */
  94     public MissingResourceFailureException(
  95         String msgID, Object exArgs[], Exception originalException, Reference reference
  96     ) {
  97         super(msgID, exArgs, originalException);

  98 
  99         this.uninitializedReference = reference;
 100     }
 101 
 102     /**
 103      * used to set the uninitialized {@link com.sun.org.apache.xml.internal.security.signature.Reference}
 104      *
 105      * @param reference the Reference object
 106      * @see #getReference
 107      */
 108     public void setReference(Reference reference) {
 109         this.uninitializedReference = reference;
 110     }
 111 
 112     /**
 113      * used to get the uninitialized {@link com.sun.org.apache.xml.internal.security.signature.Reference}
 114      *
 115      * This allows to supply the correct {@link com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput}
 116      * to the {@link com.sun.org.apache.xml.internal.security.signature.Reference} to try again verification.
 117      *