Package org.drools.guvnor.client.rpc

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


    public void onSelection(SelectionEvent<TreeItem> event) {
        TreeItem item = event.getSelectedItem();

        if ( item.getUserObject() instanceof PackageConfigData ) {
            PackageConfigData pc = (PackageConfigData) item.getUserObject();
            String id = itemWidgets.get( item );


            if ( ExplorerNodeConfig.TEST_SCENARIOS_ID.equals( id ) ) {
View Full Code Here


                public void onSuccess(PackageConfigData[] conf) {
                    node.removeItems();
                    removeTestScenarioIDs( itemWidgets );

                    for (int i = 0; i < conf.length; i++) {
                        final PackageConfigData c = conf[i];
                        TreeItem pkg = new TreeItem( Util.getHeader( images.packages(),
                                c.name ) );

                        node.addItem( pkg );
                        pkg.setUserObject( c );
                        itemWidgets.put( pkg,
                                ExplorerNodeConfig.TEST_SCENARIOS_ID );
                    }
                }
            } );
        } else if ( ExplorerNodeConfig.ANALYSIS_ROOT_ID.equals( itemWidgets.get( node ) ) ) {
            RepositoryServiceFactory.getPackageService().listPackages( new GenericCallback<PackageConfigData[]>() {
                public void onSuccess(PackageConfigData[] conf) {
                    node.removeItems();
                    removeAnalysisIDs( itemWidgets );
                    for (int i = 0; i < conf.length; i++) {
                        final PackageConfigData c = conf[i];
                        TreeItem pkg = new TreeItem( Util.getHeader( images.packages(),
                                c.name ) );

                        node.addItem( pkg );
                        pkg.setUserObject( c );
View Full Code Here

        final TreeItem node = event.getTarget();
        if ( ExplorerNodeConfig.PACKAGE_SNAPSHOTS.equals( itemWidgets.get( node ) ) ) {
            return;
        }
        if ( node.getUserObject() instanceof PackageConfigData ) {
            final PackageConfigData packageConfigData = (PackageConfigData) node.getUserObject();

            RepositoryServiceFactory.getPackageService().listSnapshots(
                    packageConfigData.name,
                    new GenericCallback<SnapshotInfo[]>() {
                        public void onSuccess(SnapshotInfo[] snaps) {
View Full Code Here

        return filter.accept( getConfigDataHelper( item.getPackage().getUUID() ),
                              roleType );
    }

    private PackageConfigData getConfigDataHelper(String uuidStr) {
        PackageConfigData data = new PackageConfigData();
        data.setUuid( uuidStr );
        return data;
    }
View Full Code Here

        AssetItemIterator assetItemIterator = getRulesRepository().queryFullText( text,
                                                                                  seekArchived );
        while ( assetItemIterator.hasNext() ) {
            AssetItem assetItem = assetItemIterator.next();
            PackageConfigData data = new PackageConfigData();
            data.setUuid( assetItem.getPackage().getUUID() );
            if ( filter.accept( data,
                                RoleType.PACKAGE_READONLY.getName() ) ) {
                resultList.add( assetItem );
            }
        }
View Full Code Here

import org.drools.guvnor.client.rpc.PackageConfigData;
import org.drools.repository.PackageItem;

public class PackageConfigDataFactory {
    public static PackageConfigData createPackageConfigDataWithDependencies(PackageItem item) {
        PackageConfigData data = create(item);
        data.setDependencies(item.getDependencies());
        return data;
    }
View Full Code Here

    public static PackageConfigData createPackageConfigDataWithOutDependencies(PackageItem item) {
        return create(item);
    }

    private static PackageConfigData create(PackageItem item) {
        PackageConfigData data = new PackageConfigData();
        data.setUuid(item.getUUID());
        data.setHeader(DroolsHeader.getDroolsHeader(item));
        data.setExternalURI(item.getExternalURI());
        data.setCatRules(item.getCategoryRules());
        data.setDescription(item.getDescription());
        data.setArchived(item.isArchived());
        data.setName(item.getName());
        data.setLastModified(item.getLastModified().getTime());
        data.setDateCreated(item.getCreatedDate().getTime());
        data.setCheckinComment(item.getCheckinComment());
        data.setLastContributor(item.getLastContributor());
        data.setState(item.getStateDescription());
        data.setSnapshot(item.isSnapshot());
        data.setVersionNumber(item.getVersionNumber());
        return data;
    }
View Full Code Here

        return filter.accept(getConfigDataHelper(item.getPackage().getUUID()),
                roleType);
    }

    private PackageConfigData getConfigDataHelper(String uuidStr) {
        PackageConfigData data = new PackageConfigData();
        data.setUuid(uuidStr);
        return data;
    }
View Full Code Here

        return filter.accept( getConfigDataHelper( item.getPackage().getUUID() ),
                              roleType );
    }

    private PackageConfigData getConfigDataHelper(String uuidStr) {
        PackageConfigData data = new PackageConfigData();
        data.setUuid( uuidStr );
        return data;
    }
View Full Code Here

    protected ModuleTreeItem createModuleTreeItem(IsTreeItem treeItem,
                                                  Folder folder) {
        ModuleTreeItem mti = null;
        String folderName = folder.getFolderName();
        PackageConfigData conf = folder.getPackageConfigData();
        if ( conf != null ) {
            mti = new ModuleTreeSelectableItem( clientFactory,
                                                view.addModuleTreeSelectableItem( treeItem,
                                                                                  folderName ),
                                                conf );
View Full Code Here

TOP

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

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.