Package org.kie.aries.blueprint.factorybeans

Examples of org.kie.aries.blueprint.factorybeans.KBaseOptions


            beanMetadata.addArgument(createRef(context, releaseIdRef),null,1);
        } else {
            beanMetadata.addArgument(createNullMetadata(),null,1);
        }

        KBaseOptions kBaseOptionsAdaptor = new KBaseOptions();
        kBaseOptionsAdaptor.setPackages(element.getAttribute(ATTRIBUTE_PACKAGES));
        kBaseOptionsAdaptor.setIncludes(element.getAttribute(ATTRIBUTE_INCLUDES));
        kBaseOptionsAdaptor.setEventProcessingMode(element.getAttribute(ATTRIBUTE_EVENT_MODE));
        kBaseOptionsAdaptor.setEqualsBehavior(element.getAttribute(ATTRIBUTE_EQUALS));
        kBaseOptionsAdaptor.setDeclarativeAgenda(element.getAttribute(ATTRIBUTE_DECLARATIVE_AGENDA));
        kBaseOptionsAdaptor.setScope(element.getAttribute(ATTRIBUTE_SCOPE));
        kBaseOptionsAdaptor.setDef(element.getAttribute(ATTRIBUTE_DEFAULT));

        beanMetadata.setActivation(ComponentMetadata.ACTIVATION_LAZY);

        MutablePassThroughMetadata passThroughMetadata = context.createMetadata(MutablePassThroughMetadata.class);
        passThroughMetadata.setObject(kBaseOptionsAdaptor);
View Full Code Here


                        kBase.setKModule(kieModuleModel);
                        kBase.setName(kBaseName);

                        BeanArgument kbOptionsArg = metadata.getArguments().get(2);
                        PassThroughMetadata passThroughMetadata = (PassThroughMetadata) kbOptionsArg.getValue();
                        KBaseOptions kBaseOptions = (KBaseOptions) passThroughMetadata.getObject();
                        String packages = kBaseOptions.getPackages();
                        if ( !kBaseOptions.getPackages().isEmpty()) {
                            for ( String pkg : packages.split( "," ) ) {
                                kBase.addPackage( pkg.trim() );
                            }
                        }

                        String includes = kBaseOptions.getIncludes();
                        if ( !includes.isEmpty() ) {
                            for ( String include : includes.split( "," ) ) {
                                kBase.addInclude( include.trim() );
                            }
                        }

                        String equalsBehavior = kBaseOptions.getEqualsBehavior();
                        if ( !equalsBehavior.isEmpty() ) {
                            kBase.setEqualsBehavior( EqualityBehaviorOption.determineEqualityBehavior(equalsBehavior) );
                        }

                        String eventProcessingMode = kBaseOptions.getEventProcessingMode();
                        if ( !eventProcessingMode.isEmpty() ) {
                            kBase.setEventProcessingMode( EventProcessingOption.determineEventProcessingMode(eventProcessingMode) );
                        }

                        String declarativeAgenda = kBaseOptions.getDeclarativeAgenda();
                        if ( !declarativeAgenda.isEmpty() ) {
                            kBase.setDeclarativeAgenda( DeclarativeAgendaOption.determineDeclarativeAgenda(declarativeAgenda) );
                        }

                        kieModuleModel.getRawKieBaseModels().put(kBase.getName(), kBase);
View Full Code Here

TOP

Related Classes of org.kie.aries.blueprint.factorybeans.KBaseOptions

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.