KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > org > apache > xml > internal > security > signature > MissingResourceFailureException


1
2 /*
3  * Copyright 1999-2004 The Apache Software Foundation.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * 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  */

18 package com.sun.org.apache.xml.internal.security.signature;
19
20
21
22
23
24 /**
25  * Thrown by {@link com.sun.org.apache.xml.internal.security.signature.SignedInfo#verify()} when
26  * testing the signature fails because of uninitialized
27  * {@link com.sun.org.apache.xml.internal.security.signature.Reference}s.
28  *
29  * @author Christian Geuer-Pollmann
30  * @see ReferenceNotInitializedException
31  */

32 public class MissingResourceFailureException extends XMLSignatureException {
33
34    /**
35      *
36      */

37     private static final long serialVersionUID = 1L;
38    /** Field uninitializedReference */
39    Reference uninitializedReference = null;
40
41    /**
42     * MissingKeyResourceFailureException constructor.
43     * @param _msgID
44     * @param reference
45     * @see #getReference
46     */

47    public MissingResourceFailureException(String JavaDoc _msgID, Reference reference) {
48
49       super(_msgID);
50
51       this.uninitializedReference = reference;
52    }
53
54    /**
55     * Constructor MissingResourceFailureException
56     *
57     * @param _msgID
58     * @param exArgs
59     * @param reference
60     * @see #getReference
61     */

62    public MissingResourceFailureException(String JavaDoc _msgID, Object JavaDoc exArgs[],
63                                           Reference reference) {
64
65       super(_msgID, exArgs);
66
67       this.uninitializedReference = reference;
68    }
69
70    /**
71     * Constructor MissingResourceFailureException
72     *
73     * @param _msgID
74     * @param _originalException
75     * @param reference
76     * @see #getReference
77     */

78    public MissingResourceFailureException(String JavaDoc _msgID,
79                                           Exception JavaDoc _originalException,
80                                           Reference reference) {
81
82       super(_msgID, _originalException);
83
84       this.uninitializedReference = reference;
85    }
86
87    /**
88     * Constructor MissingResourceFailureException
89     *
90     * @param _msgID
91     * @param exArgs
92     * @param _originalException
93     * @param reference
94     * @see #getReference
95     */

96    public MissingResourceFailureException(String JavaDoc _msgID, Object JavaDoc exArgs[],
97                                           Exception JavaDoc _originalException,
98                                           Reference reference) {
99
100       super(_msgID, exArgs, _originalException);
101
102       this.uninitializedReference = reference;
103    }
104
105    /**
106     * used to set the uninitialized {@link com.sun.org.apache.xml.internal.security.signature.Reference}
107     *
108     * @param reference the Reference object
109     * @see #getReference
110     */

111    public void setReference(Reference reference) {
112       this.uninitializedReference = reference;
113    }
114
115    /**
116     * used to get the uninitialized {@link com.sun.org.apache.xml.internal.security.signature.Reference}
117     *
118     * This allows to supply the correct {@link com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput}
119     * to the {@link com.sun.org.apache.xml.internal.security.signature.Reference} to try again verification.
120     *
121     * @return the Reference object
122     * @see #setReference
123     */

124    public Reference getReference() {
125       return this.uninitializedReference;
126    }
127 }
128
Popular Tags