Package org.apache.directory.shared.ldap.entry

Examples of org.apache.directory.shared.ldap.entry.StringValue


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

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

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


            public Value<?> normalize( Value<?> value ) throws LdapException
            {
                if ( !value.isBinary() )
                {
                    return new StringValue( value.getString().toLowerCase() );
                }

                throw new IllegalStateException( I18n.err( I18n.ERR_473 ) );
            }
           
View Full Code Here

    private String subschemaSubentryDnNorm;

   
    static private void checkRefAttributeValue( Value<?> value ) throws NamingException, LdapURLEncodingException
    {
        StringValue ref = ( StringValue ) 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

       
        for ( String suffix:suffixes )
        {
            DN baseDn = new DN( suffix );
            ExprNode filter = new EqualityNode<String>( SchemaConstants.OBJECT_CLASS_AT,
                    new StringValue( ApacheSchemaConstants.TRIGGER_EXECUTION_SUBENTRY_OC ) );
            SearchControls ctls = new SearchControls();
            ctls.setSearchScope( SearchControls.SUBTREE_SCOPE );
           
            DN adminDn = new DN( ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED );
            adminDn.normalize( directoryService.getSchemaManager().getNormalizerMapping() );
View Full Code Here

    {
        // search all naming contexts for static groups and generate
        // normalized sets of members to cache within the map

        BranchNode filter = new OrNode();
        filter.addNode( new EqualityNode<String>( SchemaConstants.OBJECT_CLASS_AT, new StringValue(
            SchemaConstants.GROUP_OF_NAMES_OC ) ) );
        filter.addNode( new EqualityNode<String>( SchemaConstants.OBJECT_CLASS_AT, new StringValue(
            SchemaConstants.GROUP_OF_UNIQUE_NAMES_OC ) ) );

        Set<String> suffixes = nexus.listSuffixes( null );

        for ( String suffix:suffixes )
View Full Code Here

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

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

     * @return the LdapServer instance without a DirectoryService
     * @throws Exception
     */
    public LdapServer getLdapServer() throws Exception
    {
        EqualityNode<String> filter = new EqualityNode<String>( "objectClass", new StringValue( "ads-ldapServer" ) );
        SearchControls controls = new SearchControls();
        controls.setSearchScope( SearchControls.SUBTREE_SCOPE );

        IndexCursor<Long, ServerEntry, Long> cursor = se.cursor( configPartition.getSuffixDn(),
            AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls );
View Full Code Here

    }


    public KdcServer getKdcServer() throws Exception
    {
        EqualityNode<String> filter = new EqualityNode<String>( "objectClass", new StringValue(
            "ads-kerberosServer" ) );
        SearchControls controls = new SearchControls();
        controls.setSearchScope( SearchControls.SUBTREE_SCOPE );

        IndexCursor<Long, ServerEntry, Long> cursor = se.cursor( configPartition.getSuffixDn(),
View Full Code Here

    }


    public DnsServer getDnsServer() throws Exception
    {
        EqualityNode<String> filter = new EqualityNode<String>( "objectClass", new StringValue( "ads-dnsServer" ) );
        SearchControls controls = new SearchControls();
        controls.setSearchScope( SearchControls.SUBTREE_SCOPE );

        IndexCursor<Long, ServerEntry, Long> cursor = se.cursor( configPartition.getSuffixDn(),
            AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls );
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.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.