/** * Adds all artifacts in Collection to those to be added to the client * facade JAR. * * @param baseFile File for the base directory within which each artifact lies * @param artifactFiles Collection of File objects for the artifacts to be included * @throws IllegalStateException if invoked after the accumulated artifacts have been consumed */ public void addAll(final File baseFile, final Collection<File> artifactFiles) { for (File f : artifactFiles) { add(baseFile, f); } }
/** * Adds a new artifact to the collection of artifacts to be added to the * client facade JAR file so they can be delivered to the client during a * download. * * @param baseFile File for the base directory within which the artifact lies * @param artifactFile File for the artifact itself * @throws IllegalStateException if invoked after the accumulated artifacts have been consumed */ public void add(final File baseFile, final File artifactFile) { add(baseFile.toURI(), artifactFile.toURI()); }
private void addArtifactsForAppClient(){ ClientArtifactsManager cArtifactsManager = ClientArtifactsManager.get(context); for (int i = 0; i < files.size(); i ++) { URI baseURI = context.getScratchDir("ejb").toURI(); File file = new File(files.get(i)); URI artifact = baseURI.relativize(file.toURI()); //Fix for issue 9734 if (!cArtifactsManager.contains(baseURI,artifact) ){ cArtifactsManager.add(baseURI, artifact); } } }
cArtifactsManager.add(stubsDir, new File(file));
cArtifactsManager.add(stubsDir, new File(file));