Mercurial > dive4elements > river
changeset 4658:bea519b46919
Don't create Collection when a CollectionView for a new project is created
This is the first step to not show collections which haven't got an artifact yet
in the project list.
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Tue, 11 Dec 2012 16:11:20 +0100 |
parents | 65eadfe33466 |
children | 518d60dfe6bf |
files | flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java |
diffstat | 1 files changed, 0 insertions(+), 36 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java Tue Dec 11 09:46:22 2012 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java Tue Dec 11 16:11:20 2012 +0100 @@ -134,10 +134,6 @@ * <i>collection</i>. */ public CollectionView(FLYS flys) { - // do this first because it takes longer than the other stuff in here. - User user = flys.getCurrentUser(); - createNewCollection(user.identifier()); - this.flys = flys; this.tabs = new TabSet(); this.outputTabs = new HashMap<String, OutputTab>(); @@ -243,38 +239,6 @@ tabs.addTab(parameterList); } - - /** - * This method triggers the CreateCollectionService to create a new - * collection in the artifact server. - * - * @param ownerId The uuid of the user that should own the new collection. - */ - protected void createNewCollection(String ownerId) { - GWT.log("CollectionView.createNewCollection"); - - Config config = Config.getInstance(); - final String locale = config.getLocale(); - - createCollectionService.create( - locale, - ownerId, - new AsyncCallback<Collection>() { - @Override - public void onFailure(Throwable caught) { - GWT.log("Could not create the new collection."); - SC.warn(FLYS.getExceptionString(messages, caught)); - } - - @Override - public void onSuccess(Collection collection) { - GWT.log("Successfully created a new collection."); - setCollection(collection); - } - }); - } - - protected FLYS getFlys() { return flys; }