[jboss-dev-forums] [Design of POJO Server] - Re: Using temp at undeploy
alesj
do-not-reply at jboss.com
Mon Jan 26 09:47:12 EST 2009
"alesj" wrote :
| More to follow ...
|
OK, I'm done with the change,
and I'm happy with how it's done. :-)
I added a simple StructureProcessor interface
| public interface StructureProcessor
| {
| /**
| * Prepare structure metadata.
| *
| * @param deployment the deployment
| * @param structureMetaData the structure metadata
| */
| void prepareStructureMetaData(Deployment deployment, StructureMetaData structureMetaData);
|
| /**
| * Prepare context info.
| *
| * @param parentDeploymentContext the parent deployment context
| * @param contextInfo the context info
| */
| void prepareContextInfo(DeploymentContext parentDeploymentContext, ContextInfo contextInfo);
|
| /**
| * Apply structure metadata.
| *
| * @param deploymentContext the deployment context
| * @param structureMetaData the structure metadata
| */
| void applyStructureMetaData(DeploymentContext deploymentContext, StructureMetaData structureMetaData);
|
| /**
| * Apply context info.
| *
| * @param deploymentContext the deployment context
| * @param contextInfo the context info
| */
| void applyContextInfo(DeploymentContext deploymentContext, ContextInfo contextInfo);
| }
|
which gets appropriately called in AbstractStructureBuilder.
Currently the only impl is ModificationTypeStructureProcessor.
This one hold a list of previously mentioned ModificationTypeMatchers.
ModificationTypeMatcher now looks like this:
| public interface ModificationTypeMatcher
| {
| /**
| * Should we modify the file.
| *
| * @param root the deployment root
| * @param structureMetaData the current structure metadata
| * @return true if we determined modification
| */
| boolean determineModification(VirtualFile root, StructureMetaData structureMetaData);
|
| /**
| * Should we modify the file.
| *
| * @param root the deployment root
| * @param contextInfo the current context info
| * @return true if we determined modification
| */
| boolean determineModification(VirtualFile root, ContextInfo contextInfo);
| }
|
The test on how this is applied in 'reality':
- http://anonsvn.jboss.org/repos/jbossas/projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structureprocessor/test/VFSStructureProcessorUnitTestCase.java
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204718#4204718
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4204718
More information about the jboss-dev-forums
mailing list