Examples of EntryAttribute


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

                realm = realmCB.getDefaultText();
            }
            else if ( callback instanceof PasswordCallback )
            {
                PasswordCallback passwordCB = ( PasswordCallback ) callback;
                EntryAttribute userPassword = lookupPassword( getUsername(), getRealm() );

                if ( userPassword != null )
                {
                    // We assume that we have only one password available
                    byte[] password = userPassword.get().getBytes();
                   
                    String strPassword = StringTools.utf8ToString( password );
                    passwordCB.setPassword( strPassword.toCharArray() );
                }
            }
View Full Code Here

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

     * @return An instance of ClientAttribute
     */
    public EntryAttribute toClientAttribute()
    {
        // Create the new EntryAttribute
        EntryAttribute clientAttribute = new DefaultClientAttribute( upId );
       
        // Copy the values
        for ( Value<?> value:this )
        {
            Value<?> clientValue = null;
           
            if ( value instanceof ServerStringValue )
            {
                clientValue = new ClientStringValue( value.getString() );
            }
            else
            {
                clientValue = new ClientBinaryValue( value.getBytes() );
            }
           
            clientAttribute.add( clientValue );
        }
       
        return clientAttribute;
    }
View Full Code Here

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

            return dependees;
        }

        for ( ServerEntry sr : results )
        {
            EntryAttribute cn = sr.get( cnAT );
            dependees.add( cn.getString() );
        }

        return dependees;
    }
View Full Code Here

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

            return dependees;
        }

        for ( ServerEntry sr : results )
        {
            EntryAttribute cn = sr.get( cnAT );
            dependees.add( cn.getString() );
        }

        return dependees;
    }
View Full Code Here

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

    }


    private String getOid( ServerEntry entry ) throws Exception
    {
        EntryAttribute oid = entry.get( mOidAT );

        if ( oid == null )
        {
            return null;
        }

        return oid.getString();
    }
View Full Code Here

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

        List<String> values = new ArrayList<String>();
        values.add( schemaName );
        description.addExtension( MetaSchemaConstants.X_SCHEMA, values );
        description.setFqcn( entry.get( fqcnAT ).getString() );

        EntryAttribute desc = entry.get( descAT );
        if ( desc != null && desc.size() > 0 )
        {
            description.setDescription( desc.getString() );
        }

        EntryAttribute bytecode = entry.get( byteCodeAT );

        if ( bytecode != null && bytecode.size() > 0 )
        {
            byte[] bytes = bytecode.getBytes();
            description.setBytecode( new String( Base64.encode( bytes ) ) );
        }

        return description;
    }
View Full Code Here

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

        List<String> values = new ArrayList<String>();
        values.add( schemaName );
        description.addExtension( MetaSchemaConstants.X_SCHEMA, values );
        description.setFqcn( entry.get( fqcnAT ).getString() );

        EntryAttribute desc = entry.get( descAT );

        if ( desc != null && desc.size() > 0 )
        {
            description.setDescription( desc.getString() );
        }

        EntryAttribute bytecode = entry.get( byteCodeAT );

        if ( bytecode != null && bytecode.size() > 0 )
        {
            byte[] bytes = bytecode.getBytes();
            description.setBytecode( new String( Base64.encode( bytes ) ) );
        }

        return description;
    }
View Full Code Here

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

        List<String> values = new ArrayList<String>();
        values.add( schemaName );
        description.addExtension( MetaSchemaConstants.X_SCHEMA, values );
        description.setFqcn( entry.get( fqcnAT ).getString() );

        EntryAttribute desc = entry.get( descAT );

        if ( desc != null && desc.size() > 0 )
        {
            description.setDescription( desc.getString() );
        }

        EntryAttribute bytecode = entry.get( byteCodeAT );

        if ( bytecode != null && bytecode.size() > 0 )
        {
            byte[] bytes = bytecode.getBytes();
            description.setBytecode( new String( Base64.encode( bytes ) ) );
        }

        return description;
    }
View Full Code Here

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

       
        String[] dependencies = schema.getDependencies();
       
        if ( dependencies != null && dependencies.length > 0 )
        {
            EntryAttribute attr = new DefaultServerAttribute( schemaManager.lookupAttributeTypeRegistry( MetaSchemaConstants.M_DEPENDENCIES_AT ) );
           
            for ( String dependency:dependencies )
            {
                attr.add( dependency );
            }
           
            entry.put( attr );
        }
       
View Full Code Here

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

        injectCommon( objectClass, entry, schemaManager );

        // handle the superior objectClasses
        if ( objectClass.getSuperiorOids() != null && objectClass.getSuperiorOids().size() != 0 )
        {
            EntryAttribute attr = new DefaultServerAttribute( schemaManager.lookupAttributeTypeRegistry( MetaSchemaConstants.M_SUP_OBJECT_CLASS_AT ) );
           
            for ( String superior:objectClass.getSuperiorOids() )
            {
                attr.add( superior );
            }
           
            entry.put( attr );
        }

        // add the must list
        if ( objectClass.getMustAttributeTypeOids() != null && objectClass.getMustAttributeTypeOids().size() != 0 )
        {
            EntryAttribute attr = new DefaultServerAttribute( schemaManager.lookupAttributeTypeRegistry( MetaSchemaConstants.M_MUST_AT ) );

            for ( String mustOid :objectClass.getMustAttributeTypeOids() )
            {
                attr.add( mustOid );
            }
           
            entry.put( attr );
        }
       
        // add the may list
        if ( objectClass.getMayAttributeTypeOids() != null && objectClass.getMayAttributeTypeOids().size() != 0 )
        {
            EntryAttribute attr = new DefaultServerAttribute( schemaManager.lookupAttributeTypeRegistry( MetaSchemaConstants.M_MAY_AT ) );

            for ( String mayOid :objectClass.getMayAttributeTypeOids() )
            {
                attr.add( mayOid );
            }
           
            entry.put( attr );
        }
       
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.