gov.nih.nci.cagrid.data.common
Class ExtensionDataManager

java.lang.Object
  extended by gov.nih.nci.cagrid.data.common.ExtensionDataManager

public class ExtensionDataManager
extends java.lang.Object

ExtensionDataManager Manages storage / retrieval of information in the data service extension data

Version:
$Id: ExtensionDataManager.java,v 1.3 2007/12/18 19:10:26 dervin Exp $
Author:
David Ervin

Constructor Summary
ExtensionDataManager(ExtensionTypeExtensionData data)
           
 
Method Summary
 void addAdditionalJar(java.lang.String jarName)
          Adds an additional jar
 java.lang.String[] getAdditionalJarNames()
          Gets the jar names of the additional libraries added to the service for supporting the query processor class
 DataServiceAuditors getAuditorsConfiguration()
          Gets the data service auditors configuration
 CadsrInformation getCadsrInformation()
          Gets the full caDSR information stored with this service extension data
 java.util.List<java.lang.String> getCadsrPackageNames()
          Gets the names of all cadsr packages stored in the extension data
 java.lang.String getCadsrProjectLongName()
          Gets the stored long name of the caDSR project used in the domain model
 java.lang.String getCadsrProjectVersion()
          Gets the stored version of the caDSR project used in the domain model
 java.lang.String getCadsrUrl()
          Gets the configured caDSR url
 ClassMapping getClassMapping(java.lang.String packageName, java.lang.String className)
          Gets a class mapping
 java.util.List<ClassMapping> getClassMappingsInPackage(java.lang.String packName)
          Gets all class mappings in a package
 java.lang.String getMappedNamespaceForPackage(java.lang.String packageName)
          Gets the mapped namespace for a package in the cadsr information
 java.lang.String getServiceStyle()
          Gets the service style
 boolean isNoDomainModel()
          Gets the flag indicating if no domain model is to be used
 boolean isSuppliedDomainModel()
          Gets the flag indicating a supplied domain model is to be used
 boolean isUseBdt()
          Gets the flag indicating the service is to use BDT
 boolean isUseWsEnumeration()
          Gets the flag indicating the service is to use WS-Enumeration
 void removeCadsrPackage(java.lang.String packageName)
          Removes a cadsr package from the service extension data
 void setAdditionalJars(java.lang.String[] jarNames)
          Sets the additional jars
 boolean setClassElementNameInModel(java.lang.String packageName, java.lang.String className, java.lang.String elementName)
          Sets the element name a class is mapped to in the exposed domain model
 boolean setClassSelectedInModel(java.lang.String packageName, java.lang.String className, boolean selected)
          Sets that a class is selected as part of the exposed model
 boolean setClassTargetableInModel(java.lang.String packageName, java.lang.String className, boolean targetable)
          Sets that a class is targetable in the exposed domain model
 void storeAuditorsConfiguration(DataServiceAuditors auditors)
          Stores the data service auditors configuration
 void storeCadsrPackage(CadsrPackage pack)
          Stores a Cadsr Package.
 void storeCadsrPackages(CadsrPackage[] packages)
          Replaces the cadsr package information in the extension data
 void storeCadsrProjectInformation(gov.nih.nci.cadsr.umlproject.domain.Project project)
          Stores the project long name and version
 void storeCadsrServiceUrl(java.lang.String url)
          Stores the cadsr grid service URL
 void storeDomainModelSource(boolean noDomainModel, boolean supplied)
          Stores a domain model's source
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtensionDataManager

public ExtensionDataManager(ExtensionTypeExtensionData data)
Method Detail

getAdditionalJarNames

public java.lang.String[] getAdditionalJarNames()
                                         throws java.lang.Exception
Gets the jar names of the additional libraries added to the service for supporting the query processor class

Returns:
The names of the additional jars, or null if none are present
Throws:
java.lang.Exception

addAdditionalJar

public void addAdditionalJar(java.lang.String jarName)
                      throws java.lang.Exception
Adds an additional jar

Parameters:
jarName - The name of the jar to add
Throws:
java.lang.Exception

setAdditionalJars

public void setAdditionalJars(java.lang.String[] jarNames)
                       throws java.lang.Exception
Sets the additional jars

Parameters:
jarNames - All the jar names to be set as additional jars
Throws:
java.lang.Exception

storeDomainModelSource

public void storeDomainModelSource(boolean noDomainModel,
                                   boolean supplied)
                            throws java.lang.Exception
Stores a domain model's source

Parameters:
noDomainModel -
supplied -
Throws:
java.lang.Exception

storeCadsrServiceUrl

public void storeCadsrServiceUrl(java.lang.String url)
                          throws java.lang.Exception
Stores the cadsr grid service URL

Parameters:
url -
Throws:
java.lang.Exception

storeCadsrProjectInformation

public void storeCadsrProjectInformation(gov.nih.nci.cadsr.umlproject.domain.Project project)
                                  throws java.lang.Exception
Stores the project long name and version

Parameters:
project -
Throws:
java.lang.Exception

storeCadsrPackages

public void storeCadsrPackages(CadsrPackage[] packages)
                        throws java.lang.Exception
Replaces the cadsr package information in the extension data

Parameters:
packages -
Throws:
java.lang.Exception

storeCadsrPackage

