/** * Creates an AddRequest implementation to create a new entry. * * @param id * the sequence identifier of the AddRequest message. */ public AddRequestImpl(final int id) { super( id, TYPE ); entry = new DefaultClientEntry(); }
/** * Creates a new AddRequest object. */ public AddRequestCodec() { super(); entry = new DefaultClientEntry(); }
/** * Initialize the Entry. */ public void initEntry() { entry = new DefaultClientEntry(); }
/** * Creates a new Entry object. */ public LdifEntry() { changeType = ChangeType.Add; // Default LDIF content modificationList = new LinkedList<Modification>(); modificationItems = new HashMap<String, Modification>(); entry = new DefaultClientEntry( null ); control = null; }
public String dnToLdif( String schemaName ) throws NamingException { StringBuilder sb = new StringBuilder(); String dn = "m-oid=" + oid + ", ou=attributeTypes" + ", cn=" + Rdn.escapeValue( schemaName ) + ", ou=schema"; // First dump the DN only Entry entry = new DefaultClientEntry( new LdapDN( dn ) ); sb.append( LdifUtils.convertEntryToLdif( entry ) ); return sb.toString(); } }
public Entry toClientEntry() throws LdapException { // Copy the DN Entry clientEntry = new DefaultClientEntry( dn ); // Convert each attribute for ( EntryAttribute serverAttribute:this ) { EntryAttribute clientAttribute = serverAttribute.toClientAttribute(); clientEntry.add( clientAttribute ); } return clientEntry; } }
public String dnToLdif( String schemaName ) throws NamingException { StringBuilder sb = new StringBuilder(); String dn = "m-oid=" + oid + ", ou=objectClasses" + ", cn=" + Rdn.escapeValue( schemaName ) + ", ou=schema"; // First dump the DN only Entry entry = new DefaultClientEntry( new LdapDN( dn ) ); sb.append( LdifUtils.convertEntryToLdif( entry ) ); return sb.toString(); } }
/** * Return the extensions formated as Ldif lines * @param ID The attributeId : can be m-objectClassExtension or * m-attributeTypeExtension * * @return The extensions formated as ldif lines * @throws NamingException If the conversion goes wrong */ protected String extensionsToLdif( String ID ) throws NamingException { StringBuilder sb = new StringBuilder(); Entry entry = new DefaultClientEntry(); EntryAttribute attribute = new DefaultClientAttribute( ID ); for ( String extension:extensions ) { attribute.add( extension ); } sb.append( LdifUtils.convertAttributesToLdif( entry ) ); return sb.toString(); }
/** * Convert the ServerEntry to a ClientEntry * * @return An instance of ClientEntry */ public Entry toClientEntry() throws LdapException { // Copy the DN Entry clientEntry = new DefaultClientEntry( dn ); // Convert each attribute for ( EntryAttribute serverAttribute:this ) { EntryAttribute clientAttribute = serverAttribute.toClientAttribute(); clientEntry.add( clientAttribute ); } return clientEntry; }
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; }
/** * @return the Names as Ldif lines */ private String nameToLdif() throws NamingException { if ( names.size() == 0 ) { return ""; } else { Entry entry = new DefaultClientEntry(); EntryAttribute attribute = new DefaultClientAttribute( "m-name" ); for ( String name:names ) { attribute.add( name ); } entry.put( attribute ); return LdifUtils.convertAttributesToLdif( entry ); } }
/** * @return The description as a ldif line */ private String descToLdif() throws NamingException { if ( StringTools.isEmpty( description ) ) { return ""; } else { Entry entry = new DefaultClientEntry(); EntryAttribute attribute = new DefaultClientAttribute( "m-description", description ); entry.put( attribute ); return LdifUtils.convertAttributesToLdif( entry ); } }
Entry entry = new DefaultClientEntry();
Entry entry = new DefaultClientEntry( dn );
public Entry getAttributes( Store<Object, Long> store, Long id ) throws Exception Entry entry = new DefaultClientEntry();