LOG.trace("Group Entry: {}", e.toString(" ")); if (! e.containsAttribute(groupIdAttribute)) { LOG.warn("Unknown group id attribute {}, skipping group entry {}", groupIdAttribute, e); continue; } else { if (e.containsAttribute(ATTRIBUTE_UNIQUE_MEMBER)) { memberAttribute = ATTRIBUTE_UNIQUE_MEMBER; } else if (e.containsAttribute(ATTRIBUTE_MEMBER_UID)) { memberAttribute = ATTRIBUTE_MEMBER_UID; } else {
/** * {@inheritDoc} */ @Override public boolean containsAttribute( String... attributes ) { return entry.containsAttribute( attributes ); }
/** * {@inheritDoc} */ @Override public boolean containsAttribute( AttributeType attributeType ) { return entry.containsAttribute( attributeType ); }
/** * {@inheritDoc} */ @Override public boolean containsAttribute( AttributeType attributeType ) { return entry.containsAttribute( attributeType ); }
/** * {@inheritDoc} */ @Override public boolean containsAttribute( AttributeType attributeType ) { return entry.containsAttribute( attributeType ); }
/** * {@inheritDoc} */ @Override public boolean containsAttribute( String... attributes ) { return entry.containsAttribute( attributes ); }
/** * {@inheritDoc} */ @Override public boolean containsAttribute( String... attributes ) { return entry.containsAttribute( attributes ); }
public boolean containsAttribute( AttributeType attributeType ) { return clonedEntry.containsAttribute( attributeType ); }
public boolean containsAttribute( String... attributes ) { return clonedEntry.containsAttribute( attributes ); }
/** * Remove a list of Attributes from the LdifEntry * * @param ids The Attributes to remove */ public void removeAttribute( String... ids ) { if ( entry.containsAttribute( ids ) ) { entry.removeAttributes( ids ); } }
/** * Remove a list of Attributes from the LdifEntry * * @param ids The Attributes to remove */ public void removeAttribute( String... ids ) { if ( entry.containsAttribute( ids ) ) { entry.removeAttributes( ids ); } }
/** * Remove a list of Attributes from the LdifEntry * * @param ids The Attributes to remove */ public void removeAttribute( String... ids ) { if ( entry.containsAttribute( ids ) ) { entry.removeAttributes( ids ); } }
/** * Method wraps ldap client to return multi-occurring attribute values by name within a given entry and returns * as a set of strings. * * @param entry contains the target ldap entry. * @param attributeName name of ldap attribute to retrieve. * @return List of type string containing attribute values. */ protected Set<String> getAttributeSet( Entry entry, String attributeName ) { // create Set with case insensitive comparator: Set<String> attrValues = new TreeSet<>( String.CASE_INSENSITIVE_ORDER ); if ( entry != null && entry.containsAttribute( attributeName ) ) { for ( Value<?> value : entry.get( attributeName ) ) { attrValues.add( value.getString() ); } } return attrValues; }
/** * Check if we have to add an operational attribute, or if the admin has injected one */ private boolean checkAddOperationalAttribute( boolean isAdmin, Entry entry, AttributeType attribute ) throws LdapException { if ( entry.containsAttribute( attribute ) ) { if ( !isAdmin ) { // Wrong ! String message = I18n.err( I18n.ERR_30, attribute ); LOG.error( message ); throw new LdapNoPermissionException( message ); } else { return true; } } else { return false; } }
LOG.trace("Group Entry: {}", e.toString(" ")); if (! e.containsAttribute(groupIdAttribute)) { LOG.warn("Unknown group id attribute {}, skipping group entry {}", groupIdAttribute, e); continue; } else { if (e.containsAttribute(ATTRIBUTE_UNIQUE_MEMBER)) { memberAttribute = ATTRIBUTE_UNIQUE_MEMBER; } else if (e.containsAttribute(ATTRIBUTE_MEMBER_UID)) { memberAttribute = ATTRIBUTE_MEMBER_UID; } else {
public boolean isInternal(String username) throws GenericException, NotFoundException { final CoreSession session = this.service.getAdminSession(); Entry entry; try { entry = session.lookup(new Dn(getUserDN(username))); return entry.containsAttribute(USER_PASSWORD); } catch (LdapNoSuchObjectException e) { throw new NotFoundException(username); }catch (LdapException e) { throw new GenericException(e); } }
if ( !serverEntry.containsAttribute( SchemaConstants.ENTRY_CSN_AT ) ) if ( !serverEntry.containsAttribute( SchemaConstants.ENTRY_UUID_AT ) )
if ( !entry.containsAttribute( SchemaConstants.ENTRY_UUID_AT ) ) if ( !entry.containsAttribute( SchemaConstants.ENTRY_CSN_AT ) ) if ( !entry.containsAttribute( SchemaConstants.CREATORS_NAME_AT ) ) if ( !entry.containsAttribute( SchemaConstants.CREATE_TIMESTAMP_AT ) )
if ( entry.containsAttribute( administrativeRoleAT ) )