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>EncryptionProperties</code> can hold additional information concerning 29 * the generation of the <code>EncryptedData</code> or 30 * <code>EncryptedKey</code>. This information is wraped int an 31 * <code>EncryptionProperty</code> element. Examples of additional information 32 * is e.g., a date/time stamp or the serial number of cryptographic hardware 33 * used during encryption). 34 * <p> 35 * It is defined as follows: 36 * <xmp> 37 * <element name='EncryptionProperties' type='xenc:EncryptionPropertiesType'/> 38 * <complexType name='EncryptionPropertiesType'> 39 * <sequence> 40 * <element ref='xenc:EncryptionProperty' maxOccurs='unbounded'/> 41 * </sequence> 42 * <attribute name='Id' type='ID' use='optional'/> 43 * </complexType> 44 * </xmp> 45 * 46 * @author Axl Mattheus 47 */ 48 public interface EncryptionProperties { 49 /** 50 * Returns the <code>EncryptionProperties</code>' id. 51 * 52 * @return the id. 53 */ 54 String getId(); 55 56 /** 57 * Sets the id. 58 * 59 * @param id the id. 60 */ 61 void setId(String id); 62 63 /** 64 * Returns an <code>Iterator</code> over all the 65 * <code>EncryptionPropterty</code> elements contained in this 66 * <code>EncryptionProperties</code>. 67 * 68 * @return an <code>Iterator</code> over all the encryption properties. 69 */ 70 Iterator<EncryptionProperty> getEncryptionProperties(); 71 72 /** 73 * Adds an <code>EncryptionProperty</code>. 74 * 75 * @param property. 76 */ 77 void addEncryptionProperty(EncryptionProperty property); 78 79 /** 80 * Removes the specified <code>EncryptionProperty</code>. 81 * 82 * @param property. 83 */ 84 void removeEncryptionProperty(EncryptionProperty property); 85 } | 1 /* 2 * reserved comment block 3 * DO NOT REMOVE OR ALTER! 4 */ 5 /** 6 * Licensed to the Apache Software Foundation (ASF) under one 7 * or more contributor license agreements. See the NOTICE file 8 * distributed with this work for additional information 9 * regarding copyright ownership. The ASF licenses this file 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 27 /** 28 * <code>EncryptionProperties</code> can hold additional information concerning 29 * the generation of the <code>EncryptedData</code> or 30 * <code>EncryptedKey</code>. This information is wraped int an 31 * <code>EncryptionProperty</code> element. Examples of additional information 32 * is e.g., a date/time stamp or the serial number of cryptographic hardware 33 * used during encryption). 34 * <p> 35 * It is defined as follows: 36 * <xmp> 37 * <element name='EncryptionProperties' type='xenc:EncryptionPropertiesType'/> 38 * <complexType name='EncryptionPropertiesType'> 39 * <sequence> 40 * <element ref='xenc:EncryptionProperty' maxOccurs='unbounded'/> 41 * </sequence> 42 * <attribute name='Id' type='ID' use='optional'/> 43 * </complexType> 44 * </xmp> 45 * 46 * @author Axl Mattheus 47 */ 48 public interface EncryptionProperties { 49 50 /** 51 * Returns the <code>EncryptionProperties</code>' id. 52 * 53 * @return the id. 54 */ 55 String getId(); 56 57 /** 58 * Sets the id. 59 * 60 * @param id the id. 61 */ 62 void setId(String id); 63 64 /** 65 * Returns an <code>Iterator</code> over all the 66 * <code>EncryptionPropterty</code> elements contained in this 67 * <code>EncryptionProperties</code>. 68 * 69 * @return an <code>Iterator</code> over all the encryption properties. 70 */ 71 Iterator<EncryptionProperty> getEncryptionProperties(); 72 73 /** 74 * Adds an <code>EncryptionProperty</code>. 75 * 76 * @param property 77 */ 78 void addEncryptionProperty(EncryptionProperty property); 79 80 /** 81 * Removes the specified <code>EncryptionProperty</code>. 82 * 83 * @param property 84 */ 85 void removeEncryptionProperty(EncryptionProperty property); 86 } 87 |