/** * Sets the attribute value to use in the comparison. * * @param attrVal * the attribute value used in comparison. */ public void setAssertionValue( String attrVal ) { this.attrVal = new StringValue( attrVal ); }
if ( stringValue.getAttributeType() == null ) stringValue.apply( attributeType );
if ( this.isNull() ) return other.isNull(); return this.getNormalizedValue().equals( other.getNormalizedValue() ); return this.getNormalizedValue().equals( other.getNormalizedValue() ); if ( getReference().equals( other.getReference() ) ) LdapComparator<String> comparator = getLdapComparator(); return getNormalizedValue().equals( other.getNormalizedValue() ); if ( isNormalized() ) return comparator.compare( getNormalizedValue(), other.getNormalizedValue() ) == 0; return comparator.compare( normalizer.normalize( get() ), normalizer.normalize( other.get() ) ) == 0; return this.getNormalizedValue().equals( other.getNormalizedValue() );
if ( isNull() ) String message = I18n.err( I18n.ERR_04128, toString(), value.getClass() ); LOG.error( message ); throw new NotImplementedException( message ); if ( stringValue.getAttributeType() == null ) return getNormalizedValue().compareTo( stringValue.getNormalizedValue() ); if ( !attributeType.equals( stringValue.getAttributeType() ) ) String message = I18n.err( I18n.ERR_04128, toString(), value.getClass() ); LOG.error( message ); throw new NotImplementedException( message ); return getNormalizedValue().compareTo( stringValue.getNormalizedValue() ); return getLdapComparator().compare( getNormalizedValue(), stringValue.getNormalizedValue() );
Value<String> nullSV = new StringValue( attributeType, (String)null ); if ( stringValue.getAttributeType() == null ) stringValue.apply( attributeType );
value = new StringValue( attributeType ); ((StringValue)value).deserialize( in );
return new StringValue( sb.toString() ); val = ( ( StringValue ) value ).getString(); return ( sb == null ? value : new StringValue( sb.toString() ) );
return ( ( StringValue ) object ).get();
/** * Construct an AVA. The type and value are normalized : * <li> the type is trimmed and lowercased </li> * <li> the value is trimmed </li> * <p> * Note that the upValue should <b>not</b> be null or empty, or resolved * to an empty string after having trimmed it. * * @param upType The Usrr Provided type * @param normType The normalized type * @param upValue The User Provided value * @param normValue The normalized value */ public AVA( String upType, String normType, String upValue, String normValue ) throws LdapInvalidDnException { this( upType, normType, new StringValue( upValue ), new StringValue( normValue ) ); }
if ( stringValue.getAttributeType() == null ) stringValue.apply( attributeType );
/** * @see EntryAttribute#remove(String...) * * @return <code>true</code> if all the values shave been removed from this attribute */ public boolean remove( String... vals ) { if ( !isHR ) { return false; } boolean removed = true; for ( String val:vals ) { StringValue value = new StringValue( attributeType, val ); removed &= values.remove( value ); } return removed; }
/** * {@inheritDoc} */ public Value<?> normalize( Value<?> value ) throws LdapInvalidDnException { if ( value == null ) { return null; } String strValue = value.getString(); return new StringValue( strValue.trim().toUpperCase() ); }
StringValue value = new StringValue( attributeType, val );
/** * {@inheritDoc} */ public Value<?> normalize( Value<?> value ) throws LdapException { String str = value.getString(); if ( StringTools.isEmpty( str ) ) { return new StringValue( str ); } return new StringValue( str ); }
/** * {@inheritDoc} */ public Value<?> normalize( Value<?> value ) throws LdapException { if ( value == null ) { return null; } String str = value.getString().trim(); if ( str.length() == 0 ) { return new StringValue( "" ); } else if ( Character.isDigit( str.charAt( 0 ) ) ) { // We do this test to avoid a lowerCasing which cost time return new StringValue( str ); } else { return new StringValue( str.toLowerCase() ); } }
/** * A constructor that constructs a RDN from a type and a value. Constructs * an Rdn from the given attribute type and value. The string attribute * values are not interpreted as RFC 2253 formatted RDN strings. That is, * the values are used literally (not parsed) and assumed to be un-escaped. * * @param upType The user provided type of the RDN * @param upValue The user provided value of the RDN * @throws LdapInvalidDnException If the RDN is invalid */ public RDN( String upType, String upValue ) throws LdapInvalidDnException { addAttributeTypeAndValue( upType, upType, new StringValue( upValue ), new StringValue( upValue ) ); upName = upType + '=' + upValue; start = 0; length = upName.length(); // create the internal normalized form normalize(); }
/** * A constructor that constructs a RDN from a type and a value. Constructs * an Rdn from the given attribute type and value. The string attribute * values are not interpreted as RFC 2253 formatted RDN strings. That is, * the values are used literally (not parsed) and assumed to be un-escaped. * * @param upType The user provided type of the RDN * @param upValue The user provided value of the RDN * @param normType The normalized provided type of the RDN * @param normValue The normalized provided value of the RDN * @throws LdapInvalidDnException If the RDN is invalid */ public RDN( String upType, String normType, String upValue, String normValue ) throws LdapInvalidDnException { addAttributeTypeAndValue( upType, normType, new StringValue( upValue ), new StringValue( normValue ) ); upName = upType + '=' + upValue; start = 0; length = upName.length(); // create the internal normalized form normalize(); }
/** * Store the value of a AVA, after having trimmed it. * * @param value The value of the AVA */ public void setValueNormalized( String value ) { String newValue = StringTools.trim( value ); if ( StringTools.isEmpty( newValue ) ) { this.normValue = new StringValue( "" ); } else { this.normValue = new StringValue( newValue ); } upName = upName.substring( 0, upName.indexOf( '=' ) + 1 ) + value; start = -1; length = upName.length(); }
public Value<?> normalize( Value<?> value ) throws LdapException { if ( !value.isBinary() ) { return new StringValue( value.getString().toLowerCase() ); } throw new IllegalStateException( I18n.err( I18n.ERR_473 ) ); }
buf.append( AbstractExprNode.escapeFilterValue( new StringValue( initialPattern ) ) ).append( '*' ); buf.append( AbstractExprNode.escapeFilterValue( new StringValue( any ) ) ); buf.append( '*' ); buf.append( AbstractExprNode.escapeFilterValue( new StringValue( finalPattern ) ) );