source: trunk/docx4j/src/main/java/org/docx4j/wml/CTWriteProtection.java @ 359

Revision 359, 10.6 KB checked in by jharrop, 4 years ago (diff)

Change CT_FldChar to FldChar?;
Style is freestanding, rather than an inner class of Styles.
(Other changes largely whitespace in license header)

Line 
1/*
2 *  Copyright 2007-2008, Plutext Pty Ltd.
3 *   
4 *  This file is part of docx4j.
5
6    docx4j is licensed under the Apache License, Version 2.0 (the "License");
7    you may not use this file except in compliance with the License.
8
9    You may obtain a copy of the License at
10
11        http://www.apache.org/licenses/LICENSE-2.0
12
13    Unless required by applicable law or agreed to in writing, software
14    distributed under the License is distributed on an "AS IS" BASIS,
15    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16    See the License for the specific language governing permissions and
17    limitations under the License.
18
19 */
20
21
22package org.docx4j.wml;
23
24import java.math.BigInteger;
25import javax.xml.bind.Unmarshaller;
26import javax.xml.bind.annotation.XmlAccessType;
27import javax.xml.bind.annotation.XmlAccessorType;
28import javax.xml.bind.annotation.XmlAttribute;
29import javax.xml.bind.annotation.XmlTransient;
30import javax.xml.bind.annotation.XmlType;
31import org.jvnet.jaxb2_commons.ppp.Child;
32
33
34/**
35 * <p>Java class for CT_WriteProtection complex type.
36 *
37 * <p>The following schema fragment specifies the expected content contained within this class.
38 *
39 * <pre>
40 * &lt;complexType name="CT_WriteProtection">
41 *   &lt;complexContent>
42 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
43 *       &lt;attGroup ref="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}AG_Password"/>
44 *       &lt;attribute name="recommended" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
45 *     &lt;/restriction>
46 *   &lt;/complexContent>
47 * &lt;/complexType>
48 * </pre>
49 *
50 *
51 */
52@XmlAccessorType(XmlAccessType.FIELD)
53@XmlType(name = "CT_WriteProtection")
54public class CTWriteProtection
55    implements Child
56{
57
58    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
59    protected Boolean recommended;
60    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
61    protected STCryptProv cryptProviderType;
62    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
63    protected STAlgClass cryptAlgorithmClass;
64    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
65    protected STAlgType cryptAlgorithmType;
66    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
67    protected BigInteger cryptAlgorithmSid;
68    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
69    protected BigInteger cryptSpinCount;
70    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
71    protected String cryptProvider;
72    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
73    protected String algIdExt;
74    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
75    protected String algIdExtSource;
76    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
77    protected String cryptProviderTypeExt;
78    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
79    protected String cryptProviderTypeExtSource;
80    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
81    protected byte[] hash;
82    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
83    protected byte[] salt;
84    @XmlTransient
85    private Object parent;
86
87    /**
88     * Gets the value of the recommended property.
89     *
90     * @return
91     *     possible object is
92     *     {@link Boolean }
93     *     
94     */
95    public boolean isRecommended() {
96        if (recommended == null) {
97            return true;
98        } else {
99            return recommended;
100        }
101    }
102
103    /**
104     * Sets the value of the recommended property.
105     *
106     * @param value
107     *     allowed object is
108     *     {@link Boolean }
109     *     
110     */
111    public void setRecommended(Boolean value) {
112        this.recommended = value;
113    }
114
115    /**
116     * Gets the value of the cryptProviderType property.
117     *
118     * @return
119     *     possible object is
120     *     {@link STCryptProv }
121     *     
122     */
123    public STCryptProv getCryptProviderType() {
124        return cryptProviderType;
125    }
126
127    /**
128     * Sets the value of the cryptProviderType property.
129     *
130     * @param value
131     *     allowed object is
132     *     {@link STCryptProv }
133     *     
134     */
135    public void setCryptProviderType(STCryptProv value) {
136        this.cryptProviderType = value;
137    }
138
139    /**
140     * Gets the value of the cryptAlgorithmClass property.
141     *
142     * @return
143     *     possible object is
144     *     {@link STAlgClass }
145     *     
146     */
147    public STAlgClass getCryptAlgorithmClass() {
148        return cryptAlgorithmClass;
149    }
150
151    /**
152     * Sets the value of the cryptAlgorithmClass property.
153     *
154     * @param value
155     *     allowed object is
156     *     {@link STAlgClass }
157     *     
158     */
159    public void setCryptAlgorithmClass(STAlgClass value) {
160        this.cryptAlgorithmClass = value;
161    }
162
163    /**
164     * Gets the value of the cryptAlgorithmType property.
165     *
166     * @return
167     *     possible object is
168     *     {@link STAlgType }
169     *     
170     */
171    public STAlgType getCryptAlgorithmType() {
172        return cryptAlgorithmType;
173    }
174
175    /**
176     * Sets the value of the cryptAlgorithmType property.
177     *
178     * @param value
179     *     allowed object is
180     *     {@link STAlgType }
181     *     
182     */
183    public void setCryptAlgorithmType(STAlgType value) {
184        this.cryptAlgorithmType = value;
185    }
186
187    /**
188     * Gets the value of the cryptAlgorithmSid property.
189     *
190     * @return
191     *     possible object is
192     *     {@link BigInteger }
193     *     
194     */
195    public BigInteger getCryptAlgorithmSid() {
196        return cryptAlgorithmSid;
197    }
198
199    /**
200     * Sets the value of the cryptAlgorithmSid property.
201     *
202     * @param value
203     *     allowed object is
204     *     {@link BigInteger }
205     *     
206     */
207    public void setCryptAlgorithmSid(BigInteger value) {
208        this.cryptAlgorithmSid = value;
209    }
210
211    /**
212     * Gets the value of the cryptSpinCount property.
213     *
214     * @return
215     *     possible object is
216     *     {@link BigInteger }
217     *     
218     */
219    public BigInteger getCryptSpinCount() {
220        return cryptSpinCount;
221    }
222
223    /**
224     * Sets the value of the cryptSpinCount property.
225     *
226     * @param value
227     *     allowed object is
228     *     {@link BigInteger }
229     *     
230     */
231    public void setCryptSpinCount(BigInteger value) {
232        this.cryptSpinCount = value;
233    }
234
235    /**
236     * Gets the value of the cryptProvider property.
237     *
238     * @return
239     *     possible object is
240     *     {@link String }
241     *     
242     */
243    public String getCryptProvider() {
244        return cryptProvider;
245    }
246
247    /**
248     * Sets the value of the cryptProvider property.
249     *
250     * @param value
251     *     allowed object is
252     *     {@link String }
253     *     
254     */
255    public void setCryptProvider(String value) {
256        this.cryptProvider = value;
257    }
258
259    /**
260     * Gets the value of the algIdExt property.
261     *
262     * @return
263     *     possible object is
264     *     {@link String }
265     *     
266     */
267    public String getAlgIdExt() {
268        return algIdExt;
269    }
270
271    /**
272     * Sets the value of the algIdExt property.
273     *
274     * @param value
275     *     allowed object is
276     *     {@link String }
277     *     
278     */
279    public void setAlgIdExt(String value) {
280        this.algIdExt = value;
281    }
282
283    /**
284     * Gets the value of the algIdExtSource property.
285     *
286     * @return
287     *     possible object is
288     *     {@link String }
289     *     
290     */
291    public String getAlgIdExtSource() {
292        return algIdExtSource;
293    }
294
295    /**
296     * Sets the value of the algIdExtSource property.
297     *
298     * @param value
299     *     allowed object is
300     *     {@link String }
301     *     
302     */
303    public void setAlgIdExtSource(String value) {
304        this.algIdExtSource = value;
305    }
306
307    /**
308     * Gets the value of the cryptProviderTypeExt property.
309     *
310     * @return
311     *     possible object is
312     *     {@link String }
313     *     
314     */
315    public String getCryptProviderTypeExt() {
316        return cryptProviderTypeExt;
317    }
318
319    /**
320     * Sets the value of the cryptProviderTypeExt property.
321     *
322     * @param value
323     *     allowed object is
324     *     {@link String }
325     *     
326     */
327    public void setCryptProviderTypeExt(String value) {
328        this.cryptProviderTypeExt = value;
329    }
330
331    /**
332     * Gets the value of the cryptProviderTypeExtSource property.
333     *
334     * @return
335     *     possible object is
336     *     {@link String }
337     *     
338     */
339    public String getCryptProviderTypeExtSource() {
340        return cryptProviderTypeExtSource;
341    }
342
343    /**
344     * Sets the value of the cryptProviderTypeExtSource property.
345     *
346     * @param value
347     *     allowed object is
348     *     {@link String }
349     *     
350     */
351    public void setCryptProviderTypeExtSource(String value) {
352        this.cryptProviderTypeExtSource = value;
353    }
354
355    /**
356     * Gets the value of the hash property.
357     *
358     * @return
359     *     possible object is
360     *     byte[]
361     */
362    public byte[] getHash() {
363        return hash;
364    }
365
366    /**
367     * Sets the value of the hash property.
368     *
369     * @param value
370     *     allowed object is
371     *     byte[]
372     */
373    public void setHash(byte[] value) {
374        this.hash = ((byte[]) value);
375    }
376
377    /**
378     * Gets the value of the salt property.
379     *
380     * @return
381     *     possible object is
382     *     byte[]
383     */
384    public byte[] getSalt() {
385        return salt;
386    }
387
388    /**
389     * Sets the value of the salt property.
390     *
391     * @param value
392     *     allowed object is
393     *     byte[]
394     */
395    public void setSalt(byte[] value) {
396        this.salt = ((byte[]) value);
397    }
398
399    /**
400     * Gets the parent object in the object tree representing the unmarshalled xml document.
401     *
402     * @return
403     *     The parent object.
404     */
405    public Object getParent() {
406        return this.parent;
407    }
408
409    public void setParent(Object parent) {
410        this.parent = parent;
411    }
412
413    /**
414     * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
415     *
416     * @param parent
417     *     The parent object in the object tree.
418     * @param unmarshaller
419     *     The unmarshaller that generated the instance.
420     */
421    public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
422        setParent(parent);
423    }
424
425}
Note: See TracBrowser for help on using the repository browser.