@Test( expected = IllegalArgumentException.class ) public void testSaveNullProjectFail() throws IOException { this.projectManager.saveProject( null ); }
@Override public void saveProject( final OutputStream aOutput ) throws IOException { if ( aOutput == null ) { throw new IllegalArgumentException( "Output stream cannot be null!" ); } final BufferedOutputStream os = new BufferedOutputStream( aOutput ); final ZipOutputStream zipOS = new ZipOutputStream( os ); zipOS.setComment( this.hostProperties.getFullName().concat( " project file" ) ); try { storeProjectMetadata( this.project, zipOS ); storeChannelLabels( this.project.getDataSet(), zipOS ); storeProjectSettings( this.project, zipOS ); storeCapturedResults( this.project, zipOS ); this.project.setChanged( false ); } finally { HostUtils.closeResource( zipOS ); HostUtils.closeResource( os ); } }
ProjectManagerImpl implements PropertyChangeListener, ProjectManager, ProjectProperties { @Override public void saveProject( final OutputStream aOutput ) throws IOException { if ( aOutput == null ) { throw new IllegalArgumentException( "Output stream cannot be null!" ); } final BufferedOutputStream os = new BufferedOutputStream( aOutput ); final ZipOutputStream zipOS = new ZipOutputStream( os ); zipOS.setComment( this.hostProperties.getFullName().concat( " project file" ) ); try { storeProjectMetadata( this.project, zipOS ); storeChannelLabels( this.project.getDataSet(), zipOS ); storeProjectSettings( this.project, zipOS ); storeCapturedResults( this.project, zipOS ); this.project.setChanged( false ); } finally { HostUtils.closeResource( zipOS ); HostUtils.closeResource( os ); } } }
ProjectManagerImpl implements PropertyChangeListener, ProjectManager, ProjectProperties { @Override public void saveProject( final OutputStream aOutput ) throws IOException { if ( aOutput == null ) { throw new IllegalArgumentException( "Output stream cannot be null!" ); } final BufferedOutputStream os = new BufferedOutputStream( aOutput ); final ZipOutputStream zipOS = new ZipOutputStream( os ); zipOS.setComment( this.hostProperties.getFullName().concat( " project file" ) ); try { storeProjectMetadata( this.project, zipOS ); storeChannelLabels( this.project.getDataSet(), zipOS ); storeProjectSettings( this.project, zipOS ); storeCapturedResults( this.project, zipOS ); this.project.setChanged( false ); } finally { HostUtils.closeResource( zipOS ); HostUtils.closeResource( os ); } } ProjectManagerImpl(); }
ProjectManagerImpl implements PropertyChangeListener, ProjectManager, ProjectProperties { @Override public void saveProject( final OutputStream aOutput ) throws IOException { if ( aOutput == null ) { throw new IllegalArgumentException( "Output stream cannot be null!" ); } final BufferedOutputStream os = new BufferedOutputStream( aOutput ); final ZipOutputStream zipOS = new ZipOutputStream( os ); zipOS.setComment( this.hostProperties.getFullName().concat( " project file" ) ); try { storeProjectMetadata( this.project, zipOS ); storeChannelLabels( this.project.getDataSet(), zipOS ); storeProjectSettings( this.project, zipOS ); storeCapturedResults( this.project, zipOS ); this.project.setChanged( false ); } finally { HostUtils.closeResource( zipOS ); HostUtils.closeResource( os ); } } ProjectManagerImpl(); void addPropertyChangeListener( final PropertyChangeListener aListener ); Project createNewProject(); Project createTemporaryProject(); @Override Project getCurrentProject(); @Override void loadProject( final InputStream aInput ); @Override void propertyChange( final PropertyChangeEvent aEvent ); void removePropertyChangeListener( final PropertyChangeListener aListener ); @Override void saveProject( final OutputStream aOutput ); void setHostProperties( final HostProperties aHostProperties ); }
ProjectManagerImpl implements PropertyChangeListener, ProjectManager, ProjectProperties { @Override public void saveProject( final OutputStream aOutput ) throws IOException { if ( aOutput == null ) { throw new IllegalArgumentException( "Output stream cannot be null!" ); } final BufferedOutputStream os = new BufferedOutputStream( aOutput ); final ZipOutputStream zipOS = new ZipOutputStream( os ); zipOS.setComment( this.hostProperties.getFullName().concat( " project file" ) ); try { storeProjectMetadata( this.project, zipOS ); storeChannelLabels( this.project.getDataSet(), zipOS ); storeProjectSettings( this.project, zipOS ); storeCapturedResults( this.project, zipOS ); this.project.setChanged( false ); } finally { HostUtils.closeResource( zipOS ); HostUtils.closeResource( os ); } } ProjectManagerImpl(); void addPropertyChangeListener( final PropertyChangeListener aListener ); Project createNewProject(); Project createTemporaryProject(); @Override Project getCurrentProject(); @Override void loadProject( final InputStream aInput ); @Override void propertyChange( final PropertyChangeEvent aEvent ); void removePropertyChangeListener( final PropertyChangeListener aListener ); @Override void saveProject( final OutputStream aOutput ); void setHostProperties( final HostProperties aHostProperties );  }