/** * {@inheritDoc} */ @Override public boolean hasDescendants( String ancestorId ) throws LdapException { try { String oid = getOidByName( ancestorId ); Set<ObjectClass> descendants = oidToDescendants.get( oid ); return ( descendants != null ) && !descendants.isEmpty(); } catch ( LdapException ne ) { throw new LdapNoSuchAttributeException( ne.getMessage(), ne ); } }
/** * {@inheritDoc} */ @Override public boolean hasDescendants( String ancestorId ) throws LdapException { try { String oid = getOidByName( ancestorId ); Set<ObjectClass> descendants = oidToDescendants.get( oid ); return ( descendants != null ) && !descendants.isEmpty(); } catch ( LdapException ne ) { throw new LdapNoSuchAttributeException( ne.getMessage(), ne ); } }
/** * {@inheritDoc} */ @Override public boolean hasDescendants( String ancestorId ) throws LdapException { try { String oid = getOidByName( ancestorId ); Set<AttributeType> descendants = oidToDescendantSet.get( oid ); return ( descendants != null ) && !descendants.isEmpty(); } catch ( LdapException ne ) { throw new LdapNoSuchAttributeException( ne.getMessage(), ne ); } }
/** * {@inheritDoc} */ @Override public boolean hasDescendants( String ancestorId ) throws LdapException { try { String oid = getOidByName( ancestorId ); Set<ObjectClass> descendants = oidToDescendants.get( oid ); return ( descendants != null ) && !descendants.isEmpty(); } catch ( LdapException ne ) { throw new LdapNoSuchAttributeException( ne.getMessage(), ne ); } }
/** * {@inheritDoc} */ @Override public boolean hasDescendants( String ancestorId ) throws LdapException { try { String oid = getOidByName( ancestorId ); Set<AttributeType> descendants = oidToDescendantSet.get( oid ); return ( descendants != null ) && !descendants.isEmpty(); } catch ( LdapException ne ) { throw new LdapNoSuchAttributeException( ne.getMessage(), ne ); } }
/** * {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public Iterator<AttributeType> descendants( String ancestorId ) throws LdapException { try { String oid = getOidByName( ancestorId ); Set<AttributeType> descendants = oidToDescendantSet.get( oid ); if ( descendants == null ) { return Collections.EMPTY_SET.iterator(); } return descendants.iterator(); } catch ( LdapException ne ) { throw new LdapNoSuchAttributeException( ne.getMessage(), ne ); } }
/** * {@inheritDoc} */ @Override public boolean hasDescendants( String ancestorId ) throws LdapException { try { String oid = getOidByName( ancestorId ); Set<AttributeType> descendants = oidToDescendantSet.get( oid ); return ( descendants != null ) && !descendants.isEmpty(); } catch ( LdapException ne ) { throw new LdapNoSuchAttributeException( ne.getMessage(), ne ); } }
/** * {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public Iterator<ObjectClass> descendants( String ancestorId ) throws LdapException { try { String oid = getOidByName( ancestorId ); Set<ObjectClass> descendants = oidToDescendants.get( oid ); if ( descendants == null ) { return Collections.EMPTY_SET.iterator(); } return descendants.iterator(); } catch ( LdapException ne ) { throw new LdapNoSuchAttributeException( ne.getMessage(), ne ); } }
/** * {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public Iterator<AttributeType> descendants( String ancestorId ) throws LdapException { try { String oid = getOidByName( ancestorId ); Set<AttributeType> descendants = oidToDescendantSet.get( oid ); if ( descendants == null ) { return Collections.EMPTY_SET.iterator(); } return descendants.iterator(); } catch ( LdapException ne ) { throw new LdapNoSuchAttributeException( ne.getMessage(), ne ); } }
/** * {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public Iterator<ObjectClass> descendants( String ancestorId ) throws LdapException { try { String oid = getOidByName( ancestorId ); Set<ObjectClass> descendants = oidToDescendants.get( oid ); if ( descendants == null ) { return Collections.EMPTY_SET.iterator(); } return descendants.iterator(); } catch ( LdapException ne ) { throw new LdapNoSuchAttributeException( ne.getMessage(), ne ); } }
/** * {@inheritDoc} */ @Override public String getOidByName( String name ) throws LdapException { try { return immutableAttributeTypeRegistry.getOidByName( name ); } catch ( LdapException le ) { throw new LdapNoSuchAttributeException( le.getMessage(), le ); } }
/** * {@inheritDoc} */ @Override public AttributeType lookup( String oid ) throws LdapException { try { return super.lookup( oid ); } catch ( LdapException ne ) { throw new LdapNoSuchAttributeException( ne.getMessage(), ne ); } }
/** * {@inheritDoc} */ @Override public String getOidByName( String name ) throws LdapException { try { return immutableAttributeTypeRegistry.getOidByName( name ); } catch ( LdapException le ) { throw new LdapNoSuchAttributeException( le.getMessage(), le ); } }
/** * {@inheritDoc} */ @Override public AttributeType lookup( String oid ) throws LdapException { try { return super.lookup( oid ); } catch ( LdapException ne ) { throw new LdapNoSuchAttributeException( ne.getMessage(), ne ); } }
/** * {@inheritDoc} */ @Override public AttributeType lookup( String oid ) throws LdapException { try { return super.lookup( oid ); } catch ( LdapException ne ) { throw new LdapNoSuchAttributeException( ne.getMessage(), ne ); } }
/** * {@inheritDoc} */ @Override public String getOidByName( String name ) throws LdapException { try { return immutableAttributeTypeRegistry.getOidByName( name ); } catch ( LdapException le ) { throw new LdapNoSuchAttributeException( le.getMessage(), le ); } }
/** * {@inheritDoc} */ @Override public ObjectClass unregister( String numericOid ) throws LdapException { try { ObjectClass removed = super.unregister( numericOid ); // Deleting an ObjectClass which might be used as a superior means we have // to recursively update the descendant map. We also have to remove // the at.oid -> descendant relation oidToDescendants.remove( numericOid ); // Now recurse if needed unregisterDescendants( removed, removed.getSuperiors() ); return removed; } catch ( LdapException ne ) { throw new LdapNoSuchAttributeException( ne.getMessage(), ne ); } }
/** * {@inheritDoc} */ @Override public ObjectClass unregister( String numericOid ) throws LdapException { try { ObjectClass removed = super.unregister( numericOid ); // Deleting an ObjectClass which might be used as a superior means we have // to recursively update the descendant map. We also have to remove // the at.oid -> descendant relation oidToDescendants.remove( numericOid ); // Now recurse if needed unregisterDescendants( removed, removed.getSuperiors() ); return removed; } catch ( LdapException ne ) { throw new LdapNoSuchAttributeException( ne.getMessage(), ne ); } }
/** * {@inheritDoc} */ @Override public AttributeType unregister( String numericOid ) throws LdapException { try { AttributeType removed = super.unregister( numericOid ); removeMappingFor( removed ); // Deleting an AT which might be used as a superior means we have // to recursively update the descendant map. We also have to remove // the at.oid -> descendant relation oidToDescendantSet.remove( numericOid ); // Now recurse if needed unregisterDescendants( removed, removed.getSuperior() ); return removed; } catch ( LdapException ne ) { throw new LdapNoSuchAttributeException( ne.getMessage(), ne ); } }
/** * Get the administrativePoint role */ private void checkAdministrativeRole( OperationContext opContext, Dn apDn ) throws LdapException { CoreSession session = opContext.getSession(); LookupOperationContext lookupContext = new LookupOperationContext( session, apDn, SchemaConstants.ALL_ATTRIBUTES_ARRAY ); lookupContext.setPartition( opContext.getPartition() ); lookupContext.setTransaction( opContext.getTransaction() ); Entry administrationPoint = directoryService.getPartitionNexus().lookup( lookupContext ); // The administrativeRole AT must exist and not be null Attribute administrativeRole = administrationPoint.get( directoryService.getAtProvider() .getAdministrativeRole() ); // check that administrativeRole has something valid in it for us if ( ( administrativeRole == null ) || ( administrativeRole.size() <= 0 ) ) { LOG.error( "The entry on {} is not an AdministrativePoint", apDn ); throw new LdapNoSuchAttributeException( I18n.err( I18n.ERR_306, apDn ) ); } }