View Javadoc

1   /*
2    * Copyright [2006] [University Corporation for Advanced Internet Development, Inc.]
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 org.opensaml.xml.encryption;
18  
19  import javax.xml.namespace.QName;
20  
21  import org.opensaml.xml.signature.KeyInfo;
22  import org.opensaml.xml.util.XMLConstants;
23  import org.opensaml.xml.validation.ValidatingXMLObject;
24  
25  /**
26   * XMLObject representing XML Encryption, version 20021210, EncryptedType type. This is the base type for
27   * {@link EncryptedData} and {@link EncryptedKey} types.
28   */
29  public interface EncryptedType extends ValidatingXMLObject {
30  
31      /** Local name of the XSI type. */
32      public static final String TYPE_LOCAL_NAME = "EncryptedType";
33  
34      /** QName of the XSI type. */
35      public static final QName TYPE_NAME = new QName(XMLConstants.XMLENC_NS, TYPE_LOCAL_NAME, 
36              XMLConstants.XMLENC_PREFIX);
37  
38      /** Id attribute name. */
39      public static final String ID_ATTRIB_NAME = "Id";
40  
41      /** Type attribute name. */
42      public static final String TYPE_ATTRIB_NAME = "Type";
43  
44      /** MimeType attribute name. */
45      public static final String MIMETYPE_ATTRIB_NAME = "MimeType";
46  
47      /** Encoding attribute name. */
48      public static final String ENCODING_ATTRIB_NAME = "Encoding";
49  
50      /**
51       * Gets the unique ID for the XML element.
52       * 
53       * @return the unique ID for the XML element
54       */
55      public String getID();
56  
57      /**
58       * Sets the unique ID for the XML element.
59       * 
60       * @param newID the unique ID for the XML element
61       */
62      public void setID(String newID);
63  
64      /**
65       * Gets the type information for the plaintext content.
66       * 
67       * @return the type information for the plaintext content
68       */
69      public String getType();
70  
71      /**
72       * Sets the type information for the plaintext content.
73       * 
74       * @param newType the type information for the plaintext content
75       */
76      public void setType(String newType);
77  
78      /**
79       * Gets the MIME type of the plaintext content.
80       * 
81       * @return the MIME type of the plaintext content
82       */
83      public String getMimeType();
84  
85      /**
86       * Sets the MIME type of the plaintext content.
87       * 
88       * @param newMimeType the MIME type of the plaintext content
89       */
90      public void setMimeType(String newMimeType);
91  
92      /**
93       * Gets the encoding applied to the plaintext content prior to encryption.
94       * 
95       * @return the encoding applied to the plaintext content prior to encryption
96       */
97      public String getEncoding();
98  
99      /**
100      * Sets the encoding applied to the plaintext content prior to encryption.
101      * 
102      * @param newEncoding the encoding applied to the plaintext content prior to encryption
103      */
104     public void setEncoding(String newEncoding);
105 
106     /**
107      * Gets the EncryptionMethod child element.
108      * 
109      * @return the EncryptionMethod child element
110      */
111     public EncryptionMethod getEncryptionMethod();
112 
113     /**
114      * Sets the EncryptionMethod child element.
115      * 
116      * @param newEncryptionMethod the new EncryptionMethod child element
117      */
118     public void setEncryptionMethod(EncryptionMethod newEncryptionMethod);
119 
120     /**
121      * Gets the KeyInfo child element.
122      * 
123      * @return the KeyInfo child element
124      */
125     public KeyInfo getKeyInfo();
126 
127     /**
128      * Sets the KeyInfo child element.
129      * 
130      * @param newKeyInfo the new KeyInfo child element
131      */
132     public void setKeyInfo(KeyInfo newKeyInfo);
133 
134     /**
135      * Gets the CipherData child element.
136      * 
137      * @return the CipherData child element
138      */
139     public CipherData getCipherData();
140 
141     /**
142      * Sets the CipherData child element.
143      * 
144      * @param newCipherData the new CipherData child element
145      */
146     public void setCipherData(CipherData newCipherData);
147 
148     /**
149      * Gets the EncryptionProperties child element.
150      * 
151      * @return the EncryptionProperties child element
152      */
153     public EncryptionProperties getEncryptionProperties();
154 
155     /**
156      * Sets the EncryptionProperties child element.
157      * 
158      * @param newEncryptionProperties the new EncryptionProperties child element
159      */
160     public void setEncryptionProperties(EncryptionProperties newEncryptionProperties);
161 
162 }