Package org.drools.guvnor.client.common

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


  }

  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


  public static void doBuildSource(final String uuid, 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

        if (fmt == null || fmt.equals("*")) {
          Window.alert(constants.PleaseEnterAFormatFileType());
          return;
        }

        GenericCallback cb = new GenericCallback() {
            public void onSuccess(Object result) {
                String uuid = (String) result;
                if (uuid.startsWith("DUPLICATE")) { //NON-NLS
                  LoadingPopup.close();
                  Window.alert(constants.AssetNameAlreadyExistsPickAnother());
View Full Code Here

    create.addListener(new ButtonListenerAdapter() {
          public void onClick(Button button, EventObject e) {
            final String userName = Window.prompt(constants.EnterNewUserName(), constants.NewUserName());

            if (userName != null) {
              RepositoryServiceFactory.getService().updateUserPermissions(userName, new HashMap(), new GenericCallback() {
                public void onSuccess(Object a) {
                  refresh();
                  showEditor(userName);
                }
              });

            }
          }
        });
    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

        m.addItem(new Item(constants.RebuildAllPackageBinariesQ(), new BaseItemListenerAdapter() {
            public void onClick(BaseItem item, EventObject e) {
                if (Window.confirm(constants.RebuildConfirmWarning())) {
                    LoadingPopup.showMessage(constants.RebuildingPackageBinaries());
                    RepositoryServiceFactory.getService().rebuildPackages(new GenericCallback() {
                        public void onSuccess(Object data) {
                            LoadingPopup.close();
                        }
                    });
                }
View Full Code Here

        Button ok = new Button(constants.OK());
        pop.addAttribute( "", ok );

        ok.addClickListener( new ClickListener() {
            public void onClick(Widget w) {
                RepositoryServiceFactory.getService().renamePackage( conf.uuid, name.getText(), new GenericCallback() {
                    public void onSuccess(Object data) {
                        refreshPackageList.execute();
                        conf.name = name.getText();
                        refreshWidgets();
                        Window.alert(constants.PackageRenamedSuccessfully());
View Full Code Here

                if (!PackageNameValidator.validatePackageName(name.getText())) {
                    Window.alert(constants.NotAValidPackageName());
                    return;
                }
                LoadingPopup.showMessage(constants.PleaseWaitDotDotDot());
                RepositoryServiceFactory.getService().copyPackage( conf.name, name.getText(), new GenericCallback() {
                    public void onSuccess(Object data) {
                        refreshPackageList.execute();
                        Window.alert(constants.PackageCopiedSuccessfully());
                        pop.hide();
                        LoadingPopup.close();
View Full Code Here

    }

    private void doSaveAction(final Command refresh) {
        LoadingPopup.showMessage(constants.SavingPackageConfigurationPleaseWait());

        RepositoryServiceFactory.getService().savePackage( this.conf, new GenericCallback() {
            public void onSuccess(Object data) {

                previousResponse = (ValidatedResponse) data;

                reload();
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.