byte[] certBytes = entry.get( USER_CERTIFICATE_AT ).getBytes(); InputStream in = new ByteArrayInputStream( certBytes );
objectClass.add( TLS_KEY_INFO_OC, SchemaConstants.INET_ORG_PERSON_OC );
public Entry toClientEntry() throws LdapException { // Copy the DN Entry clientEntry = new DefaultClientEntry( clonedEntry.getDn() ); // Convert each attribute for ( EntryAttribute clonedEntry:this ) { EntryAttribute clientAttribute = clonedEntry.toClientAttribute(); clientEntry.add( clientAttribute ); } return clientEntry; }
/** * Gets the distinguished name of the entry object returned. * * @return the Dn of the entry returned. */ public DN getObjectName() { return ( entry == null ? null : entry.getDn() ); }
/** * 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 ); }
public DN getDn() { return clonedEntry.getDn(); }
/** * Add a new ServerAttribute, with its upId. If the upId is null, * default to the AttributeType name. * * Updates the serverAttributeMap. */ private void createAttribute( String upId, AttributeType attributeType, byte[]... values ) { EntryAttribute attribute = new DefaultServerAttribute( attributeType, values ); attribute.setUpId( upId, attributeType ); attributes.put( attributeType, attribute ); }
/** * Add an attribute (represented by its ID and string values) into an entry. * * @param upId The attribute ID * @param values The list of string values to inject. It can be empty * @throws LdapException If the attribute does not exist */ public void add( String upId, String... values ) throws LdapException { add( upId, getAttributeType( upId ), values ); }
public ServerSearchResult( DN dn, Object obj, ServerEntry serverEntry, boolean isRelative ) { this.dn = dn; this.serverEntry = serverEntry; this.serverEntry.setDn( dn ); this.isRelative = isRelative; }
/** * Sets the distinguished name of the entry to add. * * @param entry the Dn of the added entry. */ public void setEntryDn( DN dn ) { entry.setDn( dn ); }
/** * Gets a copy of the the normalized (canonical) representation * for the wrapped value. * * @return gets a copy of the normalized value */ public String getNormalizedValueCopy() { return getNormalizedValue(); }
/** * Get the wrapped value as a byte[]. This method returns a copy of * the wrapped byte[]. * * @return the wrapped value as a byte[] */ public byte[] getBytes() { return get(); }
public List<EntryAttribute> set( AttributeType... attributeTypes ) { return clonedEntry.set( attributeTypes ); }
objectClass.add( TLS_KEY_INFO_OC, SchemaConstants.INET_ORG_PERSON_OC );
/** * Get the entry DN * * @return Returns the objectName. */ public DN getObjectName() { return entry.getDn(); }
public ServerSearchResult( DN dn, String className, Object obj, ServerEntry serverEntry, boolean isRelative ) { this.dn = dn; this.serverEntry = serverEntry; this.serverEntry.setDn( dn ); }
/** * Add a new value to the current attribute * * @param value The value to add */ public void addAttributeValue( String value ) { currentAttribute.add( value ); }
/** * Get the added DN * * @return Returns the entry DN. */ public DN getEntryDn() { return entry.getDn(); }
/** * Add a new value to the current attribute * * @param value The value to add */ public void addAttributeValue( org.apache.directory.shared.ldap.entry.Value<?> value ) { currentAttribute.add( value ); }