Package org.drools.guvnor.client.common

Examples of org.drools.guvnor.client.common.GenericCallback


    private void renameSelected() {

      String name = Window.prompt(constants.CategoryNewNamePleaseEnter(), "");
      if (name != null) {
        RepositoryServiceFactory.getService().renameCategory(explorer.getSelectedPath(), name, new GenericCallback()  {
        public void onSuccess(Object data) {
          Window.alert(constants.CategoryRenamed());
          explorer.refresh();
        }
        });
View Full Code Here


    }


    private void deleteSelected() {
        if (Window.confirm(constants.AreYouSureYouWantToDeleteCategory() + explorer.getSelectedPath() )) {
            RepositoryServiceFactory.getService().removeCategory( explorer.getSelectedPath(), new GenericCallback() {

                public void onSuccess(Object data) {
                    explorer.refresh();
                }
View Full Code Here

    }

    void doDelete() {
        RepositoryServiceFactory.getService().deleteUncheckedRule( this.asset.uuid,
                                                                   this.asset.metaData.packageName,
                                                                   new GenericCallback() {
                                                                       public void onSuccess(Object o) {
                                                                           closeCommand.execute();
                                                                       }
                                                                   } );
    }
View Full Code Here



    private void createPackageAction(final String name, final String descr, final Command refresh) {
        LoadingPopup.showMessage(constants.CreatingPackagePleaseWait());
        RepositoryServiceFactory.getService().createPackage( name, descr, new GenericCallback() {
            public void onSuccess(Object data) {
                LoadingPopup.close();
                refresh.execute();
            }
        });
View Full Code Here

        final CheckinPopup pop = new CheckinPopup(w.getAbsoluteLeft() + 10,
                                                  w.getAbsoluteTop() + 10,
                constants.RestoreThisVersionQ());
        pop.setCommand( new Command() {
            public void execute() {
                RepositoryServiceFactory.getService().restoreVersion( versionUUID, uuid, pop.getCheckinComment(), new GenericCallback() {
                    public void onSuccess(Object data) {
                        refresh.execute();
                    }
                });
            }
View Full Code Here

        final CheckinPopup pop = new CheckinPopup(w.getAbsoluteLeft() + 10,
                                                  w.getAbsoluteTop() + 10,
                constants.RestoreThisVersionQ());
        pop.setCommand( new Command() {
            public void execute() {
                RepositoryServiceFactory.getService().restoreVersion( versionUUID, headUUID, pop.getCheckinComment(), new GenericCallback() {
                    public void onSuccess(Object data) {
                        refresh.execute();
                    }
                });
            }
View Full Code Here

    private void removeStatus() {
        String name = currentStatuses.getItemText( currentStatuses.getSelectedIndex() );

        RepositoryServiceFactory.getService().removeState( name,
                                                           new GenericCallback() {
                                                               public void onSuccess(Object data) {
                                                                   Window.alert(constants.StatusRemoved());
                                                                   refreshList();
                                                               }
                                                           } );
View Full Code Here

                          ok );
        ok.addClickListener( new ClickListener() {
            public void onClick(Widget w) {
                RepositoryServiceFactory.getService().renameAsset( uuid,
                                                                   box.getText(),
                                                                   new GenericCallback() {
                                                                       public void onSuccess(Object data) {
                                                                           metaDataRefreshView.execute();
                                                                           Window.alert( constants.ItemHasBeenRenamed() );
                                                                           pop.hide();
                                                                       }
View Full Code Here

                }
                RepositoryServiceFactory.getService().changeAssetPackage( uuid,
                                                                          sel.getSelectedPackage(),
                                                                          Format.format( constants.MovedFromPackage(),
                                                                                         pkg ),
                                                                          new GenericCallback() {
                                                                              public void onSuccess(Object data) {
                                                                                  metaDataRefreshView.execute();
                                                                                  pop.hide();
                                                                              }
View Full Code Here

              public void onClick(com.gwtext.client.widgets.Button button, EventObject e) {
                      if (grid.getSelectedRowUUID() == null) {
                        Window.alert(constants.PleaseSelectAnItemToRestore());
                        return;
                      }
                        RepositoryServiceFactory.getService().archiveAsset( grid.getSelectedRowUUID(), false, new GenericCallback() {
                            public void onSuccess(Object arg0) {
                                Window.alert(constants.ItemRestored());
                                grid.refreshGrid();
                            }
                        });
              };
        });


        final ToolbarButton deleteAsset = new ToolbarButton();
        deleteAsset.setText(constants.DeleteSelectedAsset());
        tb.addButton(deleteAsset);

        deleteAsset.addListener(
            new ButtonListenerAdapter() {
              public void onClick(
                  com.gwtext.client.widgets.Button button,
                  EventObject e) {
                      if (grid.getSelectedRowUUID() == null) {
                        Window.alert(constants.PleaseSelectAnItemToPermanentlyDelete());
                        return;
                      }
                      if (!Window.confirm(constants.AreYouSureDeletingAsset())) {
                        return;
                      }
                        RepositoryServiceFactory.getService().removeAsset( grid.getSelectedRowUUID(), new GenericCallback() {

                            public void onSuccess(Object arg0) {
                                Window.alert(constants.ItemDeleted());
                                grid.refreshGrid();
                            }
View Full Code Here

TOP

Related Classes of org.drools.guvnor.client.common.GenericCallback

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.