| | |
| | | |
| | | import org.opends.server.controls.*; |
| | | import org.opends.server.plugins.ChangeNumberControlPlugin; |
| | | import org.opends.server.protocols.ldap.ExtendedResponseProtocolOp; |
| | | import org.opends.server.protocols.ldap.LDAPConstants; |
| | | |
| | | |
| | | |
| | |
| | | Message errorMessage = null; |
| | | DN matchedDN = null; |
| | | List<String> referralURLs = null; |
| | | try |
| | | { |
| | | switch(entry.getChangeOperationType()) |
| | | { |
| | | case ADD: |
| | |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | catch (ClassCastException ce) |
| | | { |
| | | // It is possible that this is extended response. |
| | | if (responseMessage.getProtocolOpType() == |
| | | LDAPConstants.OP_TYPE_EXTENDED_RESPONSE) |
| | | { |
| | | ExtendedResponseProtocolOp extRes = |
| | | responseMessage.getExtendedResponseProtocolOp(); |
| | | resultCode = extRes.getResultCode(); |
| | | errorMessage = extRes.getErrorMessage(); |
| | | matchedDN = extRes.getMatchedDN(); |
| | | referralURLs = extRes.getReferralURLs(); |
| | | } |
| | | else |
| | | { |
| | | // This shouldnt happen but if it does debug |
| | | // log it, set the error code to OTHER and |
| | | // fall thru. |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | resultCode = ResultCode.OTHER.getIntValue(); |
| | | errorMessage = null; |
| | | matchedDN = null; |
| | | referralURLs = null; |
| | | } |
| | | } |
| | | |
| | | if(resultCode != SUCCESS && resultCode != REFERRAL) |
| | | { |