View Javadoc

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