Interface CMPGenerator
-
- All Known Implementing Classes:
JDOCodeGenerator
public interface CMPGenerator
This interface must be implemented by all CMP code generators.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Collection<File>
cleanup()
This method is called once for each ejb module in the application that contains CMP beans.void
generate(IASEjbCMPEntityDescriptor descr, File srcout, File classout)
This method is called once for each CMP bean of the corresponding ejb module.void
init(EjbBundleDescriptorImpl ejbBundleDescriptor, ClassLoader cl, String bundlePathName)
Deprecated.This method is not used by the deployment back end, and should be removed as soon as the TestFramework is fixed.void
init(EjbBundleDescriptorImpl ejbBundleDescriptor, DeploymentContext ctx, String bundlePathName, String generatedXmlsPathName)
This method is called once for each ejb module in the application that contains CMP beans.Collection
validate(IASEjbCMPEntityDescriptor descr)
This method may be called once for each CMP bean of the corresponding ejb module to perform the validation.
-
-
-
Method Detail
-
init
void init(EjbBundleDescriptorImpl ejbBundleDescriptor, ClassLoader cl, String bundlePathName) throws GeneratorException
Deprecated.This method is not used by the deployment back end, and should be removed as soon as the TestFramework is fixed.This method is called once for each ejb module in the application that contains CMP beans. Only one #init() method can be called.- Parameters:
ejbBundleDescriptor
- the EjbBundleDescriptor associated with this ejb module.cl
- the ClassLoader that loaded user defined classes.bundlePathName
- full path to the directory where this bundle's files are located.- Throws:
GeneratorException
- if there is a problem initializing bean processing.
-
init
void init(EjbBundleDescriptorImpl ejbBundleDescriptor, DeploymentContext ctx, String bundlePathName, String generatedXmlsPathName) throws GeneratorException
This method is called once for each ejb module in the application that contains CMP beans. Only one #init() method can be called.- Parameters:
ejbBundleDescriptor
- the EjbBundleDescriptor associated with this ejb module.ctx
- the DeploymentContext associated with the deployment request.bundlePathName
- full path to the directory where this bundle's files are located.generatedXmlsPathName
- full path to the directory where the generated files are located.- Throws:
GeneratorException
- if there is a problem initializing bean processing.
-
generate
void generate(IASEjbCMPEntityDescriptor descr, File srcout, File classout) throws GeneratorException
This method is called once for each CMP bean of the corresponding ejb module.- Parameters:
descr
- the IASEjbCMPEntityDescriptor associated with this CMP bean.srcout
- the location of the source files to be generated.classout
- the location of the class files to be generated.- Throws:
GeneratorException
- if there is a problem processing the bean.
-
cleanup
Collection<File> cleanup() throws GeneratorException
This method is called once for each ejb module in the application that contains CMP beans. It is called at the end of the module processing.- Returns:
- a Collection of files to be compiled by the deployment process.
- Throws:
GeneratorException
- if there is any problem.
-
validate
Collection validate(IASEjbCMPEntityDescriptor descr)
This method may be called once for each CMP bean of the corresponding ejb module to perform the validation.- Parameters:
descr
- the IASEjbCMPEntityDescriptor associated with this CMP bean.- Returns:
- a Collection of Exceptions if there are any problems processing the bean. Returns an empty Collection if validation succeeds.
-
-