public Archivist getArchivist(String archiveType, ClassLoader cl) { Archivist result = getArchivist(archiveType); if(result != null) { result.setClassLoader(cl); } return result; }
/** * perform any post deployment descriptor reading action * * @param descriptor the deployment descriptor for the module * @param archive the module archive */ @Override protected void postOpen(ApplicationClientDescriptor descriptor, ReadableArchive archive) throws IOException { super.postOpen(descriptor, archive); runValidations(descriptor, archive); }
/** * perform any post deployment descriptor reading action * * @param descriptor the deployment descriptor for the module * @param archive the module archive */ @Override protected void postOpen(ApplicationClientDescriptor descriptor, ReadableArchive archive) throws IOException { super.postOpen(descriptor, archive); postValidate(descriptor, archive); }
/** * writes a bundle descriptor * @param the bundle descriptor * @param the abstract archive */ public void write(BundleDescriptor bundle, ReadableArchive in, WritableArchive out) throws IOException { Archivist archivist = archivistFactory.getArchivist(in, bundle.getClassLoader()); write(bundle, archivist, in, out); }
@Override public boolean isProbablePuRootJar(String jarName) { return super.isProbablePuRootJar(jarName) && // component roots are not scanned while scanning ear. They will be handled // while scanning the component. !isComponentJar(jarName,(app.getModules())); } }
@Override public Object open(Archivist main, ReadableArchive archive, RootDeploymentDescriptor descriptor) throws IOException, SAXException { String puRoot = getPuRoot(archive); readPersistenceDeploymentDescriptor(main, archive, puRoot, descriptor); return null; // return null so that the descritor does not get added twice to extensions }
/** * Process annotations in a bundle descriptor, the annoation processing * is dependent on the type of descriptor being passed. */ public ProcessingResult processAnnotations(T bundleDesc, ReadableArchive archive) throws AnnotationProcessorException, IOException { return processAnnotations(bundleDesc, getScanner(), archive); }
public void copyStandardDeploymentDescriptors(ReadableArchive in, WritableArchive out) throws IOException { String entryName = getDeploymentDescriptorPath(); copyAnEntry(in, out, entryName); }
/** * Copy source archivist to a target abstract archive. By default, * every entry in source archive will be copied to the target archive. * * @param source the source archive to copy from * @param target the target archive to copy to * @param overwriteManifest if true, the manifest in source archive * overwrites the one in target archive */ public void copyInto(ReadableArchive source, WritableArchive target, boolean overwriteManifest) throws IOException { copyInto(source, target, null, overwriteManifest); }
public Archivist getArchivist(ReadableArchive archive, ClassLoader cl) throws IOException { Archivist archivist = getPrivateArchivistFor(archive); if (archivist!=null) { archivist.setClassLoader(cl); } return archivist; }
/** * Copy this archivist to a new abstract archive * @param a the deployment descriptor for an application * @param source the source archive * @param target the target archive */ public void copyInto(Application a, ReadableArchive source, WritableArchive target) throws IOException { copyInto(a, source, target, true); }
/** * Open a jar file and return an application object for the modules contained * in the archive. If the archive is a standalone module, this API will * create an empty application and add the standalone module to it * * @param jarFile the archive file * @return the application object */ public Application openArchive(URI jarFile, String archiveType) throws IOException, SAXException { return openArchive(jarFile, archiveType, false); }
/** * writes the deployment descriptors (standard and runtime) * to a JarFile using the right deployment descriptor path * * @out the abstract archive file to write to */ public void writeDeploymentDescriptors(WritableArchive out) throws IOException { // Standard DDs writeStandardDeploymentDescriptors(out); // the rest... writeExtraDeploymentDescriptors(out); }
public ApplicationClientDescriptor open(final ReadableArchive archive, final String mainClassNameToRun) throws IOException, SAXException { this.mainClassNameToRun = mainClassNameToRun; return super.open(archive); }
/** * writes the content of an archive to another archive * * @param in input archive * @param out output archive */ protected void writeContents(ReadableArchive in, WritableArchive out) throws IOException { writeContents(in, out, null); }
@Override public void readRuntimeDeploymentDescriptor(ReadableArchive archive, ApplicationClientDescriptor descriptor) throws IOException, SAXParseException { super.readRuntimeDeploymentDescriptor(archive, descriptor, false); } }
/** * Copy source archivist to a target abstract archive. By default, * every entry in source archive will be copied to the target archive. * * @param source the source archive to copy from * @param target the target archive to copy to * @param overwriteManifest if true, the manifest in source archive * overwrites the one in target archive */ public void copyInto(ReadableArchive source, WritableArchive target, boolean overwriteManifest) throws IOException { copyInto(source, target, null, overwriteManifest); }
/** * Open a new archive file, read the deployment descriptors and annotations * and set the constructed DOL descriptor instance * * @param archive the archive file path * @return the deployment descriptor for this archive */ public T open(ReadableArchive archive) throws IOException, SAXException { return open(archive, (Application) null); }
/** * Copy source archivist to a target abstract archive. By default, the manifest * in source archive overwrites the one in target archive. * * @param source the source archive to copy from * @param target the target archive to copy to * @param entriesToSkip the entries that will be skipped by target archive */ public void copyInto(ReadableArchive source, WritableArchive target, Vector entriesToSkip) throws IOException { copyInto(source, target, entriesToSkip, true); }
public T open(final ReadableArchive descriptorArchive, final ReadableArchive contentArchive) throws IOException, SAXException { return open(descriptorArchive, contentArchive, null); } /**