Package org.drools.guvnor.client.rpc

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


    public WorkingSetEditor(RuleAsset asset) {
        if ( !AssetFormats.WORKING_SET.equals( asset.metaData.format ) ) {
            throw new IllegalArgumentException( "asset must a be a workingset not a: " + asset.metaData.format );
        }
        workingSet = asset;
        WorkingSetConfigData wsData = (WorkingSetConfigData) workingSet.content;
        cc = new ConstraintsContainer( wsData.constraints );
        cfc = new CustomFormsContainer( wsData.customForms );
        refreshWidgets();
        setWidth( "100%" );
View Full Code Here


        setWidth( "100%" );

    }

    private void refreshWidgets() {
        WorkingSetConfigData wsData = (WorkingSetConfigData) workingSet.content;

        TabPanel tPanel = new TabPanel();
        //tPanel.setWidth(800);
        ScrollPanel pnl = new ScrollPanel();
        //        pnl.setAutoWidth(true);
View Full Code Here

        RuleAsset[] workingSets = getService().loadRuleAssets( activeWorkingSets.toArray( new String[activeWorkingSets.size()] ) );
        List<String> constraintRules = new LinkedList<String>();
        if ( workingSets != null ) {
            for ( RuleAsset workingSet : workingSets ) {
                WorkingSetConfigData wsConfig = (WorkingSetConfigData) workingSet.content;
                if ( wsConfig.constraints != null ) {
                    for ( ConstraintConfiguration config : wsConfig.constraints ) {
                        constraintRules.add( ConstraintsFactory.getInstance().getVerifierRule( config ) );
                    }
                }
View Full Code Here

      } catch (RulesRepositoryException e) {
        log.error("error marshalling asset content: " + asset.metaData.name, e);
        throw new SerializationException(e.getMessage());
      }
    } else {
      asset.content = new WorkingSetConfigData();
    }
  }
View Full Code Here

        if (factTypes != null && !factTypes.isEmpty()) {
            //create a temporal RuleAsset to hold the fact types.
            final RuleAsset workingSet = new RuleAsset();
            workingSet.uuid = "workingSetMock";
           
            WorkingSetConfigData wsConfig = new WorkingSetConfigData();
            wsConfig.validFacts = factTypes.toArray(new String[factTypes.size()]);

            workingSet.content = wsConfig;
           
            workingSets = new HashSet<RuleAsset>() {{this.add(workingSet);}};
View Full Code Here

            return;
        } else {

            final Set<String> validFacts = new HashSet<String>();
            for (RuleAsset asset : wss) {
                WorkingSetConfigData wsConfig = (WorkingSetConfigData) asset.content;
                if (wsConfig.validFacts != null && wsConfig.validFacts.length > 0) {
                    validFacts.addAll(Arrays.asList(wsConfig.validFacts));
                }
            }
View Full Code Here

    public WorkingSetEditor(RuleAsset asset) {
        if ( !AssetFormats.WORKING_SET.equals( asset.metaData.format ) ) {
            throw new IllegalArgumentException( "asset must a be a workingset not a: " + asset.metaData.format );
        }
        workingSet = asset;
        WorkingSetConfigData wsData = (WorkingSetConfigData) workingSet.content;
        cc = new ConstraintsContainer( wsData.constraints );
        cfc = new CustomFormsContainer( wsData.customForms );
        refreshWidgets();
        setWidth( "100%" );
View Full Code Here

        setWidth( "100%" );

    }

    private void refreshWidgets() {
        WorkingSetConfigData wsData = (WorkingSetConfigData) workingSet.content;

        TabPanel tPanel = new TabPanel();
        //tPanel.setWidth(800);
        ScrollPanel pnl = new ScrollPanel();
        //        pnl.setAutoWidth(true);
View Full Code Here

        if (factTypes != null && !factTypes.isEmpty()) {
            //create a temporal RuleAsset to hold the fact types.
            final RuleAsset workingSet = new RuleAsset();
            workingSet.setUuid( "workingSetMock" );
           
            WorkingSetConfigData wsConfig = new WorkingSetConfigData();
            wsConfig.validFacts = factTypes.toArray(new String[factTypes.size()]);

            workingSet.setContent( wsConfig );
           
            workingSets = new HashSet<RuleAsset>() {{this.add(workingSet);}};
View Full Code Here

            return;
        } else {

            final Set<String> validFacts = new HashSet<String>();
            for (RuleAsset asset : wss) {
                WorkingSetConfigData wsConfig = (WorkingSetConfigData) asset.getContent();
                if (wsConfig.validFacts != null && wsConfig.validFacts.length > 0) {
                    validFacts.addAll(Arrays.asList(wsConfig.validFacts));
                }
            }
View Full Code Here

TOP

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

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.