Package org.apache.directory.server.core.entry

Examples of org.apache.directory.server.core.entry.ServerStringValue


            objectClassAttributeType = session.getCoreSession().getDirectoryService().
                getSchemaManager().lookupAttributeTypeRegistry( SchemaConstants.OBJECT_CLASS_AT );
        }
       
        EqualityNode<String> ocIsReferral = new EqualityNode<String>( SchemaConstants.OBJECT_CLASS_AT,
            new ServerStringValue( objectClassAttributeType, SchemaConstants.REFERRAL_OC ) );
       
        return ocIsReferral;
    }
View Full Code Here


     * @throws Exception if there are problems while looking up attributes
     */
    private static ExprNode getFilter( SchemaManager schemaManager, String principal ) throws Exception
    {
        AttributeType type = schemaManager.lookupAttributeTypeRegistry( KerberosAttribute.KRB5_PRINCIPAL_NAME_AT );
        Value<String> value = new ServerStringValue( type, principal );
        return new EqualityNode<String>( KerberosAttribute.KRB5_PRINCIPAL_NAME_AT, value );
    }
View Full Code Here

    private String subschemaSubentryDnNorm;

   
    static private void checkRefAttributeValue( Value<?> value ) throws NamingException, LdapURLEncodingException
    {
        ServerStringValue ref = ( ServerStringValue ) value;

        String refVal = ref.getString();

        LdapURL ldapUrl = new LdapURL( refVal );

        // We have a LDAP URL, we have to check that :
        // - we don't have scope specifier
View Full Code Here

        // make sure we add the request controls to operation
        if ( attributeType.getSyntax().isHumanReadable() )
        {
            if ( value instanceof String )
            {
                val = new ServerStringValue( attributeType, (String)value );
            }
            else if ( value instanceof byte[] )
            {
                val = new ServerStringValue( attributeType, StringTools.utf8ToString( (byte[])value ) );
            }
            else
            {
                throw new NamingException( I18n.err( I18n.ERR_309, oid ) );
            }
View Full Code Here

                log.debug( "Adding Attribute id : 'userPassword',  Values : [ {} ]", sb.toString() );
            }

            if ( entry.get( SchemaConstants.CN_AT ) != null )
            {
                ServerStringValue attr = (ServerStringValue)entry.get( SchemaConstants.CN_AT ).get();
                username = attr.getString();
            }

            // If userPassword fails checks, throw new NamingException.
            check( username, strUserPassword );
        }
View Full Code Here

        // make sure we add the request controls to operation
        if ( attributeType.getSyntax().isHumanReadable() )
        {
            if ( value instanceof String )
            {
                val = new ServerStringValue( attributeType, (String)value );
            }
            else if ( value instanceof byte[] )
            {
                val = new ServerStringValue( attributeType, StringTools.utf8ToString( (byte[])value ) );
            }
            else
            {
                throw new NamingException( I18n.err( I18n.ERR_309, oid ) );
            }
View Full Code Here

        controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
        String spUnitName = StoredProcUtils.extractStoredProcUnitName( fullSPName );
       
        AttributeType at = session.getDirectoryService()
            .getSchemaManager().lookupAttributeTypeRegistry( "storedProcUnitName" );
        ExprNode filter = new EqualityNode<String>( "storedProcUnitName", new ServerStringValue( at, spUnitName ) );
        DN dn = new DN( storedProcContainer );
        EntryFilteringCursor results = session.search( dn, SearchScope.SUBTREE, filter,
            AliasDerefMode.DEREF_ALWAYS, EMPTY_ATTRIBS );
        if ( results.first() )
        {
View Full Code Here

        controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
        String spUnitName = StoredProcUtils.extractStoredProcUnitName( fullSPName );
       
        AttributeType at = session.getDirectoryService()
            .getRegistries().getAttributeTypeRegistry().lookup( "storedProcUnitName" );
        ExprNode filter = new EqualityNode<String>( "storedProcUnitName", new ServerStringValue( at, spUnitName ) );
        LdapDN dn = new LdapDN( storedProcContainer );
        EntryFilteringCursor results = session.search( dn, SearchScope.SUBTREE, filter,
            AliasDerefMode.DEREF_ALWAYS, EMPTY_ATTRIBS );
        if ( results.first() )
        {
View Full Code Here

                log.debug( "Adding Attribute id : 'userPassword',  Values : [ {} ]", sb.toString() );
            }

            if ( entry.get( SchemaConstants.CN_AT ) != null )
            {
                ServerStringValue attr = (ServerStringValue)entry.get( SchemaConstants.CN_AT ).get();
                username = attr.getString();
            }

            // If userPassword fails checks, throw new NamingException.
            check( username, strUserPassword );
        }
View Full Code Here

        // make sure we add the request controls to operation
        if ( attributeType.getSyntax().isHumanReadable() )
        {
            if ( value instanceof String )
            {
                val = new ServerStringValue( attributeType, (String)value );
            }
            else if ( value instanceof byte[] )
            {
                val = new ServerStringValue( attributeType, StringTools.utf8ToString( (byte[])value ) );
            }
            else
            {
                throw new NamingException( "Bad value for the OID " + oid );
            }
View Full Code Here

TOP

Related Classes of org.apache.directory.server.core.entry.ServerStringValue

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.