directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r1021783 - in /websites/staging/directory/trunk/content: ./ api/user-guide/2.5-deleting.html
Date Wed, 06 Dec 2017 04:20:41 GMT
Author: buildbot
Date: Wed Dec  6 04:20:41 2017
New Revision: 1021783

Log:
Staging update by buildbot for directory

Modified:
    websites/staging/directory/trunk/content/   (props changed)
    websites/staging/directory/trunk/content/api/user-guide/2.5-deleting.html

Propchange: websites/staging/directory/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Wed Dec  6 04:20:41 2017
@@ -1 +1 @@
-1817258
+1817261

Modified: websites/staging/directory/trunk/content/api/user-guide/2.5-deleting.html
==============================================================================
--- websites/staging/directory/trunk/content/api/user-guide/2.5-deleting.html (original)
+++ websites/staging/directory/trunk/content/api/user-guide/2.5-deleting.html Wed Dec  6 04:20:41
2017
@@ -192,9 +192,14 @@ h2:hover > .headerlink, h3:hover > .head
 <span class="o">{</span>
     <span class="n">assertTrue</span><span class="o">(</span> <span
class="n">session</span><span class="o">.</span><span class="na">exists</span><span
class="o">(</span> <span class="s">&quot;cn=child1,cn=parent,ou=system&quot;</span>
<span class="o">)</span> <span class="o">);</span>
 
-    <span class="n">DeleteResponse</span> <span class="n">response</span>
<span class="o">=</span> <span class="n">connection</span><span
class="o">.</span><span class="na">delete</span><span class="o">(</span>
<span class="s">&quot;cn=child1,cn=parent,ou=system&quot;</span> <span
class="o">);</span>
-    <span class="n">assertNotNull</span><span class="o">(</span>
<span class="n">response</span> <span class="o">);</span>
-    <span class="n">assertEquals</span><span class="o">(</span> <span
class="n">ResultCodeEnum</span><span class="o">.</span><span class="na">SUCCESS</span><span
class="o">,</span> <span class="n">response</span><span class="o">.</span><span
class="na">getLdapResult</span><span class="o">().</span><span class="na">getResultCode</span><span
class="o">()</span> <span class="o">);</span>
+    <span class="k">try</span> 
+    <span class="o">{</span>
+        <span class="n">connection</span><span class="o">.</span><span
class="na">delete</span><span class="o">(</span> <span class="s">&quot;cn=child1,cn=parent,ou=system&quot;</span>
<span class="o">);</span>
+    <span class="o">}</span>
+    <span class="k">catch</span> <span class="o">(</span> <span
class="n">LdapException</span> <span class="n">le</span> <span class="o">)</span>
+    <span class="o">{</span>
+        <span class="n">fail</span><span class="o">(</span> <span
class="n">le</span><span class="o">.</span><span class="na">getMessage</span><span
class="o">()</span> <span class="o">);</span>
+    <span class="o">}</span>
 
     <span class="n">assertFalse</span><span class="o">(</span> <span
class="n">session</span><span class="o">.</span><span class="na">exists</span><span
class="o">(</span> <span class="s">&quot;cn=child1,cn=parent,ou=system&quot;</span>
<span class="o">)</span> <span class="o">);</span>
 <span class="o">}</span>
