Package org.drools.guvnor.client.rpc

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


                String selectedVersion = versionChoose.getSelectedVersionName();
                if (selectedVersion == null) {
                    return;
                }
                if (Window.confirm("Are you sure you want to use version: " + selectedVersion + " as dependency?")) {
                    ModuleServiceAsync moduleService = GWT.create(ModuleService.class);
                    moduleService.updateDependency(
                            conf.getUuid(),
                            encodeDependencyPath(DependencyWidget
                                    .decodeDependencyPath(dependencyPath)[0],
                                    selectedVersion),
                            new GenericCallback<Void>() {
View Full Code Here


    /**
     * Will refresh all the data.
     */
    public void refresh() {
        LoadingPopup.showMessage(constants.RefreshingPackageData());
        ModuleServiceAsync moduleService = GWT.create(ModuleService.class);
        moduleService.loadModule(this.packageConfigData.getUuid(),
                new GenericCallback<Module>() {
                    public void onSuccess(Module data) {
                        LoadingPopup.close();
                        packageConfigData = data;
                        render();
View Full Code Here

        initWidget( packageList );
    }

    private void loadPackageList() {
        ModuleServiceAsync moduleService = GWT.create(ModuleService.class);
        moduleService.listModules( new GenericCallback<Module[]>() {

            public void onSuccess(Module[] list) {
                for ( int i = 0; i < list.length; i++ ) {
                    packageList.addItem( list[i].getName(),
                                         list[i].getUuid() );
View Full Code Here

        this.uuid = theUuid;
       
        setDataProvider( new AsyncDataProvider<DependenciesPageRow>() {
            protected void onRangeChanged(HasData<DependenciesPageRow> display) {
                LoadingPopup.showMessage("please wait...");
                ModuleServiceAsync moduleService = GWT.create(ModuleService.class);
                moduleService.getDependencies( uuid,
                        new GenericCallback<String[]>() {
                            public void onSuccess(String[] dependencies) {
                                LoadingPopup.close();
                                final List<DependenciesPageRow> dependencyList = new ArrayList<DependenciesPageRow>();
                                for(String dependency: dependencies) {
View Full Code Here

        ).thenReturn(
                new String[]{"author", "runtime"}
               
        );
       
        ModuleServiceAsync packageService = mock(ModuleServiceAsync.class);
        when(
                clientFactory.getModuleService()
        ).thenReturn(
                packageService
        );
View Full Code Here

                                                       snapInfo.getName() ) );
    }

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

    }

    public void onOpen(OpenEvent<TreeItem> event) {
        final TreeItem node = event.getTarget();
        if ( ExplorerNodeConfig.TEST_SCENARIOS_ROOT_ID.equals( itemWidgets.get( node ) ) ) {
            ModuleServiceAsync moduleService = GWT.create(ModuleService.class);
            moduleService.listModules( new GenericCallback<Module[]>() {
                public void onSuccess(Module[] conf) {
                    node.removeItems();
                    removeTestScenarioIDs( itemWidgets );

                    for (int i = 0; i < conf.length; i++) {
                        final Module c = conf[i];
                        TreeItem pkg = new TreeItem( Util.getHeader( DroolsGuvnorImageResources.INSTANCE.packages(),
                                c.getName() ) );

                        node.addItem( pkg );
                        pkg.setUserObject( c );
                        itemWidgets.put( pkg,
                                ExplorerNodeConfig.TEST_SCENARIOS_ID );
                    }
                }
            } );
        } else if ( ExplorerNodeConfig.ANALYSIS_ROOT_ID.equals( itemWidgets.get( node ) ) ) {
            ModuleServiceAsync moduleService = GWT.create(ModuleService.class);
            moduleService.listModules( new GenericCallback<Module[]>() {
                public void onSuccess(Module[] conf) {
                    node.removeItems();
                    removeAnalysisIDs( itemWidgets );
                    for (int i = 0; i < conf.length; i++) {
                        final Module c = conf[i];
View Full Code Here

                    }

                    public void onSuccess(SnapshotInfo[] result) {
                        for (int j = 0; j < result.length; j++) {
                            final SnapshotInfo snapshotInfo = result[j];
                            ModuleServiceAsync moduleService = GWT.create(ModuleService.class);
                            moduleService.loadModule(snapshotInfo.getUuid(),
                                    new AsyncCallback<Module>() {

                                        public void onFailure(Throwable caught) {
                                            ErrorPopup.showMessage("Error listing snapshots information!");
                                        }
View Full Code Here

                                                       Constants.INSTANCE.ChooseAFactType() );
        pop.addRow( new HTML( "<small><i>" + headerMessage + " </i></small>" ) ); //NON-NLS
        final ListBox factList = new ListBox();
        factList.addItem( Constants.INSTANCE.loadingList() );

        ModuleServiceAsync moduleService = GWT.create(ModuleService.class);
        moduleService.listTypesInPackage( this.conf.getUuid(),
                                                                         createGenericCallbackForListTypesInPackage( global,
                                                                                                                     factList ) );

        InfoPopup info = new InfoPopup( Constants.INSTANCE.TypesInThePackage(),
                                        Constants.INSTANCE.IfNoTypesTip() );
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.