public interface RegistryBeanGenerator
RegistryEntry
interface and implementation on basis object type name already present in CentraSite
Registry/Repository. In order to retrieve instance as stand alone client use RegistryBeanGeneratorFactory
. If
already established CSAF Session Context is present, instance can be retrieved out of it.RegistryBeanGeneratorFactory
Modifier and Type | Interface and Description |
---|---|
static class |
RegistryBeanGenerator.ResultType
Used as Key of the Map returned by
generate(String, String, String) method. |
Modifier and Type | Method and Description |
---|---|
java.util.Map<RegistryBeanGenerator.ResultType,java.lang.String> |
generate(java.lang.String objectType,
java.lang.String interfacePackage,
java.lang.String implementationPackage)
Generates all of the java source code artifacts comprising a CSAF
RegistryEntry . |
java.util.Map<RegistryBeanGenerator.ResultType,java.lang.String> generate(java.lang.String objectType, java.lang.String interfacePackage, java.lang.String implementationPackage) throws CSAppFrameworkException
RegistryEntry
. This includes the
RegistryEntry
derived interface of the CSAF Registry Bean and the implementation of this interface.
RegistryBeanGenerator generator = RegistryBeanGeneratorFactory.createRegistryBeanGeneratorInstance(this.provider); Mapresult = generator.generate("{http://myNameSpace}MyType", "com.mytype", "com.mytype.impl"); // The name of the generated base interface. Usually this is the simple name // of the type ("MyType" in this example). If the type name contains characters // that are not allowed in Java names, these characters will be replaced by '_'. String baseInterfaceName = result.get(ResultType.BASE_TYPE_INTERFACE_NAME); // The name of the generated base implementation class. String baseImplementationName = result.get(ResultType.BASE_TYPE_IMPLEMENTATION_NAME); // The generated base interface source code. String baseInterface = result.get(ResultType.BASE_TYPE_INTERFACE); // The generated base implementation class source code. // This class implements the base interface. String baseImplementation = result.get(ResultType.BASE_TYPE_IMPLEMENTATION); // The name of the generated interface for the virtual type. // null if the specified type is not virtual. String virtualInterfaceName = result.get(ResultType.VIRTUAL_TYPE_INTERFACE_NAME); // The name of the generated implementation class for the virtual type. // null if the specified type is not virtual. String virtualImplementationName = result.get(ResultType.VIRTUAL_TYPE_IMPLEMENTATION_NAME); // The generated interface source code for the virtual type. This interface // extends the base interface. // null if the specified type is not virtual. String virtualInterface = result.get(ResultType.VIRTUAL_TYPE_INTERFACE); // The generated implementation class source code for the virtual type. // This class implements the virtual interface, and extends the base implementation class. // null if the specified type is not virtual. String virtualImplementation = result.get(ResultType.VIRTUAL_TYPE_IMPLEMENTATION); // The interface package as specified in the generate() call. String interfacePackage = result.get(ResultType.INTERFACE_PACKAGE); // The implementation package as specified in the generate() call. String implementationPackage = result.get(ResultType.IMPLEMENTATION_PACKAGE);
objectType
- String representation of QName
name of the object type or virtual type.interfacePackage
- The java package in which the generated RegistryEntry
interface will reside.
Following standard package naming using "." separation.implementationPackage
- The java package in which the generated RegistryEntry
implementation will
reside. Following standard package naming using "." separation.RegistryBeanGenerator.ResultType
possible values. Virtual type related java source code artifacts will be null unless a virtual type was
specified.CSAppFrameworkException
- if an internal error occurs.