public void onFailure(Throwable caught) {
ErrorPopup
.showMessage("Error listing Global Area information!");
}
public void onSuccess(PackageConfigData result) {
final PackageConfigData presults = result;
RepositoryServiceFactory.getPackageService().listImagesInPackage(
result.getName(), new AsyncCallback<String[]>() {
public void onFailure(Throwable caught) {
ErrorPopup
.showMessage("Error listing images information!");
}
public void onSuccess(String[] images) {
for (int i = 0; i < images.length; i++) {
imagesList.addItem(presults.getName() + " : " + images[i],
"http://localhost:8080/drools-guvnor/rest/packages/" +
presults.getName() + "/assets/" + images[i] + "/binary");
}
}
});
}
});
// Images in Packages
RepositoryServiceFactory.getPackageService().listPackages(
new AsyncCallback<PackageConfigData[]>() {
public void onFailure(Throwable caught) {
ErrorPopup
.showMessage("Error listing images information!");
}
public void onSuccess(PackageConfigData[] result) {
for (int i = 0; i < result.length; i++) {
final PackageConfigData packageConfigData = result[i];
RepositoryServiceFactory.getPackageService().listImagesInPackage(
packageConfigData.getName(), new AsyncCallback<String[]>() {
public void onFailure(Throwable caught) {
ErrorPopup
.showMessage("Error listing images information!");
}
public void onSuccess(String[] images) {
for (int i = 0; i < images.length; i++) {
imagesList.addItem(packageConfigData.getName() + " : " + images[i],
"http://localhost:8080/drools-guvnor/rest/packages/" +
packageConfigData.getName() + "/assets/" + images[i] + "/binary");
}
}
});
}
}