View Javadoc

1   /*
2    * $Id: ApplicationDescriptor.java 19663 2010-09-16 16:31:56Z aperepel $
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 java.util.HashMap;
14  import java.util.Map;
15  
16  
17  public class ApplicationDescriptor
18  {
19      public static final String DEFAULT_CONFIGURATION_RESOURCE = "mule-config.xml";
20      public static final String DEFAULT_APP_PROPERTIES_RESOURCE = "mule-app.properties";
21  
22      /**
23       * Required to support the '-config spring' shortcut. Don't use a class object so
24       * the core doesn't depend on mule-module-spring.
25       */
26      public static final String CLASSNAME_SPRING_CONFIG_BUILDER = "org.mule.config.spring.SpringXmlConfigurationBuilder";
27  
28  
29      private String appName;
30      private String encoding;
31      private String configurationBuilder;
32      private String domain;
33      private boolean parentFirstClassLoader = true;
34      private String[] configResources = new String[] {DEFAULT_CONFIGURATION_RESOURCE};
35      private Map<String, String> appProperties = new HashMap<String, String>();
36  
37      private boolean redeploymentEnabled = true;
38  
39      private boolean priviledged = false;
40  
41      public String getAppName()
42      {
43          return appName;
44      }
45  
46      public void setAppName(String appName)
47      {
48          this.appName = appName;
49      }
50  
51      public String getEncoding()
52      {
53          return encoding;
54      }
55  
56      public void setEncoding(String encoding)
57      {
58          this.encoding = encoding;
59      }
60  
61      public Map<String, String> getAppProperties()
62      {
63          return appProperties;
64      }
65  
66      public void setAppProperties(Map<String, String> appProperties)
67      {
68          this.appProperties = appProperties;
69      }
70  
71      /**
72       * Config builder name. If the name not found among available builder shortcuts
73       * (e.g. 'spring' for default xml-based Mule config), then a FQN of the class to
74       * use.
75       * @return null for defaults
76       */
77      public String getConfigurationBuilder()
78      {
79          return configurationBuilder;
80      }
81  
82      public void setConfigurationBuilder(String configurationBuilder)
83      {
84          this.configurationBuilder = configurationBuilder;
85      }
86  
87  
88      public String getDomain()
89      {
90          return domain;
91      }
92  
93      public void setDomain(String domain)
94      {
95          this.domain = domain;
96      }
97  
98      /**
99       * Default (true) mode is a regular java classloading policy. When inverted (false),
100      * application libraries will be consulted before any other locations.
101      * @return default is true
102      */
103     public boolean isParentFirstClassLoader()
104     {
105         return parentFirstClassLoader;
106     }
107 
108     public void setParentFirstClassLoader(boolean parentFirstClassLoader)
109     {
110         this.parentFirstClassLoader = parentFirstClassLoader;
111     }
112 
113     public String[] getConfigResources()
114     {
115         return configResources;
116     }
117 
118     public void setConfigResources(String[] configResources)
119     {
120         this.configResources = configResources;
121     }
122 
123     public boolean isRedeploymentEnabled()
124     {
125         return redeploymentEnabled;
126     }
127 
128     public void setRedeploymentEnabled(boolean redeploymentEnabled)
129     {
130         this.redeploymentEnabled = redeploymentEnabled;
131     }
132 
133     public boolean isPriviledged()
134     {
135         return priviledged;
136     }
137 
138     public void setPriviledged(boolean priviledged)
139     {
140         this.priviledged = priviledged;
141     }
142 }