View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.module.launcher.descriptor;
8   
9   import java.util.HashMap;
10  import java.util.Map;
11  
12  
13  public class ApplicationDescriptor
14  {
15      public static final String DEFAULT_CONFIGURATION_RESOURCE = "mule-config.xml";
16      public static final String DEFAULT_APP_PROPERTIES_RESOURCE = "mule-app.properties";
17  
18      /**
19       * Required to support the '-config spring' shortcut. Don't use a class object so
20       * the core doesn't depend on mule-module-spring.
21       */
22      public static final String CLASSNAME_SPRING_CONFIG_BUILDER = "org.mule.config.spring.SpringXmlConfigurationBuilder";
23  
24  
25      private String appName;
26      private String encoding;
27      private String configurationBuilder;
28      private String domain;
29      private String packagesToScan;
30      private boolean parentFirstClassLoader = true;
31      private String[] configResources = new String[] {DEFAULT_CONFIGURATION_RESOURCE};
32      private Map<String, String> appProperties = new HashMap<String, String>();
33  
34      private boolean redeploymentEnabled = true;
35  
36      private boolean priviledged = false;
37  
38      public String getAppName()
39      {
40          return appName;
41      }
42  
43      public void setAppName(String appName)
44      {
45          this.appName = appName;
46      }
47  
48      public String getEncoding()
49      {
50          return encoding;
51      }
52  
53      public void setEncoding(String encoding)
54      {
55          this.encoding = encoding;
56      }
57  
58      public Map<String, String> getAppProperties()
59      {
60          return appProperties;
61      }
62  
63      public void setAppProperties(Map<String, String> appProperties)
64      {
65          this.appProperties = appProperties;
66      }
67  
68      /**
69       * Config builder name. If the name not found among available builder shortcuts
70       * (e.g. 'spring' for default xml-based Mule config), then a FQN of the class to
71       * use.
72       * @return null for defaults
73       */
74      public String getConfigurationBuilder()
75      {
76          return configurationBuilder;
77      }
78  
79      public void setConfigurationBuilder(String configurationBuilder)
80      {
81          this.configurationBuilder = configurationBuilder;
82      }
83  
84  
85      public String getDomain()
86      {
87          return domain;
88      }
89  
90      public void setDomain(String domain)
91      {
92          this.domain = domain;
93      }
94  
95      /**
96       * Default (true) mode is a regular java classloading policy. When inverted (false),
97       * application libraries will be consulted before any other locations.
98       * @return default is true
99       */
100     public boolean isParentFirstClassLoader()
101     {
102         return parentFirstClassLoader;
103     }
104 
105     public void setParentFirstClassLoader(boolean parentFirstClassLoader)
106     {
107         this.parentFirstClassLoader = parentFirstClassLoader;
108     }
109 
110     public String[] getConfigResources()
111     {
112         return configResources;
113     }
114 
115     public void setConfigResources(String[] configResources)
116     {
117         this.configResources = configResources;
118     }
119 
120     public boolean isRedeploymentEnabled()
121     {
122         return redeploymentEnabled;
123     }
124 
125     public void setRedeploymentEnabled(boolean redeploymentEnabled)
126     {
127         this.redeploymentEnabled = redeploymentEnabled;
128     }
129 
130     public boolean isPriviledged()
131     {
132         return priviledged;
133     }
134 
135     public void setPriviledged(boolean priviledged)
136     {
137         this.priviledged = priviledged;
138     }
139 
140     public String getPackagesToScan()
141     {
142         return packagesToScan;
143     }
144 
145     public void setPackagesToScan(String packages)
146     {
147         this.packagesToScan = packages;
148     }
149 }