org.apache.tuscany.sca.contribution.resource.impl
Class ResourceImportExportListener

java.lang.Object
  extended by org.apache.tuscany.sca.contribution.resource.impl.ResourceImportExportListener
All Implemented Interfaces:
java.util.EventListener, ContributionListener

public class ResourceImportExportListener
extends java.lang.Object
implements ContributionListener

Resource Import/Export contribution listener The listener would process all import/export from a given contribution and initialize the model resolvers properly


Constructor Summary
ResourceImportExportListener()
           
 
Method Summary
 void contributionAdded(ContributionRepository repository, Contribution contribution)
          Initialize the import/export model resolvers Export model resolvers are same as Contribution model resolver Import model resolvers are matched to a specific contribution if a location URI is specified, otherwise it try to resolve against all the other contributions Also set the exporting contributions used by contribution ClassLoaders to match import/export for class loading.
 void contributionRemoved(ContributionRepository repository, Contribution contribution)
          Notifies the listener that a contribution has been removed.
 void contributionUpdated(ContributionRepository repository, Contribution oldContribution, Contribution contribution)
          Notifies the listener that a contribution has been updated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceImportExportListener

public ResourceImportExportListener()
Method Detail

contributionAdded

public void contributionAdded(ContributionRepository repository,
                              Contribution contribution)
Initialize the import/export model resolvers Export model resolvers are same as Contribution model resolver Import model resolvers are matched to a specific contribution if a location URI is specified, otherwise it try to resolve against all the other contributions Also set the exporting contributions used by contribution ClassLoaders to match import/export for class loading.

Specified by:
contributionAdded in interface ContributionListener
Parameters:
repository - The contribution repository
contribution - The new contribution

contributionRemoved

public void contributionRemoved(ContributionRepository repository,
                                Contribution contribution)
Description copied from interface: ContributionListener
Notifies the listener that a contribution has been removed.

Specified by:
contributionRemoved in interface ContributionListener
Parameters:
repository - The contribution repository
contribution - The removed contribution.

contributionUpdated

public void contributionUpdated(ContributionRepository repository,
                                Contribution oldContribution,
                                Contribution contribution)
Description copied from interface: ContributionListener
Notifies the listener that a contribution has been updated.

Specified by:
contributionUpdated in interface ContributionListener
Parameters:
repository - The contribution repository
oldContribution - The old contribution
contribution - The new contribution