/** * Remove an attributeType that has to be anonymized * * @param attributeType the AttributeType that we don't want to be anonymized */ public void removeAnonAttributeType( AttributeType attributeType ) { attributeAnonymizers.remove( attributeType.getOid() ); }
/** * {@inheritDoc} */ @Override public boolean containsAttribute( AttributeType attributeType ) { if ( attributeType == null ) { return false; } return attributes.containsKey( attributeType.getOid() ); }
/** * Remove an attributeType that has to be anonymized * * @param attributeType the AttributeType that we don't want to be anonymized */ public void removeAnonAttributeType( AttributeType attributeType ) { attributeAnonymizers.remove( attributeType.getOid() ); }
/** * {@inheritDoc} */ @Override public boolean containsAttribute( AttributeType attributeType ) { if ( attributeType == null ) { return false; } return attributes.containsKey( attributeType.getOid() ); }
/** * Remove an attributeType that has to be anonymized * * @param attributeType the AttributeType that we don't want to be anonymized */ public void removeAnonAttributeType( AttributeType attributeType ) { attributeAnonymizers.remove( attributeType.getOid() ); }
/** * {@inheritDoc} */ @Override public boolean containsAttribute( AttributeType attributeType ) { if ( attributeType == null ) { return false; } return attributes.containsKey( attributeType.getOid() ); }
/** * {@inheritDoc} */ @Override public Attribute get( AttributeType attributeType ) { if ( attributeType != null ) { return attributes.get( attributeType.getOid() ); } else { return null; } }
/** * {@inheritDoc} */ @Override public Attribute get( AttributeType attributeType ) { if ( attributeType != null ) { return attributes.get( attributeType.getOid() ); } else { return null; } }
/** * {@inheritDoc} */ @Override public boolean hasDescendants( AttributeType ancestor ) throws LdapException { String oid = ancestor.getOid(); Set<AttributeType> descendants = oidToDescendantSet.get( oid ); return ( descendants != null ) && !descendants.isEmpty(); }
/** * {@inheritDoc} */ @Override public boolean hasDescendants( AttributeType ancestor ) throws LdapException { String oid = ancestor.getOid(); Set<AttributeType> descendants = oidToDescendantSet.get( oid ); return ( descendants != null ) && !descendants.isEmpty(); }
/** * {@inheritDoc} */ @Override public boolean hasDescendants( AttributeType ancestor ) throws LdapException { String oid = ancestor.getOid(); Set<AttributeType> descendants = oidToDescendantSet.get( oid ); return ( descendants != null ) && !descendants.isEmpty(); }
/** * {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public Iterator<AttributeType> descendants( AttributeType ancestor ) throws LdapException { String oid = ancestor.getOid(); Set<AttributeType> descendants = oidToDescendantSet.get( oid ); if ( descendants == null ) { return Collections.EMPTY_SET.iterator(); } return descendants.iterator(); }
/** * {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public Iterator<AttributeType> descendants( AttributeType ancestor ) throws LdapException { String oid = ancestor.getOid(); Set<AttributeType> descendants = oidToDescendantSet.get( oid ); if ( descendants == null ) { return Collections.EMPTY_SET.iterator(); } return descendants.iterator(); }
/** * Add an attributeType that has to be anonymized, with its associated anonymizer. * * @param attributeType the AttributeType that has to be anonymized * @param anonymizer the instance of anonymizer to use with this AttributeType * @throws LdapException If the attributeType cannot be added */ public void addAnonAttributeType( AttributeType attributeType, Anonymizer<?> anonymizer ) throws LdapException { schemaManager.add( attributeType ); attributeAnonymizers.put( attributeType.getOid(), anonymizer ); }
/** * Add an attributeType that has to be anonymized, with its associated anonymizer. * * @param attributeType the AttributeType that has to be anonymized * @param anonymizer the instance of anonymizer to use with this AttributeType * @throws LdapException If the attributeType cannot be added */ public void addAnonAttributeType( AttributeType attributeType, Anonymizer<?> anonymizer ) throws LdapException { schemaManager.add( attributeType ); attributeAnonymizers.put( attributeType.getOid(), anonymizer ); }
/** * Add an attributeType that has to be anonymized, with its associated anonymizer. * * @param attributeType the AttributeType that has to be anonymized * @param anonymizer the instance of anonymizer to use with this AttributeType * @throws LdapException If the attributeType cannot be added */ public void addAnonAttributeType( AttributeType attributeType, Anonymizer<?> anonymizer ) throws LdapException { schemaManager.add( attributeType ); attributeAnonymizers.put( attributeType.getOid(), anonymizer ); }
private void createAttributeMaps( Schema schema ) { Collection<AttributeType> atds = schema.getAttributeTypeDescriptions(); for ( AttributeType atd : atds ) { attributeOid2AtdMap.put( atd.getOid(), atd ); for ( String name : atd.getNames() ) { attributeNames2AtdMap.put( name, atd ); } } }
/** * Sets the superior for this AttributeType * * @param superior The superior for this AttributeType */ public void setSuperior( AttributeType superior ) { if ( locked ) { throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) ); } this.superior = superior; this.superiorOid = superior.getOid(); }
/** * Sets the superior for this AttributeType * * @param superior The superior for this AttributeType */ public void setSuperior( AttributeType superior ) { if ( locked ) { throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) ); } this.superior = superior; this.superiorOid = superior.getOid(); }
/** * Sets the superior for this AttributeType * * @param superior The superior for this AttributeType */ public void setSuperior( AttributeType superior ) { if ( locked ) { throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) ); } this.superior = superior; this.superiorOid = superior.getOid(); }