View Javadoc

1   /*
2    * $Id: ApplicationDescriptor.java 22252 2011-06-23 06:15:55Z dirk.olmes $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.module.launcher.descriptor;
12  
13  import org.mule.module.launcher.plugin.PluginDescriptor;
14  
15  import java.util.HashMap;
16  import java.util.HashSet;
17  import java.util.Map;
18  import java.util.Set;
19  
20  
21  public class ApplicationDescriptor
22  {
23      public static final String DEFAULT_CONFIGURATION_RESOURCE = "mule-config.xml";
24      public static final String DEFAULT_APP_PROPERTIES_RESOURCE = "mule-app.properties";
25  
26      /**
27       * Required to support the '-config spring' shortcut. Don't use a class object so
28       * the core doesn't depend on mule-module-spring.
29       */
30      public static final String CLASSNAME_SPRING_CONFIG_BUILDER = "org.mule.config.spring.SpringXmlConfigurationBuilder";
31  
32  
33      private String appName;
34      private String encoding;
35      private String configurationBuilder;
36      private String domain;
37      private String packagesToScan;
38      private String[] configResources = new String[] {DEFAULT_CONFIGURATION_RESOURCE};
39      private Map<String, String> appProperties = new HashMap<String, String>();
40  
41      private boolean redeploymentEnabled = true;
42  
43      private boolean privileged;
44  
45      private Set<String> loaderOverride = new HashSet<String>();
46  
47      private Set<PluginDescriptor> plugins = new HashSet<PluginDescriptor>(0);
48  
49      public String getAppName()
50      {
51          return appName;
52      }
53  
54      public void setAppName(String appName)
55      {
56          this.appName = appName;
57      }
58  
59      public String getEncoding()
60      {
61          return encoding;
62      }
63  
64      public void setEncoding(String encoding)
65      {
66          this.encoding = encoding;
67      }
68  
69      public Map<String, String> getAppProperties()
70      {
71          return appProperties;
72      }
73  
74      public void setAppProperties(Map<String, String> appProperties)
75      {
76          this.appProperties = appProperties;
77      }
78  
79      /**
80       * Config builder name. If the name not found among available builder shortcuts
81       * (e.g. 'spring' for default xml-based Mule config), then a FQN of the class to
82       * use.
83       * @return null for defaults
84       */
85      public String getConfigurationBuilder()
86      {
87          return configurationBuilder;
88      }
89  
90      public void setConfigurationBuilder(String configurationBuilder)
91      {
92          this.configurationBuilder = configurationBuilder;
93      }
94  
95  
96      public String getDomain()
97      {
98          return domain;
99      }
100 
101     public void setDomain(String domain)
102     {
103         this.domain = domain;
104     }
105 
106     public String[] getConfigResources()
107     {
108         return configResources;
109     }
110 
111     public void setConfigResources(String[] configResources)
112     {
113         this.configResources = configResources;
114     }
115 
116     public boolean isRedeploymentEnabled()
117     {
118         return redeploymentEnabled;
119     }
120 
121     public void setRedeploymentEnabled(boolean redeploymentEnabled)
122     {
123         this.redeploymentEnabled = redeploymentEnabled;
124     }
125 
126     /**
127      * @deprecated use {@link #isPrivileged}
128      */
129     @Deprecated
130     public boolean isPriviledged()
131     {
132         return privileged;
133     }
134 
135     /**
136      * @deprecated use @{link #setPrivileged}
137      */
138     @Deprecated
139     public void setPriviledged(boolean priviledged)
140     {
141         this.privileged = priviledged;
142     }
143 
144     public boolean isPrivileged()
145     {
146         return privileged;
147     }
148 
149     public void setPrivileged(boolean privileged)
150     {
151         this.privileged = privileged;
152     }
153 
154     public Set<String> getLoaderOverride()
155     {
156         return loaderOverride;
157     }
158 
159     public void setLoaderOverride(Set<String> loaderOverride)
160     {
161         this.loaderOverride = loaderOverride;
162     }
163 
164     public Set<PluginDescriptor> getPlugins()
165     {
166         return plugins;
167     }
168 
169     public void setPlugins(Set<PluginDescriptor> plugins)
170     {
171         this.plugins = plugins;
172     }
173 
174     public String getPackagesToScan()
175     {
176         return packagesToScan;
177     }
178 
179     public void setPackagesToScan(String packages)
180     {
181         this.packagesToScan = packages;
182     }
183 }