diff options
author | Christina Fu <cfu@redhat.com> | 2016-04-05 11:44:00 -0700 |
---|---|---|
committer | Christina Fu <cfu@redhat.com> | 2016-04-13 14:51:54 -0700 |
commit | e832349f8846ab398b17b98ebe9862bc700d1b7f (patch) | |
tree | e9d6da783634e9cc9ad81794d7178c8126710a13 /base/server/cmscore | |
parent | 8e291fba835f6640a262e01333aa58cf9bd5220f (diff) | |
download | pki-e832349f8846ab398b17b98ebe9862bc700d1b7f.tar.gz pki-e832349f8846ab398b17b98ebe9862bc700d1b7f.tar.xz pki-e832349f8846ab398b17b98ebe9862bc700d1b7f.zip |
Ticket #2271 TMS- clean up key archival request records in ldap
This patch does the following:
* it adds in the kra request an extra field called "delayLDAPCommit"
* when the request comes in to be processed, it sets this field to "false"
* by default, if this field does not exist, the updateRequest() method will just write to ldap, just like before; however, if this field exists and it contains "true" then it will delay the write
* once the request is processed and all unwanted fields are cleared from the request record, it will set "delayLDAPCommit" to "false", and call updateRequest(), which will then do the actual write to ldap
* In addition, I also screened through both KRA and TPS code and removed debug messages that contain those fields.
Diffstat (limited to 'base/server/cmscore')
-rw-r--r-- | base/server/cmscore/src/com/netscape/cmscore/request/ARequestQueue.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/base/server/cmscore/src/com/netscape/cmscore/request/ARequestQueue.java b/base/server/cmscore/src/com/netscape/cmscore/request/ARequestQueue.java index 3d82f8eb5..798da3fa5 100644 --- a/base/server/cmscore/src/com/netscape/cmscore/request/ARequestQueue.java +++ b/base/server/cmscore/src/com/netscape/cmscore/request/ARequestQueue.java @@ -540,6 +540,8 @@ public abstract class ARequestQueue } public void updateRequest(IRequest r) { + // defualt is to really update ldap + String delayLDAPCommit = r.getExtDataInString("delayLDAPCommit"); ((Request) r).mModificationTime = CMS.getCurrentDate(); String name = getUserIdentity(); @@ -547,9 +549,12 @@ public abstract class ARequestQueue if (name != null) r.setExtData(IRequest.UPDATED_BY, name); - // TODO: use a state flag to determine whether to call - // addRequest or modifyRequest (see newRequest as well) - modifyRequest(r); + // by default, write request to LDAP + if (delayLDAPCommit == null || !delayLDAPCommit.equals("true")) { + // TODO: use a state flag to determine whether to call + // addRequest or modifyRequest (see newRequest as well) + modifyRequest(r); + } // else: delay the write to ldap } // PRIVATE functions |