Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Parameters for services are similar to standard html GET parameters, i.e. they are just strings (so the answer is no, you can't "define what type of parameters will it accept" - they are <em>always</em> strings). Once a service is called all parameters are available in m_binder.</p> <p>In your case call like:</p> <pre><code>http://&lt;ucm_host&gt;/&lt;ucm_instance&gt;/idcplg?IdcService=MEGE_DOCUMENTS&amp;merge1=docName1,contentId1,contentId2&amp;merge2=docName2,contentId1,contentId2 </code></pre> <p>will run custom service MEGE_DOCUMENTS with 2 parameters - merge1 and merge2 - in m_binder. You may get them like this:</p> <pre><code>String parameter1 = m_binder.getLocal("merge1"); String parameter2 = m_binder.getLocal("merge2"); </code></pre> <p>after that parameter1 will have value "<em>docName1,contentId1,contentId2</em>" and parameter2 - "<em>docName2,contentId1,contentId2</em>"</p> <hr> <p>So, if this service is supposed to be run independently (e.g. from browser / as a separate service) - I'm afraid you'll have to iterate through parameters. Like this, for example (I know it is ugly, but it's all you can do in your situation):</p> <pre><code>Map&lt;String, String&gt; params = new HashMap&lt;String,String&gt;(); String prefix = "merge"; int index = 1; boolean hasMoreParams = true; while(hasMoreParams) { String paramName = prefix + index; if(m_binder.m_localData.containsKey(paramName)) { String paramValue = m_binder.getLocal(paramName); params.put(paramName, paramValue); index++; } else { hasMoreParams = false; } } </code></pre> <hr> <p>In case your service will be used by other services/filters (i.e. called from java code <em>only</em>) you may put any java object (e.g. HashMap) in binder's local data before service call and then use it: </p> <pre><code>m_binder.m_localData.put(&lt;Object&gt;, &lt;Object&gt;); </code></pre> <p>Do not mix up m_localData with m_binder.putLocal(). m_localData is a Property variable (an extension of HashTable). putLocal() is a method which have only one String parameter.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload