public void addFile ( final File file, final String fileName, final EntryInformation entryInformation ) throws IOException { addFile ( new FileContentProvider ( file ), fileName, entryInformation ); }
public void addFile ( final File file, final String fileName, final EntryInformation entryInformation ) throws IOException { addFile ( new FileContentProvider ( file ), fileName, entryInformation ); }
this.context.addFile ( new FileContentProvider ( file.toFile () ), name, new FileInformation ( 0755, "root", "root" ) ); this.context.addFile ( new FileContentProvider ( file.toFile () ), name, null );
this.context.addFile ( new FileContentProvider ( file.toFile () ), name, new FileInformation ( 0755, "root", "root" ) ); this.context.addFile ( new FileContentProvider ( file.toFile () ), name, null );
protected void processEquinox ( final File sourceBase, final File packageFolder, final Map<String, String> replacements, final IProgressMonitor monitor, final String name ) throws IOException, Exception, FileNotFoundException { final File source = new File ( sourceBase, name + "/" + name + ".profile.xml" ); { // patch the profile, we need a copy for that final File tempFile = File.createTempFile ( "profile", ".xml" ); try { Files.copy ( source.toPath (), tempFile.toPath (), StandardCopyOption.REPLACE_EXISTING ); patchProfile ( name, tempFile ); this.deploymentContext.addFile ( new FileContentProvider ( tempFile ), "/usr/share/eclipsescada/profiles/" + name + ".profile.xml", new FileInformation ( 0640, "root", "eclipsescada" ) ); } finally { tempFile.delete (); } } this.deploymentContext.addDirectory ( "/usr/share/eclipsescada/profiles/" + name, new FileInformation ( 0755 ) ); this.deploymentContext.addFile ( Contents.createContent ( CommonPackageHandler.class.getResourceAsStream ( "templates/app.logback.xml" ), replacements ), "/usr/share/eclipsescada/profiles/" + name + "/logback.xml", null ); this.deploymentContext.addFile ( Contents.createContent ( CommonPackageHandler.class.getResourceAsStream ( "templates/scada.createApplication" ), replacements ), "/usr/bin/scada.create." + name, new FileInformation ( 0755 ) ); this.deploymentContext.addFile ( new FileContentProvider ( new File ( sourceBase, name + "/data.json" ) ), "/usr/share/eclipsescada/ca.bootstrap/bootstrap." + name + ".json", new FileInformation ( 0640, "root", "eclipsescada" ) ); final StartupHandler sm = createStartupHandler ( getDefaultStartupMechanism () ); if ( sm != null ) { sm.createEquinox ( this.deploymentContext, name, replacements, monitor ); } }
protected void processEquinox ( final File sourceBase, final File packageFolder, final Map<String, String> replacements, final IProgressMonitor monitor, final String name ) throws IOException, Exception, FileNotFoundException { final File source = new File ( sourceBase, name + "/" + name + ".profile.xml" ); { // patch the profile, we need a copy for that final File tempFile = File.createTempFile ( "profile", ".xml" ); try { Files.copy ( source.toPath (), tempFile.toPath (), StandardCopyOption.REPLACE_EXISTING ); patchProfile ( name, tempFile ); this.deploymentContext.addFile ( new FileContentProvider ( tempFile ), "/usr/share/eclipsescada/profiles/" + name + ".profile.xml", new FileInformation ( 0640, "root", "eclipsescada" ) ); } finally { tempFile.delete (); } } this.deploymentContext.addDirectory ( "/usr/share/eclipsescada/profiles/" + name, new FileInformation ( 0755 ) ); this.deploymentContext.addFile ( Contents.createContent ( CommonPackageHandler.class.getResourceAsStream ( "templates/app.logback.xml" ), replacements ), "/usr/share/eclipsescada/profiles/" + name + "/logback.xml", null ); this.deploymentContext.addFile ( Contents.createContent ( CommonPackageHandler.class.getResourceAsStream ( "templates/scada.createApplication" ), replacements ), "/usr/bin/scada.create." + name, new FileInformation ( 0755 ) ); this.deploymentContext.addFile ( new FileContentProvider ( new File ( sourceBase, name + "/data.json" ) ), "/usr/share/eclipsescada/ca.bootstrap/bootstrap." + name + ".json", new FileInformation ( 0640, "root", "eclipsescada" ) ); final StartupHandler sm = createStartupHandler ( getDefaultStartupMechanism () ); if ( sm != null ) { sm.createEquinox ( this.deploymentContext, name, replacements, monitor ); } }