author | mullan |
Mon, 26 Sep 2011 17:20:45 -0700 | |
changeset 10694 | cf59e2badd14 |
parent 2 | 90ce3da70b43 |
child 18780 | f47b920867e7 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
2 |
* reserved comment block |
|
3 |
* DO NOT REMOVE OR ALTER! |
|
4 |
*/ |
|
5 |
/* |
|
6 |
* Copyright 2003-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.encryption; |
|
22 |
||
23 |
||
24 |
import java.util.Iterator; |
|
25 |
||
26 |
||
27 |
/** |
|
28 |
* <code>ReferenceList</code> is an element that contains pointers from a key |
|
29 |
* value of an <code>EncryptedKey</code> to items encrypted by that key value |
|
30 |
* (<code>EncryptedData</code> or <code>EncryptedKey</code> elements). |
|
31 |
* <p> |
|
32 |
* It is defined as follows: |
|
33 |
* <xmp> |
|
34 |
* <element name='ReferenceList'> |
|
35 |
* <complexType> |
|
36 |
* <choice minOccurs='1' maxOccurs='unbounded'> |
|
37 |
* <element name='DataReference' type='xenc:ReferenceType'/> |
|
38 |
* <element name='KeyReference' type='xenc:ReferenceType'/> |
|
39 |
* </choice> |
|
40 |
* </complexType> |
|
41 |
* </element> |
|
42 |
* </xmp> |
|
43 |
* |
|
44 |
* @author Axl Mattheus |
|
45 |
* @see Reference |
|
46 |
*/ |
|
47 |
public interface ReferenceList { |
|
48 |
/** DATA TAG */ |
|
49 |
public static final int DATA_REFERENCE = 0x00000001; |
|
50 |
/** KEY TAG */ |
|
51 |
public static final int KEY_REFERENCE = 0x00000002; |
|
52 |
||
53 |
/** |
|
54 |
* Adds a reference to this reference list. |
|
55 |
* |
|
56 |
* @param reference the reference to add. |
|
57 |
* @throws IllegalAccessException if the <code>Reference</code> is not an |
|
58 |
* instance of <code>DataReference</code> or <code>KeyReference</code>. |
|
59 |
*/ |
|
60 |
public void add(Reference reference); |
|
61 |
||
62 |
/** |
|
63 |
* Removes a reference from the <code>ReferenceList</code>. |
|
64 |
* |
|
65 |
* @param reference the reference to remove. |
|
66 |
*/ |
|
67 |
public void remove(Reference reference); |
|
68 |
||
69 |
/** |
|
70 |
* Returns the size of the <code>ReferenceList</code>. |
|
71 |
* |
|
72 |
* @return the size of the <code>ReferenceList</code>. |
|
73 |
*/ |
|
74 |
public int size(); |
|
75 |
||
76 |
/** |
|
77 |
* Indicates if the <code>ReferenceList</code> is empty. |
|
78 |
* |
|
79 |
* @return <code><b>true</b></code> if the <code>ReferenceList</code> is |
|
80 |
* empty, else <code><b>false</b></code>. |
|
81 |
*/ |
|
82 |
public boolean isEmpty(); |
|
83 |
||
84 |
/** |
|
85 |
* Returns an <code>Iterator</code> over all the <code>Reference</code>s |
|
86 |
* contatined in this <code>ReferenceList</code>. |
|
87 |
* |
|
88 |
* @return Iterator. |
|
89 |
*/ |
|
10694
cf59e2badd14
7088502: Security libraries don't build with javac -Werror
mullan
parents:
2
diff
changeset
|
90 |
public Iterator<Reference> getReferences(); |
2 | 91 |
|
92 |
/** |
|
93 |
* <code>DataReference</code> factory method. Returns a |
|
94 |
* <code>DataReference</code>. |
|
95 |
* @param uri |
|
96 |
* @return |
|
97 |
*/ |
|
98 |
public Reference newDataReference(String uri); |
|
99 |
||
100 |
/** |
|
101 |
* <code>KeyReference</code> factory method. Returns a |
|
102 |
* <code>KeyReference</code>. |
|
103 |
* @param uri |
|
104 |
* @return |
|
105 |
*/ |
|
106 |
public Reference newKeyReference(String uri); |
|
107 |
} |