Package org.drools.guvnor.client.common

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


              public void onClick(com.gwtext.client.widgets.Button button, EventObject e) {
                      if (grid.getSelectedRowUUIDs() == null) {
                        Window.alert(constants.PleaseSelectAnItemToRestore());
                        return;
                      }
                        RepositoryServiceFactory.getService().archiveAssets( grid.getSelectedRowUUIDs(), 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.getSelectedRowUUIDs() == null) {
                        Window.alert(constants.PleaseSelectAnItemToPermanentlyDelete());
                        return;
                      }
                      if (!Window.confirm(constants.AreYouSureDeletingAsset())) {
                        return;
                      }
                        RepositoryServiceFactory.getService().removeAssets( grid.getSelectedRowUUIDs(), new GenericCallback() {

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


    }

    private void runAnalysis() {
        LoadingPopup.showMessage( constants.AnalysingPackageRunning() );
        RepositoryServiceFactory.getService().analysePackage( packageUUID,
                                                              new GenericCallback() {
                                                                  public void onSuccess(Object data) {
                                                                      AnalysisReport rep = (AnalysisReport) data;
                                                                      VerifierResultWidget w = new VerifierResultWidget( rep,
                                                                                                                         true,
                                                                                                                         edit);
View Full Code Here

            Button adminClearAll = new Button(constants.EraseAllComments());
            hp.add(adminClearAll);
            adminClearAll.addClickListener(new ClickListener() {
                public void onClick(Widget sender) {
                    if (Window.confirm(constants.EraseAllCommentsWarning())) {
                        RepositoryServiceFactory.getService().clearAllDiscussionsForAsset(asset.uuid, new GenericCallback() {
                            public void onSuccess(Object result) {
                                updateCommentList(new ArrayList<DiscussionRecord>());
                            }
                        });
                    }
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

        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

                                     final String name) {
        LoadingPopup.showMessage( ((Constants) GWT.create( Constants.class )).AssemblingPackageSource() );
        DeferredCommand.addCommand( new Command() {
            public void execute() {
                RepositoryServiceFactory.getService().buildPackageSource( uuid,
                                                                          new GenericCallback() {
                                                                              public void onSuccess(Object data) {
                                                                                  String content = (String) data;
                                                                                  showSource( content,
                                                                                              name );
                                                                              }
View Full Code Here

                LoadingPopup.showMessage( constants.PleaseWaitDotDotDot() );
                RepositoryServiceFactory.getService().createPackageSnapshot( packageName,
                                                                             name,
                                                                             replace,
                                                                             comment.getText(),
                                                                             new GenericCallback() {
                                                                                 public void onSuccess(Object data) {
                                                                                     Window.alert( Format.format( constants.TheSnapshotCalled0WasSuccessfullyCreated(),
                                                                                                                  name ) );
                                                                                     form.hide();
                                                                                     LoadingPopup.close();
View Full Code Here

            com.google.gwt.user.client.ui.Button create = new com.google.gwt.user.client.ui.Button(constants.OK());
            form.addAttribute("", create);
            create.addClickListener(new ClickListener() {
              public void onClick(Widget w) {
                    if (userName.getText() != null && userName.getText().length() !=0) {
                      RepositoryServiceFactory.getService().createUser(userName.getText(), new GenericCallback() {
                        public void onSuccess(Object a) {
                          refresh();
                          showEditor(userName.getText());
                        }   
                        public void onFailure(Throwable t) {
                                super.onFailure(t);
                              }
                  });
                  form.hide();
                }
              }
            });
           
            form.show();   
          }


        });
    tb.addButton(create);

    ToolbarButton delete = new ToolbarButton(constants.DeleteSelectedUser());
    delete.addListener(new ButtonListenerAdapter() {
          public void onClick(Button button, EventObject e) {
            final String userName = grid.getSelectionModel().getSelected().getAsString("userName"); //NON-NLS
                        if (userName != null && Window.confirm(Format.format(constants.AreYouSureYouWantToDeleteUser0(), userName))) {
              RepositoryServiceFactory.getService().deleteUser(userName, new GenericCallback() {
                public void onSuccess(Object a) {
                  refresh();
                }
              });
            }
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.