class TargletContainerEventLogger implements ITargletContainerListener
{
public TargletContainerEventLogger()
{
}
public void handleTargletContainerEvent(TargletContainerEvent event, IProgressMonitor monitor) throws Exception
{
ITargletContainer container = event.getSource();
if (event instanceof IDChangedEvent)
{
System.out.println("IDChangedEvent: " + container);
System.out.println(" oldID: " + ((IDChangedEvent)event).getOldID());
}
else if (event instanceof TargletsChangedEvent)
{
System.out.println("TargletsChangedEvent: " + container);
}
else if (event instanceof ProfileUpdateSucceededEvent)
{
System.out.println("ProfileUpdateSucceededEvent: " + container);
System.out.println(" metadataRepositories: " + ((ProfileUpdateSucceededEvent)event).getMetadataRepositories());
System.out.println(" workspaceIUInfos: " + ((ProfileUpdateSucceededEvent)event).getWorkspaceIUInfos());
System.out.println(" provisioningPlan: " + ((ProfileUpdateSucceededEvent)event).getProvisioningPlan());
System.out.println(" profile: " + ((ProfileUpdateSucceededEvent)event).getProfile());
}
else if (event instanceof ProfileUpdateFailedEvent)
{
System.out.println("ProfileUpdateFailedEvent: " + container);
System.out.println(" updateProblem: " + ((ProfileUpdateFailedEvent)event).getUpdateProblem());
}
else if (event instanceof WorkspaceUpdateFinishedEvent)
{
System.out.println("WorkspaceUpdateFinishedEvent: " + container);
System.out.println(" importResults: " + ((WorkspaceUpdateFinishedEvent)event).getImportResults());
}
else
{
System.out.println(event);
}
}
}