org.kie.integration.eap.maven.patch
Class EAPWebfragmentPatch
java.lang.Object
org.kie.integration.eap.maven.patch.EAPAbstractPatch
org.kie.integration.eap.maven.patch.EAPDynamicModulesPatch
org.kie.integration.eap.maven.patch.EAPWebfragmentPatch
- All Implemented Interfaces:
- EAPPatch
@Component(role=EAPPatch.class,
hint="webfragment")
public class EAPWebfragmentPatch- extends EAPDynamicModulesPatch
This patch impl is concerning webfragment descriptor files (servlet spec 3.0)
If a JAR resource contains a webfragment.xml file, and this JAR is placed as a static module resource, this webfragment is not loaded by the JBoss container.
So, this patch extracts the webfragment.xml file from JAR artifact and creates a new JAR "on the fly" adding this descriptor. Then, the new generated JAR file is added into the webapp that is used with the current modules distribution.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EAPWebfragmentPatch
public EAPWebfragmentPatch()
- Default constructor.
getId
public String getId()
- Description copied from interface:
EAPPatch
- The unique identifier for the patch.
- Returns:
- The unique identifier for the patch.
doApply
public boolean doApply(EAPContainer eap)
- Description copied from interface:
EAPPatch
- Used to check if this patch apply for a given container.
- Parameters:
eap - The JBoss EAP/AS container instance.
- Returns:
- This patch apply for this container.
execute
public void execute(EAPModuleGraphNode node,
Properties patchProperties)
throws EAPPatchException
- Specified by:
execute in class EAPDynamicModulesPatch
- Throws:
EAPPatchException
patchAssembly
public void patchAssembly(EAPDynamicModule module,
EAPAssemblyTemplate assemblyTemplate)
throws EAPPatchException
- Add the webfragment generated JAR as file inclusion in the module assembly descriptor.
- Overrides:
patchAssembly in class EAPDynamicModulesPatch
- Parameters:
assemblyTemplate - The assembly teamplte model.
- Throws:
EAPPatchException
Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.