KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > org > apache > xml > internal > security > encryption > Reference


1 /*
2  * Copyright 2003-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */

17 package com.sun.org.apache.xml.internal.security.encryption;
18
19
20 import java.util.Iterator JavaDoc;
21 import org.w3c.dom.Element JavaDoc;
22
23
24 /**
25  * A wrapper for a pointer from a key value of an <code>EncryptedKey</code> to
26  * items encrypted by that key value (<code>EncryptedData</code> or
27  * <code>EncryptedKey</code> elements).
28  * <p>
29  * It is defined as follows:
30  * <xmp>
31  * <complexType name='ReferenceType'>
32  * <sequence>
33  * <any namespace='##other' minOccurs='0' maxOccurs='unbounded'/>
34  * </sequence>
35  * <attribute name='URI' type='anyURI' use='required'/>
36  * </complexType>
37  * </xmp>
38  *
39  * @author Axl Mattheus
40  * @see ReferenceList
41  */

42 public interface Reference {
43     /**
44      * Returns a <code>URI</code> that points to an <code>Element</code> that
45      * were encrypted using the key defined in the enclosing
46      * <code>EncryptedKey</code> element.
47      *
48      * @return an Uniform Resource Identifier that qualifies an
49      * <code>EncryptedType</code>.
50      */

51     String JavaDoc getURI();
52
53     /**
54      * Sets a <code>URI</code> that points to an <code>Element</code> that
55      * were encrypted using the key defined in the enclosing
56      * <code>EncryptedKey</code> element.
57      *
58      * @param uri the Uniform Resource Identifier that qualifies an
59      * <code>EncryptedType</code>.
60      */

61     void setURI(String JavaDoc uri);
62
63     /**
64      * Returns an <code>Iterator</code> over all the child elements contained in
65      * this <code>Reference</code> that will aid the recipient in retrieving the
66      * <code>EncryptedKey</code> and/or <code>EncryptedData</code> elements.
67      * These could include information such as XPath transforms, decompression
68      * transforms, or information on how to retrieve the elements from a
69      * document storage facility.
70      *
71      * @return child elements.
72      */

73     Iterator JavaDoc getElementRetrievalInformation();
74
75     /**
76      * Adds retrieval information.
77      *
78      * @param info.
79      */

80     void addElementRetrievalInformation(Element JavaDoc info);
81
82     /**
83      * Removes the specified retrieval information.
84      *
85      * @param info.
86      */

87     void removeElementRetrievalInformation(Element JavaDoc info);
88 }
89
Popular Tags