public static void setType(final DeploymentType deploymentType, final DeploymentUnit deploymentUnit) { deploymentUnit.putAttachment(Attachments.DEPLOYMENT_TYPE, deploymentType); final ResourceRoot resourceRoot = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.DEPLOYMENT_ROOT); if (resourceRoot != null) { resourceRoot.putAttachment(Attachments.DEPLOYMENT_TYPE, deploymentType); } }
/** * Creates a {@link ResourceRoot} for the passed {@link VirtualFile file} and adds it to the list of {@link ResourceRoot}s * in the {@link DeploymentUnit deploymentUnit} * * @param deploymentUnit The deployment unit * @param file The file for which the resource root will be created * @param markAsSubDeployment If this is true, then the {@link ResourceRoot} that is created will be marked as a subdeployment * through a call to {@link SubDeploymentMarker#mark(org.jboss.as.server.deployment.module.ResourceRoot)} * @param explodeDuringMount If this is true then the {@link VirtualFile file} will be exploded during mount, * while creating the {@link ResourceRoot} * @return Returns the created {@link ResourceRoot} * @throws IOException */ private ResourceRoot createResourceRoot(final DeploymentUnit deploymentUnit, final VirtualFile file, final boolean markAsSubDeployment, final boolean explodeDuringMount) throws IOException { final boolean war = file.getName().toLowerCase(Locale.ENGLISH).endsWith(WAR_EXTENSION); final Closeable closable = file.isFile() ? mount(file, explodeDuringMount) : exportExplodedWar(war, file, deploymentUnit); final MountHandle mountHandle = new MountHandle(closable); final ResourceRoot resourceRoot = new ResourceRoot(file, mountHandle); deploymentUnit.addToAttachmentList(Attachments.RESOURCE_ROOTS, resourceRoot); if (markAsSubDeployment) { SubDeploymentMarker.mark(resourceRoot); } if (war) { resourceRoot.putAttachment(Attachments.INDEX_RESOURCE_ROOT, false); SubExplodedDeploymentMarker.mark(resourceRoot); } return resourceRoot; }
deploymentRoot.putAttachment(Attachments.INDEX_RESOURCE_ROOT, false); ModuleRootMarker.mark(deploymentRoot, false); childResource.putAttachment(org.jboss.as.ee.structure.Attachments.MODULE_META_DATA, module); childResource.putAttachment(org.jboss.as.ee.structure.Attachments.ALTERNATE_CLIENT_DEPLOYMENT_DESCRIPTOR, alternateDeploymentDescriptor); break; case Connector: childResource.putAttachment(org.jboss.as.ee.structure.Attachments.ALTERNATE_CONNECTOR_DEPLOYMENT_DESCRIPTOR, alternateDeploymentDescriptor); break; case Ejb: childResource.putAttachment(org.jboss.as.ee.structure.Attachments.ALTERNATE_EJB_DEPLOYMENT_DESCRIPTOR, alternateDeploymentDescriptor); break; case Web: childResource.putAttachment(org.jboss.as.ee.structure.Attachments.ALTERNATE_WEB_DEPLOYMENT_DESCRIPTOR, alternateDeploymentDescriptor); break; case Service:
deploymentResourceRoot.putAttachment(Attachments.INDEX_RESOURCE_ROOT, false);
public static void mark(ResourceRoot attachable) { attachable.putAttachment(MODULE_ROOT_MARKER, true); }
public static void mark(ResourceRoot attachable) { attachable.putAttachment(SUB_DEPLOYMENT_ROOT_MARKER, true); }
public static void mark(ResourceRoot attachable, boolean value) { attachable.putAttachment(MODULE_ROOT_MARKER, value); }
public static void mark(ResourceRoot attachable, boolean value) { attachable.putAttachment(MODULE_ROOT_MARKER, value); }
public static void mark(ResourceRoot attachable) { attachable.putAttachment(SUB_DEPLOYMENT_ROOT_MARKER, true); }
public static void mark(ResourceRoot attachable) { attachable.putAttachment(MODULE_ROOT_MARKER, true); }
public static void mark(ResourceRoot resourceRoot) { resourceRoot.putAttachment(SUB_DEPLOYMENT_EXPLODED_MARKER, true); }
public static void mark(ResourceRoot root) { root.putAttachment(IGNORE_META_INF, true); }
public static void mark(ResourceRoot resourceRoot) { resourceRoot.putAttachment(SUB_DEPLOYMENT_EXPLODED_MARKER, true); }
public static void mark(ResourceRoot attachable) { attachable.putAttachment(MODULE_ROOT_MARKER, true); }
public static void mark(ResourceRoot attachable) { attachable.putAttachment(SUB_DEPLOYMENT_ROOT_MARKER, true); }
public static void mark(ResourceRoot attachable) { attachable.putAttachment(SUB_DEPLOYMENT_ROOT_MARKER, true); }
public static void mark(ResourceRoot root) { root.putAttachment(IGNORE_META_INF, true); }
public static void setType(final DeploymentType deploymentType, final DeploymentUnit deploymentUnit) { deploymentUnit.putAttachment(Attachments.DEPLOYMENT_TYPE, deploymentType); final ResourceRoot resourceRoot = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.DEPLOYMENT_ROOT); if (resourceRoot != null) { resourceRoot.putAttachment(Attachments.DEPLOYMENT_TYPE, deploymentType); } }
public static void setType(final DeploymentType deploymentType, final DeploymentUnit deploymentUnit) { deploymentUnit.putAttachment(Attachments.DEPLOYMENT_TYPE, deploymentType); final ResourceRoot resourceRoot = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.DEPLOYMENT_ROOT); if (resourceRoot != null) { resourceRoot.putAttachment(Attachments.DEPLOYMENT_TYPE, deploymentType); } }
public static void setType(final DeploymentType deploymentType, final DeploymentUnit deploymentUnit) { deploymentUnit.putAttachment(Attachments.DEPLOYMENT_TYPE, deploymentType); final ResourceRoot resourceRoot = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.DEPLOYMENT_ROOT); if (resourceRoot != null) { resourceRoot.putAttachment(Attachments.DEPLOYMENT_TYPE, deploymentType); } }