org.apache.geronimo.mavenplugins.car
Class MavenAttributeStore

java.lang.Object
  extended by org.apache.geronimo.mavenplugins.car.MavenAttributeStore
All Implemented Interfaces:
ManageableAttributeStore

public class MavenAttributeStore
extends Object
implements ManageableAttributeStore

???


Field Summary
static GBeanInfo GBEAN_INFO
           
 
Fields inherited from interface org.apache.geronimo.kernel.config.ManageableAttributeStore
ATTRIBUTE_STORE
 
Constructor Summary
MavenAttributeStore()
           
 
Method Summary
 void addGBean(Artifact configurationName, GBeanData gbeanData, ClassLoader classLoader)
          Adds a GBean to the configuration.
 Collection applyOverrides(Artifact configurationName, Collection datas, ClassLoader classLoader)
          Given a configuration name and a set of GBeanDatas, apply all the saved overrides to that set of GBeans before the caller attempts to load them.
static GBeanInfo getGBeanInfo()
           
 void save()
          Saves the current values to persistent storage.
 void setReferencePatterns(Artifact configurationName, AbstractName gbean, GReferenceInfo reference, ReferencePatterns patterns)
          Sets the pattern for a GBean reference.
 void setShouldLoad(Artifact configurationName, AbstractName gbean, boolean load)
          Sets whether a particular GBean should be loaded for this configuration.
 void setValue(Artifact configurationName, AbstractName gbean, GAttributeInfo attribute, Object value, ClassLoader classLoader)
          Sets the stored value for a particular attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GBEAN_INFO

public static final GBeanInfo GBEAN_INFO
Constructor Detail

MavenAttributeStore

public MavenAttributeStore()
Method Detail

applyOverrides

public Collection applyOverrides(Artifact configurationName,
                                 Collection datas,
                                 ClassLoader classLoader)
Description copied from interface: ManageableAttributeStore
Given a configuration name and a set of GBeanDatas, apply all the saved overrides to that set of GBeans before the caller attempts to load them.

Specified by:
applyOverrides in interface ManageableAttributeStore
Parameters:
configurationName - The configuration in question
datas - The initial GBeanData's for all the GBeans in the configuration
Returns:
The modified GBeanData's

setValue

public void setValue(Artifact configurationName,
                     AbstractName gbean,
                     GAttributeInfo attribute,
                     Object value,
                     ClassLoader classLoader)
Description copied from interface: ManageableAttributeStore
Sets the stored value for a particular attribute. The attribute is identified by the configuration name, GBean ObjectName, and attribute information. Note: it is not possible to store a meaningful value of "null"; that would be treated the same as if no value was stored. Generally, whenever the value for a manageable attribute is changed, this method should be called so that value isn't reversed the next time the GBean is started.

Specified by:
setValue in interface ManageableAttributeStore
Parameters:
configurationName - The name of the configuration holding the GBean in question
gbean - The ObjectName of the GBean in question
attribute - The attribute in question
value - The value to save, or null if no value should be saved
classLoader - The configuration's classLoader

setReferencePatterns

public void setReferencePatterns(Artifact configurationName,
                                 AbstractName gbean,
                                 GReferenceInfo reference,
                                 ReferencePatterns patterns)
Description copied from interface: ManageableAttributeStore
Sets the pattern for a GBean reference. The reference is identified by the configuration name, GBean ObjectName, and reference information. To "null-out" the reference use setReferencePatterns(configurationName, gbean, reference, Collections.EMPTY_SET).

Specified by:
setReferencePatterns in interface ManageableAttributeStore
Parameters:
configurationName - the name of the configuration holding the GBean in question
gbean - the ObjectName of the GBean
reference - the attribute information

setShouldLoad

public void setShouldLoad(Artifact configurationName,
                          AbstractName gbean,
                          boolean load)
Description copied from interface: ManageableAttributeStore
Sets whether a particular GBean should be loaded for this configuration. The GBean must already exist in the configuration, this just toggles the flag for whether to stop it from loading when the configuration is loaded.

Specified by:
setShouldLoad in interface ManageableAttributeStore
Parameters:
configurationName - The configuration that the GBean belongs to
gbean - The GBean in question
load - True if the GBean should load with the configuration

addGBean

public void addGBean(Artifact configurationName,
                     GBeanData gbeanData,
                     ClassLoader classLoader)
Description copied from interface: ManageableAttributeStore
Adds a GBean to the configuration.

Specified by:
addGBean in interface ManageableAttributeStore
Parameters:
configurationName - the configuration that the GBean belongs to
gbeanData - the GBean to add
classLoader - The configuration classLoader

save

public void save()
          throws IOException
Description copied from interface: ManageableAttributeStore
Saves the current values to persistent storage. This should be called when the server is shut down or more often, to make sure that any changes will be reflected the next time the server starts and the store is consulted.

Specified by:
save in interface ManageableAttributeStore
Throws:
IOException

getGBeanInfo

public static GBeanInfo getGBeanInfo()


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.