<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Help extending the 'People' Javascript API in 2.1. in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/help-extending-the-people-javascript-api-in-2-1/m-p/106193#M74275</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am currently trying to add some extra functionality to the &lt;/SPAN&gt;&lt;STRONG&gt;People&lt;/STRONG&gt;&lt;SPAN&gt; Javascript API functionality.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My new functionality will most likely just consist of new methods for creating alfresco users using the Java API calls (I already have some code to do this).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I just wanted to clarify a few things in terms of the best approach for the organisation and deployment of the new functionality, especially bearing in mind these features may be added to the Javascript API anyway at a later date?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am planning to create a new POJO class (PeopleUtils?) under the &lt;/SPAN&gt;&lt;STRONG&gt;org.alfresco.repo.jscript package&lt;/STRONG&gt;&lt;SPAN&gt;, using the skeleton of the current &lt;/SPAN&gt;&lt;STRONG&gt;People.java&lt;/STRONG&gt;&lt;SPAN&gt; as a starting point and adding the methods I need.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the best way to build / structure the new class for ease of deployment and modularity? Can I build the class and config files into a separate WAR file and deploy as an extension, or would I have to rebuild Alfresco to add in my extra Javascript functionality?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The wiki briefly mentions a new extension mechanism for additions to the Javascript API available for this as of 2.0, but doesn't go into much detail. It also gives the ScriptLogger as an example and suggests extending from &lt;/SPAN&gt;&lt;STRONG&gt;org.alfresco.repo.jscript.BaseScriptImplementation&lt;/STRONG&gt;&lt;SPAN&gt;. However in the 2.1.0 HEAD the ScriptLogger class extends &lt;/SPAN&gt;&lt;STRONG&gt;BaseProcessorExtension&lt;/STRONG&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll admit I am not a Spring / JavaBeans expert by any means so feel free to let me know if I am missing something obvious&amp;nbsp; &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; . Just after some advice and details on how to structure things to avoid a lot of rework later!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 03 Jun 2007 15:06:53 GMT</pubDate>
    <dc:creator>chrisb</dc:creator>
    <dc:date>2007-06-03T15:06:53Z</dc:date>
    <item>
      <title>Help extending the 'People' Javascript API in 2.1.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/help-extending-the-people-javascript-api-in-2-1/m-p/106193#M74275</link>
      <description>I am currently trying to add some extra functionality to the People Javascript API functionality.My new functionality will most likely just consist of new methods for creating alfresco users using the Java API calls (I already have some code to do this).I just wanted to clarify a few things in terms</description>
      <pubDate>Sun, 03 Jun 2007 15:06:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/help-extending-the-people-javascript-api-in-2-1/m-p/106193#M74275</guid>
      <dc:creator>chrisb</dc:creator>
      <dc:date>2007-06-03T15:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: Help extending the 'People' Javascript API in 2.1.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/help-extending-the-people-javascript-api-in-2-1/m-p/106194#M74276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The future-proof mechanism is to build a JavaScript extension as mentioned in the wiki. The problem you have correctly spotted is that this interface has changed between 2.0 and 2.1. In Alfresco 2.1 we now support multiple script and template engines (i.e. PHP in the java VM!) which also meant that the extension mechanism for the scripting engine was refactored. The end result is that if you write JavaScript extension class in 2.0 it will need to be changed to extend BaseProcessorExtension in 2.1. It's not a big change, but I understand it is annoying if you have already started so sorry about that in advance &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you create your class, then you use Spring to configure it in as mentioned in the Wiki - you should be able to deloy it as usual as an Alfresco jar extension rather than adding it directly to the Alfresco WAR - as you can use the Spring override config mechanism. When 2.1 is release you will have to change it slightly as mentioned above.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2007 09:41:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/help-extending-the-people-javascript-api-in-2-1/m-p/106194#M74276</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2007-06-04T09:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help extending the 'People' Javascript API in 2.1.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/help-extending-the-people-javascript-api-in-2-1/m-p/106195#M74277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Kevin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thats really useful info, and should allow me to get on with my development.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2007 09:51:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/help-extending-the-people-javascript-api-in-2-1/m-p/106195#M74277</guid>
      <dc:creator>chrisb</dc:creator>
      <dc:date>2007-06-04T09:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: Help extending the 'People' Javascript API in 2.1.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/help-extending-the-people-javascript-api-in-2-1/m-p/106196#M74278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK, I think I am close to getting this up and running (fingers crossed!).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just a question on using the Spring bean config override and where it should reside? Am I right in thinking my override should be in the following file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;/etc/alfresco/config/more-config.xml&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;With an import added to the following file to include the above file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;extension&amp;gt;/alfresco/extension/custom-services-context.xml&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;bean config I plan to use is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;bean id="peopleUtilsScript" parent="baseJavascriptExtension" class="org.alfresco.repo.jscript.PeopleUtils"&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;property name="extensionName"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;value&amp;gt;peopleutils&amp;lt;/value&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;property name="serviceRegistry"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ref bean="ServiceRegistry" /&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;/bean&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Code for the creation of the Person object is in a war file to be deployed in the extension area of my alfresco install.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2007 15:01:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/help-extending-the-people-javascript-api-in-2-1/m-p/106196#M74278</guid>
      <dc:creator>chrisb</dc:creator>
      <dc:date>2007-06-04T15:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Help extending the 'People' Javascript API in 2.1.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/help-extending-the-people-javascript-api-in-2-1/m-p/106197#M74279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes i believe that is the correct config setup for adding the bean def.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2007 16:04:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/help-extending-the-people-javascript-api-in-2-1/m-p/106197#M74279</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2007-06-04T16:04:55Z</dc:date>
    </item>
  </channel>
</rss>

