Package org.apache.directory.api.ldap.model.entry

Examples of org.apache.directory.api.ldap.model.entry.StringValue


    private byte[] findClassInDIT( List<Dn> searchContexts, String name ) throws ClassNotFoundException
    {
        // Set up the search filter
        BranchNode filter = new AndNode();
        AttributeType fqjcnAt = directoryService.getSchemaManager().getAttributeType( "fullyQualifiedJavaClassName" );
        filter.addNode( new EqualityNode<String>( fqjcnAt, new StringValue( name ) ) );
        filter.addNode( new EqualityNode<String>( OBJECT_CLASS_AT,
            new StringValue( ApacheSchemaConstants.JAVA_CLASS_OC ) ) );

        try
        {
            for ( Dn base : searchContexts )
            {
View Full Code Here


    @Test
    public void testCursorIndexed() throws Exception
    {
        AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.POSTALCODE_AT_OID );
        LessEqNode<String> node = new LessEqNode<String>( at, new StringValue( at, "3" ) );
        LessEqEvaluator<String> evaluator = new LessEqEvaluator<String>( node, store, schemaManager );
        LessEqCursor<String> cursor = new LessEqCursor<String>( store, evaluator );
        assertNotNull( cursor );
        assertFalse( cursor.available() );
        assertFalse( cursor.isClosed() );
View Full Code Here

    @Test
    public void testCursorNotIndexed() throws Exception
    {
        AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.POSTOFFICEBOX_AT_OID );
        LessEqNode<String> node = new LessEqNode<String>( at, new StringValue( at, "3" ) );
        LessEqEvaluator<String> evaluator = new LessEqEvaluator<String>( node, store, schemaManager );
        LessEqCursor<String> cursor = new LessEqCursor<String>( store, evaluator );
        assertNotNull( cursor );
        assertFalse( cursor.available() );
        assertFalse( cursor.isClosed() );
View Full Code Here

    @Test
    public void testEvaluatorIndexed() throws Exception
    {
        AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.POSTALCODE_AT_OID );
        LessEqNode<String> node = new LessEqNode<String>( at, new StringValue( at, "3" ) );

        LessEqEvaluator<String> evaluator = new LessEqEvaluator<String>( node, store, schemaManager );
        IndexEntry<String, String> indexEntry = new IndexEntry<String, String>();
        assertEquals( node, evaluator.getExpression() );
        assertEquals( SchemaConstants.POSTALCODE_AT_OID, evaluator.getAttributeType().getOid() );
View Full Code Here

    @Test
    public void testEvaluatorWithDescendantValue() throws Exception
    {
        AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.STREET_AT_OID );
        LessEqNode<String> node = new LessEqNode<String>( at, new StringValue( at, "2" ) );

        LessEqEvaluator<String> evaluator = new LessEqEvaluator<String>( node, store, schemaManager );
        IndexEntry<String, String> indexEntry = new IndexEntry<String, String>();
        assertEquals( node, evaluator.getExpression() );
        assertEquals( SchemaConstants.STREET_AT_OID, evaluator.getAttributeType().getOid() );
View Full Code Here

        String spUnitName = StoredProcUtils.extractStoredProcUnitName( fullSPName );

        AttributeType storeProcUnitNamAT = session.getDirectoryService()
            .getSchemaManager().lookupAttributeTypeRegistry( "storedProcUnitName" );
        ExprNode filter = new EqualityNode<String>( storeProcUnitNamAT,
            new StringValue( storeProcUnitNamAT, spUnitName ) );
        Dn dn = session.getDirectoryService().getDnFactory().create( storedProcContainer );
        Cursor<Entry> results = session.search( dn, SearchScope.SUBTREE, filter,
            AliasDerefMode.DEREF_ALWAYS );
       
        if ( results.first() )
View Full Code Here

    @Test
    public void testEvaluatorWithoutDescendants() throws Exception
    {
        AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.C_POSTALCODE_AT_OID );
        LessEqNode<String> node = new LessEqNode<String>( at, new StringValue( at, "2" ) );

        LessEqEvaluator<String> evaluator = new LessEqEvaluator<String>( node, store, schemaManager );
        IndexEntry<String, String> indexEntry = new IndexEntry<String, String>();
        assertEquals( node, evaluator.getExpression() );
        assertEquals( SchemaConstants.C_POSTALCODE_AT_OID, evaluator.getAttributeType().getOid() );
View Full Code Here

    @Test
    public void testEvaluatorNotIndexed() throws Exception
    {
        AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.POSTOFFICEBOX_AT_OID );
        LessEqNode<String> node = new LessEqNode<String>( at, new StringValue( at, "3" ) );

        LessEqEvaluator<String> evaluator = new LessEqEvaluator<String>( node, store, schemaManager );
        IndexEntry<String, String> indexEntry = new IndexEntry<String, String>();
        assertEquals( node, evaluator.getExpression() );
        assertEquals( SchemaConstants.POSTOFFICEBOX_AT_OID, evaluator.getAttributeType().getOid() );
View Full Code Here

        assertTrue( schemaManager.add( syntax ) );
        assertTrue( schemaManager.add( at ) );

        try
        {
            LessEqNode<String> node = new LessEqNode<String>( at, new StringValue( at, "3" ) );

            new LessEqEvaluator<String>( node, store, schemaManager );
        }
        finally
        {
View Full Code Here

        List<String> names = new ArrayList<String>();
        names.add( "bogus" );
        desc.setNames( names );
        desc.setObsolete( false );

        LessEqNode<String> node = new LessEqNode<String>( at, new StringValue( at, "3" ) );
        new LessEqEvaluator<String>( node, store, schemaManager );
        schemaManager.delete( at );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.api.ldap.model.entry.StringValue

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.