gov.nih.nci.cagrid.introduce.extension
Class ExtensionTools

java.lang.Object
  extended by gov.nih.nci.cagrid.introduce.extension.ExtensionTools

public class ExtensionTools
extends java.lang.Object

ExtensionTools Tools to handle extension management

Version:
$Id$
Author:
David Ervin

Constructor Summary
ExtensionTools()
           
 
Method Summary
static void addExtensionToService(ServiceInformation service, java.lang.String extensionName)
          Adds an extension's functionality to an existing service.
static CodegenExtensionPostProcessor getCodegenPostProcessor(java.lang.String extensionName)
          Gets a named codegen post processor
static CodegenExtensionPreProcessor getCodegenPreProcessor(java.lang.String extensionName)
          Gets a named codegen extension pre processor
static CreationExtensionPostProcessor getCreationPostProcessor(java.lang.String extensionName)
          Gets a named creation post processor
static ExtensionTypeExtensionData getExtensionData(ServiceExtensionDescriptionType desc, ServiceInformation info)
          Gets the extension type extension data for a service extension in a service model
static org.apache.axis.message.MessageElement getExtensionDataElement(ExtensionTypeExtensionData extensionData, java.lang.String dataElement)
          Gets an extension data element with a given local name
static java.lang.String getProperty(Properties properties, java.lang.String key)
          Extracts a property value from an Introduce Properties bean
static PropertiesProperty getPropertyObject(Properties properties, java.lang.String key)
          Extracts a property object from an Introduce Properties bean
static ServiceExtensionRemover getServiceExtensionRemover(java.lang.String extensionName)
          Gets a named service extension remover
static void removeExtensionDataElement(ExtensionTypeExtensionData data, java.lang.String dataElementName)
          Removes an extension data element
static void updateExtensionDataElement(ExtensionTypeExtensionData data, org.apache.axis.message.MessageElement element)
          Updates an extension data element
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtensionTools

public ExtensionTools()
Method Detail

getCreationPostProcessor

public static CreationExtensionPostProcessor getCreationPostProcessor(java.lang.String extensionName)
                                                               throws java.lang.Exception
Gets a named creation post processor

Parameters:
extensionName - The name of the extension
Returns:
The CreationExtensionPostProcessor of the named extension, or null if none is present
Throws:
java.lang.Exception

getCodegenPostProcessor

public static CodegenExtensionPostProcessor getCodegenPostProcessor(java.lang.String extensionName)
                                                             throws java.lang.Exception
Gets a named codegen post processor

Parameters:
extensionName - The name of the extension
Returns:
The CodegenExtensionPostProcessor or null if none is present
Throws:
java.lang.Exception

getCodegenPreProcessor

public static CodegenExtensionPreProcessor getCodegenPreProcessor(java.lang.String extensionName)
                                                           throws java.lang.Exception
Gets a named codegen extension pre processor

Parameters:
extensionName - The name of the extension
Returns:
The CodegenExtensionPreProcessor for the named extension, or null if none is found
Throws:
java.lang.Exception

getServiceExtensionRemover

public static ServiceExtensionRemover getServiceExtensionRemover(java.lang.String extensionName)
                                                          throws java.lang.Exception
Gets a named service extension remover

Parameters:
extensionName - The name of the extension
Returns:
The ServiceExtensionRemover of the named extension, or null if none is present
Throws:
java.lang.Exception

getProperty

public static java.lang.String getProperty(Properties properties,
                                           java.lang.String key)
Extracts a property value from an Introduce Properties bean

Parameters:
properties - The properties
key - The key name
Returns:
The value associated with the key, or null

getPropertyObject

public static PropertiesProperty getPropertyObject(Properties properties,
                                                   java.lang.String key)
Extracts a property object from an Introduce Properties bean

Parameters:
properties - The properties
key - The key name
Returns:
The property object associated with the key

getExtensionData

public static ExtensionTypeExtensionData getExtensionData(ServiceExtensionDescriptionType desc,
                                                          ServiceInformation info)
Gets the extension type extension data for a service extension in a service model

Parameters:
desc - The service extension description
info - The service model
Returns:
The extension data, or null if no extension is found

getExtensionDataElement

public static org.apache.axis.message.MessageElement getExtensionDataElement(ExtensionTypeExtensionData extensionData,
                                                                             java.lang.String dataElement)
Gets an extension data element with a given local name

Parameters:
extensionData - The extension data
dataElement - The name of the data element to extract
Returns:
The data element

updateExtensionDataElement

public static void updateExtensionDataElement(ExtensionTypeExtensionData data,
                                              org.apache.axis.message.MessageElement element)
Updates an extension data element

Parameters:
data - The extension data
element - The updated element

removeExtensionDataElement

public static void removeExtensionDataElement(ExtensionTypeExtensionData data,
                                              java.lang.String dataElementName)
Removes an extension data element

Parameters:
data - The extension data
dataElementName - The name of the data element to be removed

addExtensionToService

public static void addExtensionToService(ServiceInformation service,
                                         java.lang.String extensionName)
                                  throws CreationExtensionException
Adds an extension's functionality to an existing service. The extension will be added to the extensions list, and its creation processes invoked against the service.

Parameters:
service - The service to extend
extensionName - The name of the service extension
Throws:
CreationExtensionException