com.bbn.swede.core.libraries
Class LibraryStructuralCompositeEdit

java.lang.Object
  extended bycom.bbn.swede.core.libraries.LibraryStructuralCompositeEdit

public class LibraryStructuralCompositeEdit
extends Object

An object to aggregate related LibraryStructuralEdit operations into a single unit.

Author:
aperezlo

Constructor Summary
LibraryStructuralCompositeEdit(ILibraryDescriptor ild, File directory)
          Creates a container for aggregating multiple edits to a library.
LibraryStructuralCompositeEdit(ILibraryDescriptor ild, String directory)
          Creates a container for aggregating multiple edits to a library.
 
Method Summary
 void addEdit(LibraryStructuralEdit lse)
          Adds an edit to the composite edit.
 IStatus configure(ILibraryDescriptor ild, IProgressMonitor progress)
          Perform all of the configuration edits that have been added to this composite.
 IStatus perform(IProgressMonitor progress)
          Perform all of the edits that have been added to this composite.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LibraryStructuralCompositeEdit

public LibraryStructuralCompositeEdit(ILibraryDescriptor ild,
                                      File directory)
Creates a container for aggregating multiple edits to a library. As explained in LibraryDescriptor.edit(LibraryEdit, IProgressMonitor), all of the changes to the resources destined to be in a library take place in a particular directory. The directory parameter specifies this location.

Parameters:
ild - the library to edit
directory - the directory where file additions/deletions/refreshes should occur

LibraryStructuralCompositeEdit

public LibraryStructuralCompositeEdit(ILibraryDescriptor ild,
                                      String directory)

Creates a container for aggregating multiple edits to a library. As explained in LibraryDescriptor.edit(LibraryEdit, IProgressMonitor), all of the changes to the resources destined to be in a library take place in a particular directory. The directory parameter specifies this location.

This is a convenience method, fully equivalent to

LibraryStructuralCompositeEdit(ild, new File(directory))

Parameters:
ild - The library to edit
directory - The path of the directory where additions/deletions/refreshes should occur.
See Also:
LibraryStructuralCompositeEdit(ILibraryDescriptor, File)
Method Detail

addEdit

public void addEdit(LibraryStructuralEdit lse)
Adds an edit to the composite edit.

Parameters:
lse - the edit to add

configure

public IStatus configure(ILibraryDescriptor ild,
                         IProgressMonitor progress)

Perform all of the configuration edits that have been added to this composite.

This operation supports cancelation.

Parameters:
ild - the library upon which these configuration edits should occur
progress - an object to be notified of the progress of the operation
Returns:
IStatus.OK, IStatus.CANCEL, or IStatus.ERROR depending on whether the operation was a success, canceled, or if something went wrong, respectively.

perform

public IStatus perform(IProgressMonitor progress)

Perform all of the edits that have been added to this composite.

This operation supports cancelation.

Parameters:
progress - an object to be notified of the progress of the operation
Returns:
IStatus.OK if the operation was a success, IStatus.CANCEL if it was canceled, or IStatus.ERROR otherwise


Copyright © 2004-2005 BBN Technologies. All Rights Reserved.