1 /*
2 =================== DO NOT EDIT THIS FILE ====================
3 Generated by Modello 1.0.1 on 2011-09-14 22:12:56,
4 any modifications will be overwritten.
5 ==============================================================
6 */
7
8 package org.codehaus.mojo.javascript.assembler;
9
10 /**
11 *
12 *
13 * An assembler defines a collection of files to be created
14 * in the
15 * packaging directory based on source scripts. Many script
16 * developer use
17 * fine grained scripts for development and merge them
18 * during release. The
19 * assembler describe the files to get merged and the
20 * ordering.
21 *
22 *
23 *
24 * @version $Revision$ $Date$
25 */
26 public class Assembler
27 implements java.io.Serializable
28 {
29
30 //--------------------------/
31 //- Class/Member Variables -/
32 //--------------------------/
33
34 /**
35 * Field scripts.
36 */
37 private java.util.List/*<Script>*/ scripts;
38
39 /**
40 * Field modelEncoding.
41 */
42 private String modelEncoding = "UTF-8";
43
44
45 //-----------/
46 //- Methods -/
47 //-----------/
48
49 /**
50 * Method addScript.
51 *
52 * @param script
53 */
54 public void addScript( Script script )
55 {
56 if ( !(script instanceof Script) )
57 {
58 throw new ClassCastException( "Assembler.addScripts(script) parameter must be instanceof " + Script.class.getName() );
59 }
60 getScripts().add( script );
61 } //-- void addScript( Script )
62
63 /**
64 * Method getModelEncoding.
65 *
66 * @return the current encoding used when reading/writing this
67 * model
68 */
69 public String getModelEncoding()
70 {
71 return modelEncoding;
72 } //-- String getModelEncoding()
73
74 /**
75 * Method getScripts.
76 *
77 * @return List
78 */
79 public java.util.List/*<Script>*/ getScripts()
80 {
81 if ( this.scripts == null )
82 {
83 this.scripts = new java.util.ArrayList/*<Script>*/();
84 }
85
86 return this.scripts;
87 } //-- java.util.List/*<Script>*/ getScripts()
88
89 /**
90 * Method removeScript.
91 *
92 * @param script
93 */
94 public void removeScript( Script script )
95 {
96 if ( !(script instanceof Script) )
97 {
98 throw new ClassCastException( "Assembler.removeScripts(script) parameter must be instanceof " + Script.class.getName() );
99 }
100 getScripts().remove( script );
101 } //-- void removeScript( Script )
102
103 /**
104 * Set an encoding used for reading/writing the model.
105 *
106 * @param modelEncoding
107 */
108 public void setModelEncoding( String modelEncoding )
109 {
110 this.modelEncoding = modelEncoding;
111 } //-- void setModelEncoding( String )
112
113 /**
114 * Set specifies a merge to occur on a set of source files.
115 *
116 * @param scripts
117 */
118 public void setScripts( java.util.List/*<Script>*/ scripts )
119 {
120 this.scripts = scripts;
121 } //-- void setScripts( java.util.List )
122
123
124 }