1 package com.atlassian.plugin.osgi.hostcomponents;
2
3 /**
4 * Ties properties to the host component registration. Properties can be set via specific methods or generically
5 * via {@link #withProperty(String,String)}
6 */
7 public interface PropertyBuilder
8 {
9 /**
10 * The name of the host component bean, usually the Spring bean identifier
11 */
12 String BEAN_NAME = "bean-name";
13
14 /**
15 * The context class loader strategy to use for managing the CCL when invoking host component methods
16 */
17 String CONTEXT_CLASS_LOADER_STRATEGY = "context-class-loader-strategy";
18
19 /**
20 * Sets the bean name of the host component
21 * @param name The name
22 * @return The property builder
23 */
24 PropertyBuilder withName(String name);
25
26 /**
27 * Sets the strategy to use for context classloader management
28 * @param strategy The strategy to use
29 * @return The property builder
30 */
31 PropertyBuilder withContextClassLoaderStrategy(ContextClassLoaderStrategy strategy);
32
33 /**
34 * Sets an arbitrary property to register with the host component
35 * @param name The property name
36 * @param value The property value
37 * @return The property builder
38 */
39 PropertyBuilder withProperty(String name, String value);
40 }