/** * {@inheritDoc} */ @Override public Entry newEntry( Dn dn ) { return new DefaultEntry( dn ); }
/** * Returns an apache ldap entry that represents the supplied ldap entry. * * @param le ldap entry * * @return apache ldap entry * * @throws LdapException if the apache object cannot be created */ public Entry fromLdapEntry(final LdapEntry le) throws LdapException { final DefaultEntry entry = new DefaultEntry(le.getDn()); entry.add(fromLdapAttributes(le.getAttributes())); return entry; }
/** * {@inheritDoc} */ @Override public boolean hasObjectClass( String... objectClasses ) { if ( ( objectClasses == null ) || ( objectClasses.length == 0 ) || ( objectClasses[0] == null ) ) { return false; } for ( String objectClass : objectClasses ) { if ( schemaManager != null ) { if ( !contains( objectClassAttributeType, objectClass ) ) { return false; } } else { if ( !contains( "objectclass", objectClass ) ) { return false; } } } return true; }
String id = getId( attribute ); if ( !containsAttribute( schemaManager.lookupAttributeTypeRegistry( attribute ) ) )
/** * {@inheritDoc} */ @Override public boolean contains( String upId, byte[]... values ) { if ( Strings.isEmpty( upId ) ) { return false; } String id = getId( upId ); if ( schemaManager != null ) { try { return contains( schemaManager.lookupAttributeTypeRegistry( id ), values ); } catch ( LdapException le ) { return false; } } Attribute attribute = attributes.get( id ); if ( attribute == null ) { return false; } return attribute.contains( values ); }
initObjectClassAT(); dn = normalizeDn( entry.getDn() ); add( serverAttribute );
if ( containsAttribute( id ) ) previous.add( get( id ) ); this.attributes.remove( id );
if ( containsAttribute( attribute.getId() ) )
/** * {@inheritDoc} */ @Override public boolean contains( String upId, byte[]... values ) { if ( Strings.isEmpty( upId ) ) { return false; } String id = getId( upId ); if ( schemaManager != null ) { try { return contains( schemaManager.lookupAttributeTypeRegistry( id ), values ); } catch ( LdapException le ) { return false; } } Attribute attribute = attributes.get( id ); if ( attribute == null ) { return false; } return attribute.contains( values ); }
initObjectClassAT(); dn = normalizeDn( entry.getDn() ); add( serverAttribute );
String id = getId( attribute ); if ( !containsAttribute( schemaManager.lookupAttributeTypeRegistry( attribute ) ) )
if ( containsAttribute( id ) ) previous.add( get( id ) ); this.attributes.remove( id );
if ( containsAttribute( attribute.getId() ) )
/** * Creates an AddRequest implementation to create a new entry. */ public AddRequestImpl() { super( -1, MessageTypeEnum.ADD_REQUEST ); entry = new DefaultEntry(); }
/** * {@inheritDoc} */ @Override public boolean contains( String upId, String... values ) { if ( Strings.isEmpty( upId ) ) { return false; } String id = getId( upId ); if ( schemaManager != null ) { try { return contains( schemaManager.lookupAttributeTypeRegistry( id ), values ); } catch ( LdapException le ) { return false; } } Attribute attribute = attributes.get( id ); if ( attribute == null ) { return false; } return attribute.contains( values ); }