/** * Return a String value, from the given Value, even if it's a binary value * * @param attribute The Attribute to process * @return The Attribute value as a String */ private String getStringValue( Attribute attribute ) { Value value = attribute.get(); return value.getValue(); }
/** * Return a String value, from the given Value, even if it's a binary value * * @param attribute The Attribute to process * @return The Attribute value as a String */ private String getStringValue( Attribute attribute ) { Value value = attribute.get(); return value.getValue(); }
/** * Return a String value, from the given Value, even if it's a binary value * * @param attribute The Attribute to process * @return The Attribute value as a String */ private String getStringValue( Attribute attribute ) { Value value = attribute.get(); return value.getValue(); }
/** * Create a list of string from a multivalued attribute's values * * @param attr The Attribute to read * @return The list of values as Strings */ private List<String> getStrings( Attribute attr ) { if ( attr == null ) { return EMPTY_LIST; } List<String> strings = new ArrayList<>( attr.size() ); for ( Value value : attr ) { strings.add( value.getValue() ); } return strings; }
/** * Normalize a Value * * @param value The value to normalize * @return The normalized value * @exception LdapException If teh value cannot be normalized or is invalid */ public Value normalize( Value value ) throws LdapException { String normalized = normalize( value.getValue() ); return new Value( normalized ); }
/** * Normalize a Value * * @param value The value to normalize * @return The normalized value * @exception LdapException If teh value cannot be normalized or is invalid */ public Value normalize( Value value ) throws LdapException { String normalized = normalize( value.getValue() ); return new Value( normalized ); }
/** * Normalize a Value * * @param value The value to normalize * @return The normalized value * @exception LdapException If teh value cannot be normalized or is invalid */ public Value normalize( Value value ) throws LdapException { String normalized = normalize( value.getValue() ); return new Value( normalized ); }
private EqualityNode<String> newIsReferralEqualityNode( LdapSession session ) throws Exception { EqualityNode<String> ocIsReferral = new EqualityNode<String>( SchemaConstants.OBJECT_CLASS_AT, new Value( objectClassAT, SchemaConstants.REFERRAL_OC ).getValue() ); return ocIsReferral; }
/** * {@inheritDoc} */ @Override public String getString() throws LdapInvalidAttributeValueException { Value value = get(); if ( isHumanReadable() && ( value != null ) ) { return value.getValue(); } String message = I18n.err( I18n.ERR_13215_VALUE_EXPECT_STRING ); LOG.error( message ); throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, message ); }
/** * {@inheritDoc} */ @Override public String getString() throws LdapInvalidAttributeValueException { Value value = get(); if ( isHumanReadable() && ( value != null ) ) { return value.getValue(); } String message = I18n.err( I18n.ERR_13215_VALUE_EXPECT_STRING ); LOG.error( message ); throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, message ); }
/** * {@inheritDoc} */ @Override public String getString() throws LdapInvalidAttributeValueException { Value value = get(); if ( isHumanReadable() && ( value != null ) ) { return value.getValue(); } String message = I18n.err( I18n.ERR_13215_VALUE_EXPECT_STRING ); LOG.error( message ); throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, message ); }
private void loadDitContentRules( Attribute ditContentRules ) throws LdapException { if ( ditContentRules == null ) { return; } for ( Value value : ditContentRules ) { String desc = value.getValue(); try { DitContentRule ditContentRule = DCR_DESCR_SCHEMA_PARSER.parse( desc ); updateSchemas( ditContentRule ); } catch ( ParseException pe ) { throw new LdapException( pe ); } } }
private void loadDitStructureRules( Attribute ditStructureRules ) throws LdapException { if ( ditStructureRules == null ) { return; } for ( Value value : ditStructureRules ) { String desc = value.getValue(); try { DitStructureRule ditStructureRule = DSR_DESCR_SCHEMA_PARSER.parse( desc ); updateSchemas( ditStructureRule ); } catch ( ParseException pe ) { throw new LdapException( pe ); } } }
private void loadSyntaxCheckers( Attribute syntaxCheckers ) throws LdapException { if ( syntaxCheckers == null ) { return; } for ( Value value : syntaxCheckers ) { String desc = value.getValue(); try { SyntaxCheckerDescription syntaxChecker = SC_DESCR_SCHEMA_PARSER.parse( desc ); updateSchemas( syntaxChecker ); } catch ( ParseException pe ) { throw new LdapException( pe ); } } }
/** * @return representation of value, escaped for use in a filter if required */ public String getEscapedValue() { if ( value.isHumanReadable() ) { return escapeFilterValue( value.getValue() ); } else { return escapeFilterValue( value.getAttributeType(), value.getBytes() ); } }
/** * @return representation of value, escaped for use in a filter if required */ public String getEscapedValue() { if ( value.isHumanReadable() ) { return escapeFilterValue( value.getValue() ); } else { return escapeFilterValue( value.getAttributeType(), value.getBytes() ); } }
/** * @return representation of value, escaped for use in a filter if required */ public String getEscapedValue() { if ( value.isHumanReadable() ) { return escapeFilterValue( value.getValue() ); } else { return escapeFilterValue( value.getAttributeType(), value.getBytes() ); } }
@Override public void init( DirectoryService directoryService ) throws LdapException { super.init( directoryService ); // stuff for dealing with subentries (garbage for now) Value subschemaSubentry = directoryService.getPartitionNexus().getRootDseValue( directoryService.getAtProvider().getSubschemaSubentry() ); subschemaSubentryDn = dnFactory.create( subschemaSubentry.getValue() ); // Create the Admin Dn adminDn = dnFactory.create( ServerDNConstants.ADMIN_SYSTEM_DN ); }