@@ -207,9 +212,14 @@ h2:hover > .headerlink, h3:hover > .head
 <span class="o">{</span>
     <span class="n">assertTrue</span><span class="o">(</span> <span
class="n">session</span><span class="o">.</span><span class="na">exists</span><span
class="o">(</span> <span class="s">&quot;cn=parent,ou=system&quot;</span>
<span class="o">)</span> <span class="o">);</span>
 
-    <span class="n">DeleteResponse</span> <span class="n">response</span>
<span class="o">=</span> <span class="n">connection</span><span
class="o">.</span><span class="na">delete</span><span class="o">(</span>
<span class="s">&quot;cn=parent,ou=system&quot;</span> <span class="o">);</span>
-    <span class="n">assertNotNull</span><span class="o">(</span>
<span class="n">response</span> <span class="o">);</span>
-    <span class="n">assertEquals</span><span class="o">(</span> <span
class="n">ResultCodeEnum</span><span class="o">.</span><span class="na">NOT_ALLOWED_ON_NON_LEAF</span><span
class="o">,</span> <span class="n">response</span><span class="o">.</span><span
class="na">getLdapResult</span><span class="o">().</span><span class="na">getResultCode</span><span
class="o">()</span> <span class="o">);</span>
+    <span class="k">try</span> 
+    <span class="o">{</span>
+        <span class="n">connection</span><span class="o">.</span><span
class="na">delete</span><span class="o">(</span> <span class="s">&quot;cn=parent,ou=system&quot;</span>
<span class="o">);</span>
+    <span class="o">}</span>
+    <span class="k">catch</span> <span class="o">(</span> <span
class="n">LdapException</span> <span class="n">le</span> <span class="o">)</span>
+    <span class="o">{</span>
+        <span class="n">fail</span><span class="o">(</span> <span
class="n">le</span><span class="o">.</span><span class="na">getMessage</span><span
class="o">()</span> <span class="o">);</span>
+    <span class="o">}</span>
 
     <span class="n">assertTrue</span><span class="o">(</span> <span
class="n">session</span><span class="o">.</span><span class="na">exists</span><span
class="o">(</span> <span class="s">&quot;cn=parent,ou=system&quot;</span>
<span class="o">)</span> <span class="o">);</span>
 <span class="o">}</span>
@@ -224,9 +234,14 @@ h2:hover > .headerlink, h3:hover > .head
     <span class="n">assertTrue</span><span class="o">(</span> <span
class="n">session</span><span class="o">.</span><span class="na">exists</span><span
class="o">(</span> <span class="s">&quot;cn=parent,ou=system&quot;</span>
<span class="o">)</span> <span class="o">);</span>
 
 
-    <span class="n">DeleteResponse</span> <span class="n">response</span>
<span class="o">=</span> <span class="n">connection</span><span
class="o">.</span><span class="na">deleteTree</span><span class="o">(</span>
<span class="s">&quot;cn=parent,ou=system&quot;</span> <span class="o">);</span>
-    <span class="n">assertNotNull</span><span class="o">(</span>
<span class="n">response</span> <span class="o">);</span>
-    <span class="n">assertEquals</span><span class="o">(</span> <span
class="n">ResultCodeEnum</span><span class="o">.</span><span class="na">SUCCESS</span><span
class="o">,</span> <span class="n">response</span><span class="o">.</span><span
class="na">getLdapResult</span><span class="o">().</span><span class="na">getResultCode</span><span
class="o">()</span> <span class="o">);</span>
+    <span class="k">try</span>
+    <span class="o">{</span>
+        <span class="n">connection</span><span class="o">.</span><span
class="na">deleteTree</span><span class="o">(</span> <span class="s">&quot;cn=parent,ou=system&quot;</span>
<span class="o">);</span>
+    <span class="o">}</span>
+    <span class="k">catch</span> <span class="o">(</span> <span
class="n">LdapException</span> <span class="n">le</span> <span class="o">)</span>
+    <span class="o">{</span>
+        <span class="n">fail</span><span class="o">(</span> <span
class="n">le</span><span class="o">.</span><span class="na">getMessage</span><span
class="o">()</span> <span class="o">);</span>
+    <span class="o">}</span>
 
     <span class="n">assertFalse</span><span class="o">(</span> <span
class="n">session</span><span class="o">.</span><span class="na">exists</span><span
class="o">(</span> <span class="s">&quot;cn=parent,ou=system&quot;</span>
<span class="o">)</span> <span class="o">);</span>
 <span class="o">}</span>



Mime
View raw message