Package org.drools.guvnor.client.rpc

Examples of org.drools.guvnor.client.rpc.ModuleServiceAsync


        Button btn = new Button( Constants.INSTANCE.Delete() );
        btn.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
                if ( Window.confirm( Constants.INSTANCE.SnapshotDeleteConfirm( snapshotName,
                                                                               moduleName ) ) ) {
                    ModuleServiceAsync moduleService = GWT.create(ModuleService.class);
                    moduleService.copyOrRemoveSnapshot( moduleName,
                                                                                       snapshotName,
                                                                                       true,
                                                                                       null,
                                                                                       new GenericCallback<java.lang.Void>() {
                                                                                           public void onSuccess(Void v) {
View Full Code Here


                                                       snapInfo.getName() ) );
    }

    private Button getCopyButton(final String snapshotName,
                                 final String packageName) {
        final ModuleServiceAsync moduleService = GWT.create(ModuleService.class);
        Button btn = new Button( Constants.INSTANCE.Copy() );
        btn.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
                moduleService.listSnapshots( packageName,
                                    createGenericCallback( snapshotName,
                                                           packageName,
                                                           moduleService ) );
            }
        } );
View Full Code Here

    }

    public static void rebuildBinaries() {
        if ( Window.confirm( Constants.INSTANCE.SnapshotRebuildWarning() ) ) {
            LoadingPopup.showMessage( Constants.INSTANCE.RebuildingSnapshotsPleaseWaitThisMayTakeSomeTime() );
            ModuleServiceAsync moduleService = GWT.create(ModuleService.class);
            moduleService.rebuildSnapshots( new GenericCallback<java.lang.Void>() {
                public void onSuccess(Void v) {
                    LoadingPopup.close();
                    Window.alert( Constants.INSTANCE.SnapshotsWereRebuiltSuccessfully() );
                }
            } );
View Full Code Here

    private void createSubPackageAction(final String name,
                                        final String descr,
                                        String parentPackage,
                                        final Command refresh) {
        LoadingPopup.showMessage( Constants.INSTANCE.CreatingPackagePleaseWait() );
        ModuleServiceAsync moduleService = GWT.create(ModuleService.class);
        moduleService.createSubModule(name,
                                    descr,
                                    parentPackage,
                                    new GenericCallback<String>() {
                                        public void onSuccess(String data) {
                                            RulePackageSelector.currentlySelectedPackage = name;
View Full Code Here

        }
        if ( node.getUserObject() instanceof Module ) {
            final Module packageConfigData = (Module) node.getUserObject();


            ModuleServiceAsync moduleService = GWT.create(ModuleService.class);
            moduleService.listSnapshots(
                    packageConfigData.getName(),
                    new GenericCallback<SnapshotInfo[]>() {
                        public void onSuccess(SnapshotInfo[] snaps) {
                            node.removeItems();
                            for (final SnapshotInfo snapInfo : snaps) {
View Full Code Here

    private void showTab(final AcceptItem tabbedPanel, final SnapshotInfo snapshotInfo, final EventBus eventBus) {

        LoadingPopup.showMessage( Constants.INSTANCE.LoadingSnapshot() );

        ModuleServiceAsync moduleService = GWT.create(ModuleService.class);
        moduleService.loadModule(snapshotInfo.getUuid(),
                                    new GenericCallback<Module>() {
                                        public void onSuccess(Module conf) {
                                            tabbedPanel.add(Constants.INSTANCE.SnapshotLabel(snapshotInfo.getName()),
                                                    new SnapshotView(
                                                            clientFactory,
View Full Code Here

                      hp );
        ins.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
                if ( !Window.confirm( constants.AboutToInstallSampleRepositoryAreYouSure() ) ) return;
                LoadingPopup.showMessage( constants.ImportingAndProcessing() );
                ModuleServiceAsync moduleService = GWT.create(ModuleService.class);
                moduleService.installSampleRepository(new GenericCallback<java.lang.Void>() {
                                public void onSuccess(Void v) {
                                    Window.alert(constants.RepositoryInstalledSuccessfully());
                                    hide();
                                    Window.Location.reload();
                                }
View Full Code Here

                    horizontalPanel.add( loading );

                    Scheduler scheduler = Scheduler.get();
                    scheduler.scheduleDeferred( new Command() {
                        public void execute() {
                            ModuleServiceAsync moduleService = GWT.create(ModuleService.class);
                            moduleService.listRulesInPackage( packageName,
                                                                                      createGenericCallback( horizontalPanel,
                                                                                                             ruleNameTextBox,
                                                                                                             busy,
                                                                                                             loading ) );
                        }
View Full Code Here

                navigationViewFactory.getModulesTreeItemView()
        ).thenReturn(
                knowledgeModulesTreeItemView
        );

        ModuleServiceAsync packageService = mock( ModuleServiceAsync.class );
        when(
                clientFactory.getModuleService()
        ).thenReturn(
                packageService
        );
View Full Code Here

    private Widget getCompareWidget(final String packageName,
                                    final String snapshotName) {
        HorizontalPanel hPanel = new HorizontalPanel();
        hPanel.add( new Label( "Compare to:" ) );
       
        ModuleServiceAsync moduleService = GWT.create(ModuleService.class);
        moduleService.listSnapshots( this.parentConf.getName(),
                                                                    new GenericCallback<SnapshotInfo[]>() {
                                                                        public void onSuccess(SnapshotInfo[] info) {
                                                                            for ( int i = 0; i < info.length; i++ ) {
                                                                                if ( !snapshotName.equals( info[i].getName() ) ) {
                                                                                    box.addItem( info[i].getName() );
View Full Code Here

TOP

Related Classes of org.drools.guvnor.client.rpc.ModuleServiceAsync

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.