/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at
* trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
* add the following below this CDDL HEADER, with the fields enclosed
* by brackets "[]" replaced with your own identifying information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2010 Sun Microsystems, Inc.
*/
public ImprovedLDAPConnection() {
super();
}
// Parse LDIF content
try {
//EclReadAndPlay.println ("DEBUG", "\n\nWriting the following update: \n" + content.toString() );
case LDIFContent.ADD_CONTENT:
mytype = "ADD";
// remove non-user-modifiable attributes:
// entryuuid, pwdchangedtime, creatorsname, createtimestamp
if ( entryuuidAttr != null ) {
}
if ( entryuuidAttr != null ) {
}
if ( creatorAttr != null ) {
}
if ( createtimeAttr != null ) {
}
//EclReadAndPlay.println ("INFO", "********************* Entry: ************** \n" + addEntry + "\n******************\n" );
try {
}
catch( LDAPException e ) {
e.printStackTrace();
}
// replace the unique id
// LDAPAttribute myAttr = new LDAPAttribute ("nsuniqueid", change.nsUniqueId);
// LDAPAttribute myAttr = new LDAPAttribute ("entryuuid", change.nsUniqueId);
// LDAPModification mod = new LDAPModification ( LDAPModification.REPLACE, myAttr );
// try {
// this.modify( change.dn, mod );
// }
// catch( LDAPException e ) {
// EclReadAndPlay.println ("ERROR", "Cannot modify nsuniqueid of entry \""
// + change.dn + "\" (csn=" + change.csn + ")" );
// EclReadAndPlay.println ("ERROR", e.toString() );
// System.exit(1);
// }
//System.out.EclReadAndPlay.println( addEntry);
break;
mytype="MOD";
// remove modifiersname and modifytimestamp mods
int size = 0;
// remove mods[i] from mods
deleteItem[i] = true;
} else {
deleteItem[i] = false;
size++;
}
}
int index = 0;
if ( !deleteItem[i] ) {
}
}
try {
}
catch( LDAPException e ) {
e.printStackTrace();
}
break;
case LDIFContent.MODDN_CONTENT:
}
try {
mytype="MODRDN";
}
else {
mytype="MODDN";
}
}
catch( LDAPException e ) {
e.printStackTrace();
}
break;
case LDIFContent.DELETE_CONTENT:
mytype="DEL";
try {
}
catch( LDAPException e ) {
e.printStackTrace();
}
break;
default:
mytype="Unknown";
break;
}
} catch ( IOException e ) {
e.printStackTrace();
}
}
}
}