Package org.drools.guvnor.client.common

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


                if (node.getId().equals("snapshotRoot")) { //NON-NLS
                    return;
                }
                final PackageConfigData conf = (PackageConfigData) node.getUserObject();
                if (conf != null) {
                    RepositoryServiceFactory.getService().listSnapshots(conf.name, new GenericCallback() {
                        public void onSuccess(Object data) {
                            final SnapshotInfo[] snaps = (SnapshotInfo[]) data;
                            for (final SnapshotInfo snapInfo : snaps) {
                                TreeNode snap = new TreeNode();
                                snap.setTooltip(snapInfo.comment);
View Full Code Here


        return panel;
    }

    private void deploymentListPackages(final TreeNode root) {
        RepositoryServiceFactory.getService().listPackages(
                new GenericCallback() {
                    public void onSuccess(Object data) {
                        PackageConfigData[] value = (PackageConfigData[]) data;
                        PackageHierarchy ph = new PackageHierarchy();

                        for (PackageConfigData val : value) {
View Full Code Here

        this.editEvent = event;
        this.layout = new SimplePanel();
        if ( !columnConfigs.containsKey( tableConfig ) ) {
            RepositoryServiceFactory.getService().loadTableConfig( tableConfig,
                                                                   new GenericCallback() {
                                                                       public void onSuccess(Object data) {
                                                                           TableConfig conf = (TableConfig) data;
                                                                           ColumnModel cm = createColumnModel( conf );
                                                                           columnConfigs.put( tableConfig,
                                                                                              cm );
View Full Code Here

    initWidget(layout);
  }

  private void runAnalysis() {
    LoadingPopup.showMessage(constants.AnalysingPackageRunning());
    RepositoryServiceFactory.getService().analysePackage(packageUUID, new GenericCallback() {
      public void onSuccess(Object data) {
        AnalysisReport rep = (AnalysisReport) data;
        AnalysisResultWidget w = new AnalysisResultWidget(rep);
        w.setWidth("100%");
        layout.remove(1);
View Full Code Here

    private void loadInitialTree() {
        navTreeWidget.addItem( constants.PleaseWait() );
        DeferredCommand.addCommand(new Command() {
      public void execute() {
            service.loadChildCategories( "/",
                                         new GenericCallback() {


                                             public void onSuccess(Object result) {
                                                 selectedPath = null;
                                                 navTreeWidget.removeItems();
View Full Code Here

        this.selectedPath = getPath( item );

        //item.setUserObject( new Boolean( true ) );

        service.loadChildCategories( selectedPath,
                                     new GenericCallback() {

                                         public void onSuccess(Object result) {
                                             TreeItem child = root.getChild( 0 );
                                             if ( child instanceof PendingItem ) {
                                                 // root.removeItem( child );
View Full Code Here

        }
    }

    void ok() {

        AsyncCallback cb = new GenericCallback() {
            public void onSuccess(Object result) {
                if (((Boolean) result).booleanValue()) {
                  if (refresh != null) {
                    refresh.execute();
                  }
View Full Code Here

    private Button getDeleteButton(final String snapshotName, final String pkgName) {
        Button btn = new Button(constants.Delete());
        btn.addClickListener( new ClickListener() {
            public void onClick(Widget w) {
                if (Window.confirm(Format.format(constants.SnapshotDeleteConfirm(), snapshotName, pkgName))) {
                    RepositoryServiceFactory.getService().copyOrRemoveSnapshot( pkgName, snapshotName, true, null, new GenericCallback() {
                        public void onSuccess(Object data) {
                            close.execute();
                            Window.alert(constants.SnapshotWasDeleted());

                        }
View Full Code Here

                        copy.addAttribute( "", ok );
                        ok.addClickListener( new ClickListener() {
                            public void onClick(Widget w) {
                              if (newBut.isChecked()) {
                                if (checkUnique(snaps, box.getText())) {
                                    serv.copyOrRemoveSnapshot( packageName, snapshotName, false, box.getText(), new GenericCallback() {
                                        public void onSuccess(Object data) {
                                            copy.hide();
                                                Window.alert(Format.format(constants.CreatedSnapshot0ForPackage1(), box.getText(), packageName));
                                        }
                                    });
                                }
                              } else {
                                for (RadioButton rb : options) {
                                  if (rb.isChecked()) {
                                    final String newName = rb.getText();
                                        serv.copyOrRemoveSnapshot( packageName, snapshotName, false, newName, new GenericCallback() {
                                            public void onSuccess(Object data) {
                                                copy.hide();
                                                    Window.alert(Format.format(constants.Snapshot0ForPackage1WasCopiedFrom2(), newName, packageName, snapshotName));
                                            }
                                        });
View Full Code Here

    }

    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

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.