Package org.drools.guvnor.client.common

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


    }

    public static void rebuildBinaries() {
        if ( Window.confirm( constants.SnapshotRebuildWarning() ) ) {
            LoadingPopup.showMessage( constants.RebuildingSnapshotsPleaseWaitThisMayTakeSomeTime() );
            RepositoryServiceFactory.getService().rebuildSnapshots( new GenericCallback() {
                public void onSuccess(Object data) {
                    LoadingPopup.close();
                    Window.alert( constants.SnapshotsWereRebuiltSuccessfully() );
                }
            } );
View Full Code Here


        initWidget( pf );
    }


  private void deletePackage(final String uuid) {
    RepositoryServiceFactory.getService().removePackage(uuid, new GenericCallback( ) {
      public void onSuccess(Object data) {
        Window.alert(constants.PackageDeleted());
        packages.clear();
        loadPackages();
      }
View Full Code Here

            DeferredCommand.addCommand( new Command() {
                public void execute() {
                    LoadingPopup.showMessage( cs.RefreshingList() );
                    RepositoryServiceFactory.getService().loadDropDownExpression( dropData.valuePairs,
                                                                                  dropData.queryExpression,
                                                                                  new GenericCallback() {
                                                                                      public void onSuccess(Object data) {
                                                                                          LoadingPopup.close();
                                                                                          String[] list = (String[]) data;

                                                                                          if ( list.length == 0 ) {
View Full Code Here

  }

    private void doLogin(final TextField userName, TextField password, final FormStylePopup pop) {
        LoadingPopup.showMessage(messages.Authenticating());
       
        RepositoryServiceFactory.login( userName.getText(), password.getText(), new GenericCallback() {
            public void onSuccess(Object o) {
                userNameLoggedIn = userName.getText();
                LoadingPopup.close();
                Boolean success = (Boolean) o;
                if (!success.booleanValue()) {
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

        com.google.gwt.user.client.ui.Button save = new com.google.gwt.user.client.ui.Button(constants.SaveChanges());
        editor.addAttribute("", save);
        save.addClickListener(new ClickListener() {
          public void onClick(Widget w) {
            LoadingPopup.showMessage(constants.Updating());
            RepositoryServiceFactory.getService().updateUserPermissions(userName, perms, new GenericCallback() {
              public void onSuccess(Object a) {
                LoadingPopup.close();
                refresh();
              }
            });
View Full Code Here

    });
  }

  private void cleanLog() {
      LoadingPopup.showMessage(constants.CleaningLogMessages());
    RepositoryServiceFactory.getService().cleanLog(new GenericCallback() {
      public void onSuccess(Object data) {
        refresh();
        LoadingPopup.close();
      }
    });
View Full Code Here

    addAttribute("", hp);
    ins.addClickListener(new ClickListener() {
      public void onClick(Widget w) {
        if (!Window.confirm(constants.AboutToInstallSampleRepositoryAreYouSure())) return;
        LoadingPopup.showMessage(constants.ImportingAndProcessing());
        RepositoryServiceFactory.getService().installSampleRepository(new GenericCallback() {
          public void onSuccess(Object a) {
            Window.alert(constants.RepositoryInstalledSuccessfully());
            hide();
            Window.Location.reload();
          }
View Full Code Here

    private static void doCategoryNode(final TreeNode treeNode,
                                       final String path) {
        infanticide( treeNode );
        RepositoryServiceFactory.getService().loadChildCategories( path,
                                                                   new GenericCallback() {
                                                                       public void onSuccess(Object data) {
                                                                           final String value[] = (String[]) data;
                                                                           if ( value.length == 0 ) {
                                                                               if ( path.equals( "/" ) && ExplorerLayoutManager.shouldShow( Capabilities.SHOW_ADMIN ) ) {
                                                                                   RepositoryServiceFactory.getService().listPackages( new GenericCallback<PackageConfigData[]>() {
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

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.