View Javadoc

1   package org.apache.maven.plugin.ear;
2   
3   import java.io.File;
4   import java.util.List;
5   
6   /*
7    * Licensed to the Apache Software Foundation (ASF) under one
8    * or more contributor license agreements.  See the NOTICE file
9    * distributed with this work for additional information
10   * regarding copyright ownership.  The ASF licenses this file
11   * to you under the Apache License, Version 2.0 (the
12   * "License"); you may not use this file except in compliance
13   * with the License.  You may obtain a copy of the License at
14   *
15   *  http://www.apache.org/licenses/LICENSE-2.0
16   *
17   * Unless required by applicable law or agreed to in writing,
18   * software distributed under the License is distributed on an
19   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20   * KIND, either express or implied.  See the License for the
21   * specific language governing permissions and limitations
22   * under the License.
23   */
24  
25  /**
26   * A context for the {@link ApplicationXmlWriter}.
27   *
28   * @author <a href="snicoll@apache.org">Stephane Nicoll</a>
29   * @version $Id: ApplicationXmlWriter.java 728546 2008-12-21 22:56:51Z bentmann $
30   */
31  class ApplicationXmlWriterContext
32  {
33  
34      private final File destinationFile;
35  
36      private final List earModules;
37  
38      private final List securityRoles;
39  
40      private final String displayName;
41  
42      private final String description;
43  
44      private final String libraryDirectory;
45  
46      private final String applicationName;
47  
48      private final Boolean initializeInOrder;
49  
50      public ApplicationXmlWriterContext( File destinationFile, List earModules, List securityRoles, String displayName,
51                                          String description, String libraryDirectory, String applicationName,
52                                          Boolean initializeInOrder )
53      {
54          this.destinationFile = destinationFile;
55          this.earModules = earModules;
56          this.securityRoles = securityRoles;
57          this.displayName = displayName;
58          this.description = description;
59          this.libraryDirectory = libraryDirectory;
60          this.applicationName = applicationName;
61          this.initializeInOrder = initializeInOrder;
62      }
63  
64      /**
65       * Returns the name of the file to use to write application.xml to.
66       *
67       * @return the output file
68       */
69      public File getDestinationFile()
70      {
71          return destinationFile;
72      }
73  
74      /**
75       * Returns the  list of {@link EarModule} instances.
76       *
77       * @return the ear modules
78       */
79      public List getEarModules()
80      {
81          return earModules;
82      }
83  
84      /**
85       * Returns the list of {?link SecurityRole} instances.
86       *
87       * @return the security roles
88       */
89      public List getSecurityRoles()
90      {
91          return securityRoles;
92      }
93  
94      /**
95       * Returns the display name.
96       *
97       * @return the display name
98       */
99      public String getDisplayName()
100     {
101         return displayName;
102     }
103 
104     /**
105      * Returns the description.
106      *
107      * @return the description
108      */
109     public String getDescription()
110     {
111         return description;
112     }
113 
114     /**
115      * Returns the library directory (as per JavaEE 5).
116      *
117      * @return the library directory
118      */
119     public String getLibraryDirectory()
120     {
121         return libraryDirectory;
122     }
123 
124     /**
125      * Returns the application name (as per JavaEE 6).
126      *
127      * @return the application name
128      */
129     public String getApplicationName()
130     {
131         return applicationName;
132     }
133 
134     /**
135      * Returns the value of the initialize in order
136      * parameter (as per JavaEE 6).
137      *
138      * @return the initialize in order value
139      */
140     public Boolean getInitializeInOrder()
141     {
142         return initializeInOrder;
143     }
144 }