Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Reload/Synchronize Sandbox with Plain Java API

Is there a way to programatically synchronize the sandbox?

In order to reduce the administrative work of our developers, we've been working on some plugins that will change the metadata and the code itself when they deliver it. But that means that the sandbox will be actually out of sync. To avoid the lasting clicking of the Load Wizard, we've tried to found a way to directly synchronize the sandbox after the delivering (as a participant plugin). The metadata are no problem, but the reloading of the code isn't working.

My code looks like this:

IRepositoryResolver p = IRepositoryResolver.EXISTING_SHARED;
CBLoadDilemmaHandler cbLoadDilemmaHandler = CBLoadDilemmaHandler.getDefault();
ILoadOperation loadOperation = IOperationFactory.instance.getLoadOperation(cbLoadDilemmaHandler);
// ILoadOperation loadOperation = IOperationFactory.instance.getLoadOperation(LoadDilemmaHandler.getDefault());
loadOperation.requestReLoad(shareList, p, new NullProgressMonitor());
loadOperation.evaluateLoadRequests(new NullProgressMonitor());
loadOperation.run(new NullProgressMonitor());

The CBLoadDilemmaHandler extends the LoadDilemmaHandler and changes the collision method (the out of sync files are listed as collision, and the LoadDilemmaHandler just stops the load process in that case):

@Override
public int collision(Collection<ICollision> collisions,
       Collection<IRemovedShare> removedShares,
       Collection<IShareOutOfSync> sharesOutOfSync) {
       return CONTINUE;
}

Is this the right way to reload/refresh/synchronize the sandbox? Or is there maybe another easier way? Thank you very much!

1 vote



One answer

Permanent link
Finally I decided to also change the sandbox code and then run a metadata synchronization. I'm not specially satisfied with this solution, but it works ...

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,950

Question asked: Jan 29 '15, 2:53 a.m.

Question was seen: 3,796 times

Last updated: Feb 23 '15, 5:27 a.m.

Confirmation Cancel Confirm