chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r787245 - /websites/staging/chemistry/trunk/content/dotnet/powershell-example.html
Date Sat, 19 Mar 2011 22:42:57 GMT
Author: buildbot
Date: Sat Mar 19 22:42:57 2011
New Revision: 787245

Log:
Staging update by buildbot

Modified:
    websites/staging/chemistry/trunk/content/dotnet/powershell-example.html

Modified: websites/staging/chemistry/trunk/content/dotnet/powershell-example.html
==============================================================================
--- websites/staging/chemistry/trunk/content/dotnet/powershell-example.html (original)
+++ websites/staging/chemistry/trunk/content/dotnet/powershell-example.html Sat Mar 19 22:42:57
2011
@@ -183,7 +183,7 @@ Apache Chemistry - PowerShell Examples
            </td>
            <td height="100%">
              <!-- Content -->
-             <div class="wiki-content"><h1 id="powershell_examples">PowerShell
Examples</h1>
+             <div class="wiki-content"><h1 id="powershell_example">PowerShell
Example</h1>
 <p>The DotCMIS DLL can be used in PowerShell scripts. Here is a simple example.</p>
 <div class="codehilite"><pre><span class="c1"># load DotCMIS DLL</span>
 <span class="p">[</span><span class="n">Reflection</span><span
class="o">.</span><span class="n">Assembly</span><span class="p">]</span><span
class="o">::</span><span class="n">LoadFile</span><span class="p">(</span><span
class="s">&quot;X:\path\to\DotCMIS.dll&quot;</span><span class="p">)</span>
@@ -191,7 +191,7 @@ Apache Chemistry - PowerShell Examples
 <span class="c1"># -----------------------------------------------------------------</span>
 
 <span class="c1"># helper functions</span>
-<span class="n">function</span> <span class="n">New</span><span
class="o">-</span><span class="n">GenericDictionary</span><span class="p">([</span><span
class="n">type</span><span class="p">]</span> <span class="nv">$keyType</span><span
class="p">,</span> <span class="p">[</span><span class="n">type</span><span
class="p">]</span><span class="nv">$valueType</span><span class="p">)</span>
<span class="p">{</span>  
+<span class="n">function</span> <span class="n">New</span><span
class="o">-</span><span class="n">GenericDictionary</span><span class="p">([</span><span
class="n">type</span><span class="p">]</span> <span class="nv">$keyType</span><span
class="p">,</span> <span class="p">[</span><span class="n">type</span><span
class="p">]</span> <span class="nv">$valueType</span><span class="p">)</span>
<span class="p">{</span>  
    <span class="nv">$base</span> <span class="o">=</span> <span
class="p">[</span><span class="n">System</span><span class="o">.</span><span
class="n">Collections</span><span class="o">.</span><span class="n">Generic</span><span
class="o">.</span><span class="n">Dictionary</span><span class="sb">``</span><span
class="mi">2</span><span class="p">]</span>  
    <span class="nv">$ct</span> <span class="o">=</span> <span
class="nv">$base</span><span class="o">.</span><span class="n">MakeGenericType</span><span
class="p">((</span><span class="nv">$keyType</span><span class="p">,</span>
<span class="nv">$valueType</span><span class="p">))</span>  
    <span class="n">New</span><span class="o">-</span><span class="n">Object</span>
<span class="nv">$ct</span>
@@ -228,20 +228,20 @@ Apache Chemistry - PowerShell Examples
 
 <span class="c1"># create session</span>
 <span class="nv">$sp</span> <span class="o">=</span> <span class="n">New</span><span
class="o">-</span><span class="n">GenericDictionary</span> <span class="n">string</span>
<span class="n">string</span>
-<span class="nv">$sp</span><span class="p">[</span><span class="s">&quot;org.apache.chemistry.dotcmis.binding.spi.type&quot;</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;atompub&quot;</span><span
class="p">;</span>
+<span class="nv">$sp</span><span class="p">[</span><span class="s">&quot;org.apache.chemistry.dotcmis.binding.spi.type&quot;</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;atompub&quot;</span>
 <span class="nv">$sp</span><span class="p">[</span><span class="s">&quot;org.apache.chemistry.dotcmis.binding.atompub.url&quot;</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;http://localhost:8080/alfresco/service/cmis&quot;</span>
-<span class="nv">$sp</span><span class="p">[</span><span class="s">&quot;org.apache.chemistry.dotcmis.user&quot;</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;admin&quot;</span><span
class="p">;</span>
-<span class="nv">$sp</span><span class="p">[</span><span class="s">&quot;org.apache.chemistry.dotcmis.password&quot;</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;admin&quot;</span><span
class="p">;</span>
+<span class="nv">$sp</span><span class="p">[</span><span class="s">&quot;org.apache.chemistry.dotcmis.user&quot;</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;admin&quot;</span>
+<span class="nv">$sp</span><span class="p">[</span><span class="s">&quot;org.apache.chemistry.dotcmis.password&quot;</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;admin&quot;</span>
 
 <span class="nv">$factory</span> <span class="o">=</span> <span
class="p">[</span><span class="n">DotCMIS</span><span class="o">.</span><span
class="n">Client</span><span class="o">.</span><span class="n">Impl</span><span
class="o">.</span><span class="n">SessionFactory</span><span class="p">]</span><span
class="o">::</span><span class="n">NewInstance</span><span class="p">()</span>
 <span class="nv">$session</span> <span class="o">=</span> <span
class="nv">$factory</span><span class="o">.</span><span class="n">GetRepositories</span><span
class="p">(</span><span class="nv">$sp</span><span class="p">)[</span><span
class="mi">0</span><span class="p">]</span><span class="o">.</span><span
class="n">CreateSession</span><span class="p">()</span>
 
 <span class="c1"># print the repository infos</span>
-<span class="nv">$session</span><span class="o">.</span><span
class="n">Repositoryinfo</span><span class="o">.</span><span class="n">Id</span>
-<span class="nv">$session</span><span class="o">.</span><span
class="n">Repositoryinfo</span><span class="o">.</span><span class="n">Name</span>
-<span class="nv">$session</span><span class="o">.</span><span
class="n">Repositoryinfo</span><span class="o">.</span><span class="n">Vendor</span>
-<span class="nv">$session</span><span class="o">.</span><span
class="n">Repositoryinfo</span><span class="o">.</span><span class="n">ProductName</span>
-<span class="nv">$session</span><span class="o">.</span><span
class="n">Repositoryinfo</span><span class="o">.</span><span class="n">ProductVersion</span>
+<span class="nv">$session</span><span class="o">.</span><span
class="n">RepositoryInfo</span><span class="o">.</span><span class="n">Id</span>
+<span class="nv">$session</span><span class="o">.</span><span
class="n">RepositoryInfo</span><span class="o">.</span><span class="n">Name</span>
+<span class="nv">$session</span><span class="o">.</span><span
class="n">RepositoryInfo</span><span class="o">.</span><span class="n">Vendor</span>
+<span class="nv">$session</span><span class="o">.</span><span
class="n">RepositoryInfo</span><span class="o">.</span><span class="n">ProductName</span>
+<span class="nv">$session</span><span class="o">.</span><span
class="n">RepositoryInfo</span><span class="o">.</span><span class="n">ProductVersion</span>
 
 <span class="c1"># get root folder</span>
 <span class="nv">$root</span> <span class="o">=</span> <span class="nv">$session</span><span
class="o">.</span><span class="n">GetRootFolder</span><span class="p">()</span>



Mime
View raw message