Examples of ContextEntry


Examples of org.apache.directory.server.core.annotations.ContextEntry

            // Inject the partition into the DirectoryService
            service.addPartition( partition );

            // Last, process the context entry
            ContextEntry contextEntry = createPartition.contextEntry();

            if ( contextEntry != null )
            {
                injectEntries( service, contextEntry.entryLdif() );
            }
        }

        return service;
    }
View Full Code Here

Examples of org.apache.directory.server.core.annotations.ContextEntry

            // Inject the partition into the DirectoryService
            service.addPartition( partition );

            // Last, process the context entry
            ContextEntry contextEntry = createPartition.contextEntry();

            if ( contextEntry != null )
            {
                injectEntries( service, contextEntry.entryLdif() );
            }
        }

        return service;
    }
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.directory.DirContextEntryDocument.ContextEntry

                }
                mcpc.setIndexedAttributes(set);
            }
        }

        ContextEntry contextEntry = partition.getContextEntry();
        if (contextEntry != null) {
            Attribute[] attributeList = contextEntry.getAttributeArray();
            if (attributeList != null) {
                BasicAttributes attrs = new BasicAttributes(true);
                for (int i = 0; i < attributeList.length; i++) {
                    BasicAttribute attr = new BasicAttribute(attributeList[i]
                            .getId());
View Full Code Here

Examples of org.drools.core.rule.ContextEntry

        }
    }

    public ContextEntry createContextEntry() {
        if (declarations.length == 0) return null;
        ContextEntry contextEntry = new MvelContextEntry(declarations);
        if (isUnification) {
            contextEntry = new UnificationContextEntry(contextEntry, declarations[0]);
        }
        return contextEntry;
    }
View Full Code Here

Examples of org.drools.core.rule.ContextEntry

     */
    @Before
    public void setUp() throws IntrospectionException {
        // create mock objects
        constraint = mock(BetaNodeFieldConstraint.class);
        final ContextEntry c = mock(ContextEntry.class);

        when(constraint.createContextEntry()).thenReturn(c);

        InternalRuleBase rbase = (ReteooRuleBase) RuleBaseFactory.newRuleBase();

View Full Code Here

Examples of org.drools.core.rule.ContextEntry

        }
    }

    public ContextEntry createContextEntry() {
        if (declarations.length == 0) return null;
        ContextEntry contextEntry = new MvelContextEntry(declarations);
        if (isUnification) {
            contextEntry = new UnificationContextEntry(contextEntry, declarations[0]);
        }
        return contextEntry;
    }
View Full Code Here

Examples of org.drools.core.rule.ContextEntry

     */
    @Before
    public void setUp() {
        // create mock objects
        constraint = mock(BetaNodeFieldConstraint.class);
        final ContextEntry c = mock(ContextEntry.class);

        when(constraint.createContextEntry()).thenReturn(c);

        this.rule = new RuleImpl("test-rule");

View Full Code Here

Examples of org.drools.rule.ContextEntry

                       previousDeclarations,
                       localDeclarations,
                       returnValue,
                       returnValueDescr );

        ContextEntry retValContext = returnValue.createContextEntry();

        final RuleBase ruleBase = RuleBaseFactory.newRuleBase();
        final InternalWorkingMemory wm = (InternalWorkingMemory) ruleBase.newStatefulSession();

        final Cheese stilton = new Cheese( "stilton",
                                           10 );

        final Cheese cheddar = new Cheese( "cheddar",
                                           10 );
        final InternalFactHandle f0 = (InternalFactHandle) wm.insert( cheddar );
        ReteTuple tuple = new ReteTuple( f0 );

        final InternalFactHandle f1 = (InternalFactHandle) wm.insert( stilton );
        tuple = new ReteTuple( tuple,
                               f1 );

        final Cheese brie = new Cheese( "brie",
                                        20 );
       
        ContextEntry ctx = returnValue.createContextEntry();
       
        assertTrue( returnValue.isAllowed( extractor,
                                           brie,
                                           tuple,
                                           wm,
View Full Code Here

Examples of org.drools.rule.ContextEntry

        }
    }

    public ContextEntry createContextEntry() {
        if (declarations.length == 0) return null;
        ContextEntry contextEntry = new MvelContextEntry(declarations);
        if (isUnification) {
            contextEntry = new UnificationContextEntry(contextEntry, declarations[0]);
        }
        return contextEntry;
    }
View Full Code Here

Examples of org.drools.rule.ContextEntry

     */
    @Before
    public void setUp() {
        // create mock objects
        constraint = mock( BetaNodeFieldConstraint.class );
        final ContextEntry c = mock( ContextEntry.class );

        when( constraint.createContextEntry() ).thenReturn( c );

        this.rule = new Rule( "test-rule" );
        this.context = new PropagationContextImpl( 0,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.