isHR = attributeType.getSyntax().isHumanReadable();
isHR = attributeType.getSyntax().isHumanReadable();
isHR = attributeType.getSyntax().isHumanReadable();
/** * {@inheritDoc} */ @Override public boolean isBinary( String attributeId ) { String attrId = Strings.toLowerCaseAscii( attributeId ); if ( attrId.endsWith( ";binary" ) ) { return true; } if ( schemaManager != null ) { AttributeType attributeType = schemaManager.getAttributeType( attrId ); if ( attributeType == null ) { return false; } LdapSyntax ldapSyntax = attributeType.getSyntax(); return ( ldapSyntax != null ) && !ldapSyntax.isHumanReadable(); } return false; } }
/** * {@inheritDoc} */ @Override public boolean isBinary( String attributeId ) { String attrId = Strings.toLowerCaseAscii( attributeId ); if ( attrId.endsWith( ";binary" ) ) { return true; } if ( schemaManager != null ) { AttributeType attributeType = schemaManager.getAttributeType( attrId ); if ( attributeType == null ) { return false; } LdapSyntax ldapSyntax = attributeType.getSyntax(); return ( ldapSyntax != null ) && !ldapSyntax.isHumanReadable(); } return false; } }
/** * {@inheritDoc} */ @Override public boolean isBinary( String attributeId ) { String attrId = Strings.toLowerCaseAscii( attributeId ); if ( attrId.endsWith( ";binary" ) ) { return true; } if ( schemaManager != null ) { AttributeType attributeType = schemaManager.getAttributeType( attrId ); if ( attributeType == null ) { return false; } LdapSyntax ldapSyntax = attributeType.getSyntax(); return ( ldapSyntax != null ) && !ldapSyntax.isHumanReadable(); } return false; } }
/** * Set the latest value map to a defined anonymizer - if it exists -. * * @param attributeType The AttributeType we are targetting * @param latestValueMap The latest value map for this attribute */ public void setAttributeLatestValueMap( AttributeType attributeType, Map<Integer, ?> latestValueMap ) { Anonymizer anonymizer = attributeAnonymizers.get( attributeType.getOid() ); if ( anonymizer != null ) { if ( attributeType.getSyntax().isHumanReadable() ) { anonymizer.setLatestStringMap( latestValueMap ); } else { anonymizer.setLatestBytesMap( latestValueMap ); } } }
/** * Set the latest value map to a defined anonymizer - if it exists -. * * @param attributeType The AttributeType we are targetting * @param latestValueMap The latest value map for this attribute */ public void setAttributeLatestValueMap( AttributeType attributeType, Map<Integer, ?> latestValueMap ) { Anonymizer anonymizer = attributeAnonymizers.get( attributeType.getOid() ); if ( anonymizer != null ) { if ( attributeType.getSyntax().isHumanReadable() ) { anonymizer.setLatestStringMap( latestValueMap ); } else { anonymizer.setLatestBytesMap( latestValueMap ); } } }
/** * Set the latest value map to a defined anonymizer - if it exists -. * * @param attributeType The AttributeType we are targetting * @param latestValueMap The latest value map for this attribute */ public void setAttributeLatestValueMap( AttributeType attributeType, Map<Integer, ?> latestValueMap ) { Anonymizer anonymizer = attributeAnonymizers.get( attributeType.getOid() ); if ( anonymizer != null ) { if ( attributeType.getSyntax().isHumanReadable() ) { anonymizer.setLatestStringMap( latestValueMap ); } else { anonymizer.setLatestBytesMap( latestValueMap ); } } }
private Object getValue( String attributeName, byte[] value ) { if ( schemaManager != null ) { AttributeType attributeType = schemaManager.getAttributeType( attributeName ); if ( attributeType != null ) { if ( attributeType.getSyntax().isHumanReadable() ) { return Strings.utf8ToString( value ); } else { return value; } } else { return value; } } else { return value; } }
private Object getValue( String attributeName, byte[] value ) { if ( schemaManager != null ) { AttributeType attributeType = schemaManager.getAttributeType( attributeName ); if ( attributeType != null ) { if ( attributeType.getSyntax().isHumanReadable() ) { return Strings.utf8ToString( value ); } else { return value; } } else { return value; } } else { return value; } }
private Object getValue( String attributeName, byte[] value ) { if ( schemaManager != null ) { AttributeType attributeType = schemaManager.getAttributeType( attributeName ); if ( attributeType != null ) { if ( attributeType.getSyntax().isHumanReadable() ) { return Strings.utf8ToString( value ); } else { return value; } } else { return value; } } else { return value; } }
LdapSyntax syntax = attributeType.getSyntax(); if ( syntax.isHumanReadable() )
LdapSyntax syntax = attributeType.getSyntax(); if ( syntax.isHumanReadable() )
/** * {@inheritDoc} */ @Override public Object normalizeByName( String name, String value ) throws LdapException { AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( name ); Normalizer normalizer = lookup( name ); if ( attributeType.getSyntax().isHumanReadable() ) { return normalizer.normalize( value ); } else { String unescaped = unescape( value ); return normalizer.normalize( unescaped ); } }
/** * {@inheritDoc} */ @Override public Object normalizeByName( String name, String value ) throws LdapException { AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( name ); Normalizer normalizer = lookup( name ); if ( attributeType.getSyntax().isHumanReadable() ) { return normalizer.normalize( value ); } else { String unescaped = unescape( value ); return normalizer.normalize( unescaped ); } }
/** * {@inheritDoc} */ @Override public Object normalizeByName( String name, String value ) throws LdapException { AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( name ); Normalizer normalizer = lookup( name ); if ( attributeType.getSyntax().isHumanReadable() ) { return normalizer.normalize( value ); } else { String unescaped = unescape( value ); return normalizer.normalize( unescaped ); } }
/** * {@inheritDoc} */ @Override public Object normalizeByName( AttributeType attributeType, String value ) throws LdapException { MatchingRule mrule = attributeType.getEquality(); Normalizer normalizer; if ( mrule == null ) { return new NoOpNormalizer( attributeType.getOid() ); } else { normalizer = attributeType.getEquality().getNormalizer(); } if ( attributeType.getSyntax().isHumanReadable() ) { return normalizer.normalize( value ); } else { String unescaped = unescape( value ); return normalizer.normalize( unescaped ); } }
/** * {@inheritDoc} */ @Override public Object normalizeByName( AttributeType attributeType, String value ) throws LdapException { MatchingRule mrule = attributeType.getEquality(); Normalizer normalizer; if ( mrule == null ) { return new NoOpNormalizer( attributeType.getOid() ); } else { normalizer = attributeType.getEquality().getNormalizer(); } if ( attributeType.getSyntax().isHumanReadable() ) { return normalizer.normalize( value ); } else { String unescaped = unescape( value ); return normalizer.normalize( unescaped ); } }
/** * {@inheritDoc} */ @Override public Object normalizeByName( AttributeType attributeType, String value ) throws LdapException { MatchingRule mrule = attributeType.getEquality(); Normalizer normalizer; if ( mrule == null ) { return new NoOpNormalizer( attributeType.getOid() ); } else { normalizer = attributeType.getEquality().getNormalizer(); } if ( attributeType.getSyntax().isHumanReadable() ) { return normalizer.normalize( value ); } else { String unescaped = unescape( value ); return normalizer.normalize( unescaped ); } }