/** * {@inheritDoc} * * @see org.jboss.shrinkwrap.api.container.WebContainer#addAsWebInfResource(java.lang.String) */ @Override public T addAsWebInfResource(final String resourceName) throws IllegalArgumentException { Validate.notNull(resourceName, "ResourceName should be specified"); return addAsWebInfResource( new ClassLoaderAsset(resourceName), AssetUtil.getNameForClassloaderResource(resourceName)); }
/* (non-Javadoc) * @see org.jboss.shrinkwrap.api.container.WebContainer#setWebXML(java.lang.Package, java.lang.String) */ @Override public T setWebXML(Package resourcePackage, String resourceName) throws IllegalArgumentException { Validate.notNull(resourcePackage, "ResourcePackage must be specified"); Validate.notNull(resourceName, "ResourceName must be specified"); String classloaderResourceName = AssetUtil.getClassLoaderResourceName(resourcePackage, resourceName); return setWebXML(new ClassLoaderAsset(classloaderResourceName)); }
/** * {@inheritDoc} * * @see org.jboss.shrinkwrap.api.container.WebContainer#addAsWebInfResource(java.lang.Package, * java.lang.String) */ @Override public T addAsWebInfResource(final Package resourcePackage, final String resourceName) throws IllegalArgumentException { Validate.notNull(resourcePackage, "ResourcePackage must be specified"); Validate.notNull(resourceName, "ResourceName must be specified"); final String classloaderResourceName = AssetUtil.getClassLoaderResourceName(resourcePackage, resourceName); final ArchivePath target = ArchivePaths.create(classloaderResourceName); return addAsWebInfResource(resourcePackage, resourceName, target); }
/* (non-Javadoc) * @see org.jboss.shrinkwrap.api.container.WebContainer#addWebResource(java.lang.Package, java.lang.String, org.jboss.shrinkwrap.api.ArchivePath) */ @Override public T addAsWebResource(Package resourcePackage, String resourceName, ArchivePath target) throws IllegalArgumentException { Validate.notNull(resourcePackage, "ResourcePackage must be specified"); Validate.notNull(resourceName, "ResourceName must be specified"); Validate.notNull(target, "Target must be specified"); String classloaderResourceName = AssetUtil.getClassLoaderResourceName(resourcePackage, resourceName); Asset resource = new ClassLoaderAsset(classloaderResourceName); return addAsWebResource(resource, target); }