KickJava   Java API By Example, From Geeks To Geeks.

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


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  * Additional information items concerning the generation of the
25  * <code>EncryptedData</code> or <code>EncryptedKey</code> can be placed in an
26  * <code>EncryptionProperty</code> element (e.g., date/time stamp or the serial
27  * number of cryptographic hardware used during encryption). The Target
28  * attribute identifies the <code>EncryptedType</code> structure being
29  * described. anyAttribute permits the inclusion of attributes from the XML
30  * namespace to be included (i.e., <code>xml:space</code>,
31  * <code>xml:lang</code>, and <code>xml:base</code>).
32  * <p>
33  * It is defined as follows:
34  * <xmp>
35  * <element name='EncryptionProperty' type='xenc:EncryptionPropertyType'/>
36  * <complexType name='EncryptionPropertyType' mixed='true'>
37  * <choice maxOccurs='unbounded'>
38  * <any namespace='##other' processContents='lax'/>
39  * </choice>
40  * <attribute name='Target' type='anyURI' use='optional'/>
41  * <attribute name='Id' type='ID' use='optional'/>
42  * <anyAttribute namespace="http://www.w3.org/XML/1998/namespace"/>
43  * </complexType>
44  * </xmp>
45  *
46  * @author Axl Mattheus
47  */

48 public interface EncryptionProperty {
49     /**
50      * Returns the <code>EncryptedType</code> being described.
51      *
52      * @return the <code>EncryptedType</code> being described by this
53      * <code>EncryptionProperty</code>.
54      */

55     String JavaDoc getTarget();
56
57     /**
58      * Sets the target.
59      *
60      * @param target.
61      */

62     void setTarget(String JavaDoc target);
63
64     /**
65      * Returns the id of the <CODE>EncryptionProperty</CODE>.
66      *
67      * @return the id.
68      */

69     String JavaDoc getId();
70
71     /**
72      * Sets the id.
73      *
74      * @param id.
75      */

76     void setId(String JavaDoc id);
77
78     /**
79      * Returns the attribute's value in the <code>xml</code> namespace.
80      *
81      * @param attribute
82      * @return the attribute's value.
83      */

84     String JavaDoc getAttribute(String JavaDoc attribute);
85
86     /**
87      * Set the attribute value.
88      *
89      * @param attribute the attribute's name.
90      * @param value the attribute's value.
91      */

92     void setAttribute(String JavaDoc attribute, String JavaDoc value);
93
94     /**
95      * Returns the properties of the <CODE>EncryptionProperty</CODE>.
96      *
97      * @return an <code>Iterator</code> over all the addiitonal encryption
98      * information contained in this class.
99      */

100     Iterator JavaDoc getEncryptionInformation();
101
102     /**
103      * Adds encryption information.
104      *
105      * @param information the additional encryption information.
106      */

107     void addEncryptionInformation(Element JavaDoc information);
108
109     /**
110      * Removes encryption information.
111      *
112      * @param information the information to remove.
113      */

114     void removeEncryptionInformation(Element JavaDoc information);
115 }
116
Popular Tags