String wsName = (String) WORKSPACE.getModel(model).getObject();
String storeName = (String) storeModel.getObject();
LayerInfo layer = (LayerInfo) model.getObject();
StoreInfo store = layer.getResource().getStore();
if(store instanceof DataStoreInfo) {
return new SimpleBookmarkableLink(id, DataAccessEditPage.class, storeModel,
DataAccessEditPage.STORE_NAME, storeName,
DataAccessEditPage.WS_NAME, wsName);
} else if (store instanceof WMSStoreInfo) {
return new SimpleBookmarkableLink(id, WMSStoreEditPage.class, storeModel,
DataAccessEditPage.STORE_NAME, storeName,
DataAccessEditPage.WS_NAME, wsName);
} else {
return new SimpleBookmarkableLink(id, CoverageStoreEditPage.class, storeModel,
DataAccessEditPage.STORE_NAME, storeName,
DataAccessEditPage.WS_NAME, wsName);
}
}