public void storeCadsrPackage(CadsrPackage pack)
                       throws java.lang.Exception
Stores a Cadsr Package. If an existing package has the same name, the existing package will be replaced

Parameters:
pack -
Throws:
java.lang.Exception

getMappedNamespaceForPackage

public java.lang.String getMappedNamespaceForPackage(java.lang.String packageName)
                                              throws java.lang.Exception
Gets the mapped namespace for a package in the cadsr information

Parameters:
packageName -
Returns:
The mapped namespace or NULL if no package was found
Throws:
java.lang.Exception

removeCadsrPackage

public void removeCadsrPackage(java.lang.String packageName)
                        throws java.lang.Exception
Removes a cadsr package from the service extension data

Parameters:
packageName -
Throws:
java.lang.Exception

getClassMapping

public ClassMapping getClassMapping(java.lang.String packageName,
                                    java.lang.String className)
                             throws java.lang.Exception
Gets a class mapping

Parameters:
packageName - The name of the package in which the class resides
className - The name of the class
Returns:
The class mapping, or null if none is found
Throws:
java.lang.Exception

setClassSelectedInModel

public boolean setClassSelectedInModel(java.lang.String packageName,
                                       java.lang.String className,
                                       boolean selected)
                                throws java.lang.Exception
Sets that a class is selected as part of the exposed model

Parameters:
packageName - The package name
className - The class name
selected - The selection state
Returns:
True if the class was found in the model, false otherwise
Throws:
java.lang.Exception

setClassTargetableInModel

public boolean setClassTargetableInModel(java.lang.String packageName,
                                         java.lang.String className,
                                         boolean targetable)
                                  throws java.lang.Exception
Sets that a class is targetable in the exposed domain model

Parameters:
packageName - The package name
className - The class name
targetable - The targetability state
Returns:
True if the class was found in the model, false otherwise
Throws:
java.lang.Exception

setClassElementNameInModel

public boolean setClassElementNameInModel(java.lang.String packageName,
                                          java.lang.String className,
                                          java.lang.String elementName)
                                   throws java.lang.Exception
Sets the element name a class is mapped to in the exposed domain model

Parameters:
packageName -
className -
elementName -
Returns:
True if the class was found in the model, false otherwise
Throws:
java.lang.Exception

getClassMappingsInPackage

public java.util.List<ClassMapping> getClassMappingsInPackage(java.lang.String packName)
                                                       throws java.lang.Exception
Gets all class mappings in a package

Parameters:
packName -
Returns:
A list of class mappings, or null if none are found
Throws:
java.lang.Exception

getCadsrUrl

public java.lang.String getCadsrUrl()
                             throws java.lang.Exception
Gets the configured caDSR url

Returns:
The caDSR url, or null if none is found
Throws:
java.lang.Exception

getCadsrPackageNames

public java.util.List<java.lang.String> getCadsrPackageNames()
                                                      throws java.lang.Exception
Gets the names of all cadsr packages stored in the extension data

Returns:
A list of package names, or null if none are stored
Throws:
java.lang.Exception

getCadsrProjectLongName

public java.lang.String getCadsrProjectLongName()
                                         throws java.lang.Exception
Gets the stored long name of the caDSR project used in the domain model

Returns:
The project long name, or null if not found
Throws:
java.lang.Exception

getCadsrProjectVersion

public java.lang.String getCadsrProjectVersion()
                                        throws java.lang.Exception
Gets the stored version of the caDSR project used in the domain model

Returns:
The project's version, or null if not found
Throws:
java.lang.Exception

isNoDomainModel

public boolean isNoDomainModel()
                        throws java.lang.Exception
Gets the flag indicating if no domain model is to be used

Returns:
The no domain model flag
Throws:
java.lang.Exception

isSuppliedDomainModel

public boolean isSuppliedDomainModel()
                              throws java.lang.Exception
Gets the flag indicating a supplied domain model is to be used

Returns:
The supplied domain model flag
Throws:
java.lang.Exception

isUseBdt

public boolean isUseBdt()
                 throws java.lang.Exception
Gets the flag indicating the service is to use BDT

Returns:
The use BDT flag
Throws:
java.lang.Exception

isUseWsEnumeration

public boolean isUseWsEnumeration()
                           throws java.lang.Exception
Gets the flag indicating the service is to use WS-Enumeration

Returns:
The use WS-Enumeration flag
Throws:
java.lang.Exception

getServiceStyle

public java.lang.String getServiceStyle()
                                 throws java.lang.Exception
Gets the service style

Returns:
The service style, or null if none is supplied
Throws:
java.lang.Exception

getAuditorsConfiguration

public DataServiceAuditors getAuditorsConfiguration()
                                             throws java.lang.Exception
Gets the data service auditors configuration

Returns:
The service auditors configuration
Throws:
java.lang.Exception

storeAuditorsConfiguration

public void storeAuditorsConfiguration(DataServiceAuditors auditors)
                                throws java.lang.Exception
Stores the data service auditors configuration

Parameters:
auditors -
Throws:
java.lang.Exception

getCadsrInformation

public CadsrInformation getCadsrInformation()
                                     throws java.lang.Exception
Gets the full caDSR information stored with this service extension data

Returns:
The caDSR information of the extension data
Throws:
java.lang.Exception