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.encryption; 24 25 import java.util.Iterator; 26 import org.w3c.dom.Element; 27 28 /** 29 * Additional information items concerning the generation of the 30 * <code>EncryptedData</code> or <code>EncryptedKey</code> can be placed in an 31 * <code>EncryptionProperty</code> element (e.g., date/time stamp or the serial 32 * number of cryptographic hardware used during encryption). The Target 33 * attribute identifies the <code>EncryptedType</code> structure being 34 * described. anyAttribute permits the inclusion of attributes from the XML 35 * namespace to be included (i.e., <code>xml:space</code>, 36 * <code>xml:lang</code>, and <code>xml:base</code>). 37 * <p> 38 * It is defined as follows: 39 * <xmp> 40 * <element name='EncryptionProperty' type='xenc:EncryptionPropertyType'/> 41 * <complexType name='EncryptionPropertyType' mixed='true'> 42 * <choice maxOccurs='unbounded'> 43 * <any namespace='##other' processContents='lax'/> 44 * </choice> 45 * <attribute name='Target' type='anyURI' use='optional'/> 46 * <attribute name='Id' type='ID' use='optional'/> 47 * <anyAttribute namespace="http://www.w3.org/XML/1998/namespace"/> 48 * </complexType> 49 * </xmp> 50 * 51 * @author Axl Mattheus 52 */ 53 public interface EncryptionProperty { 54 55 /** 56 * Returns the <code>EncryptedType</code> being described. 57 * 58 * @return the <code>EncryptedType</code> being described by this 59 * <code>EncryptionProperty</code>. 60 */ 61 String getTarget(); 62 63 /** 64 * Sets the target. 65 * 66 * @param target 67 */ 68 void setTarget(String target); 69 70 /** 71 * Returns the id of the <CODE>EncryptionProperty</CODE>. 72 * 73 * @return the id. 74 */ 75 String getId(); 76 77 /** 78 * Sets the id. 79 * 80 * @param id 81 */ 82 void setId(String id); 83 84 /** 85 * Returns the attribute's value in the <code>xml</code> namespace. 86 * 87 * @param attribute 88 * @return the attribute's value. 89 */ 90 String getAttribute(String attribute); 91 92 /** 93 * Set the attribute value. 94 * 95 * @param attribute the attribute's name. 96 * @param value the attribute's value. 97 */ 98 void setAttribute(String attribute, String value); 99 100 /** 101 * Returns the properties of the <CODE>EncryptionProperty</CODE>. 102 * 103 * @return an <code>Iterator</code> over all the additional encryption 104 * information contained in this class. 105 */ 106 Iterator<Element> getEncryptionInformation(); 107 108 /** 109 * Adds encryption information. 110 * 111 * @param information the additional encryption information. 112 */ 113 void addEncryptionInformation(Element information); 114 115 /** 116 * Removes encryption information. 117 * 118 * @param information the information to remove. 119 */ 120 void removeEncryptionInformation(Element information); 121 } | 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.encryption; 24 25 import java.util.Iterator; 26 import org.w3c.dom.Element; 27 28 /** 29 * Additional information items concerning the generation of the 30 * {@code EncryptedData} or {@code EncryptedKey} can be placed in an 31 * {@code EncryptionProperty} element (e.g., date/time stamp or the serial 32 * number of cryptographic hardware used during encryption). The Target 33 * attribute identifies the {@code EncryptedType} structure being 34 * described. anyAttribute permits the inclusion of attributes from the XML 35 * namespace to be included (i.e., {@code xml:space}, 36 * {@code xml:lang}, and {@code xml:base}). 37 * <p> 38 * It is defined as follows: 39 * <pre>{@code 40 * <element name='EncryptionProperty' type='xenc:EncryptionPropertyType'/> 41 * <complexType name='EncryptionPropertyType' mixed='true'> 42 * <choice maxOccurs='unbounded'> 43 * <any namespace='##other' processContents='lax'/> 44 * </choice> 45 * <attribute name='Target' type='anyURI' use='optional'/> 46 * <attribute name='Id' type='ID' use='optional'/> 47 * <anyAttribute namespace="http://www.w3.org/XML/1998/namespace"/> 48 * </complexType> 49 * }</pre> 50 * 51 * @author Axl Mattheus 52 */ 53 public interface EncryptionProperty { 54 55 /** 56 * Returns the {@code EncryptedType} being described. 57 * 58 * @return the {@code EncryptedType} being described by this 59 * {@code EncryptionProperty}. 60 */ 61 String getTarget(); 62 63 /** 64 * Sets the target. 65 * 66 * @param target 67 */ 68 void setTarget(String target); 69 70 /** 71 * Returns the id of the {@code EncryptionProperty}. 72 * 73 * @return the id. 74 */ 75 String getId(); 76 77 /** 78 * Sets the id. 79 * 80 * @param id 81 */ 82 void setId(String id); 83 84 /** 85 * Returns the attribute's value in the {@code xml} namespace. 86 * 87 * @param attribute 88 * @return the attribute's value. 89 */ 90 String getAttribute(String attribute); 91 92 /** 93 * Set the attribute value. 94 * 95 * @param attribute the attribute's name. 96 * @param value the attribute's value. 97 */ 98 void setAttribute(String attribute, String value); 99 100 /** 101 * Returns the properties of the {@code EncryptionProperty}. 102 * 103 * @return an {@code Iterator} over all the additional encryption 104 * information contained in this class. 105 */ 106 Iterator<Element> getEncryptionInformation(); 107 108 /** 109 * Adds encryption information. 110 * 111 * @param information the additional encryption information. 112 */ 113 void addEncryptionInformation(Element information); 114 115 /** 116 * Removes encryption information. 117 * 118 * @param information the information to remove. 119 */ 120 void removeEncryptionInformation(Element information); 121 } |