<?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 Re: script javascript API in java in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/script-javascript-api-in-java/m-p/294742#M247872</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, I wasn't able to do it in JAVA 'cause the user I was trying to disable was a user created from an LDAP sync. I finally done it by changing the way all users from Ldap was created in alfresco. thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 May 2016 13:57:33 GMT</pubDate>
    <dc:creator>litllel</dc:creator>
    <dc:date>2016-05-19T13:57:33Z</dc:date>
    <item>
      <title>script javascript API in java</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/script-javascript-api-in-java/m-p/294740#M247870</link>
      <description>Hello guys, how can i make a script in javascript to disable user access in alfresco which can be execute in java i don't understand how i can do it i know we can use thos function in javascript API   if(people.isAccountEnabled("Joe")){&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; people.disableAccount("Joe");&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp; else{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</description>
      <pubDate>Thu, 21 Apr 2016 19:37:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/script-javascript-api-in-java/m-p/294740#M247870</guid>
      <dc:creator>litllel</dc:creator>
      <dc:date>2016-04-21T19:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: script javascript API in java</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/script-javascript-api-in-java/m-p/294741#M247871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi litlleL&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This request seems to be the "wrong way round" at least from the normal use perspective, as it's much more usual to write a class in Java and expose methods to Javascript rather than the other way round &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;Does the script really need to be written in Javascript?&amp;nbsp; Can you write the whole approach in Java instead?&amp;nbsp; The Javascript APIs expose only a subset of the capabilities of the core Java ones so there may be capabilities that aren't available to you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Conversely, do you have to run this explicitly using Java (I'm assuming custom Java here)?&amp;nbsp; An alternative is use something like the JavaScript console (&lt;/SPAN&gt;&lt;A href="https://github.com/share-extras/js-console" rel="nofollow noopener noreferrer"&gt;https://github.com/share-extras/js-console&lt;/A&gt;&lt;SPAN&gt;) which allows you to run arbitrary scripts directly from the Admin Screens in Share.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you really want to go down the route where you e.g. run scripts written in JavaScript from within a custom action/behaviour/scheduled job written in Java, you can use the ActionService to get an instance of a ScriptActionExecutor and tell it the location of the script you wish to run. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;cite&amp;gt;but how can i choose the store and lauchn the search&amp;lt;/cite&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure what you mean here, enabling or disabling users doesn't really involve content stores, and not sure what kind of search you're looking to launch.&amp;nbsp; Could you outline what you're trying to do?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2016 16:56:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/script-javascript-api-in-java/m-p/294741#M247871</guid>
      <dc:creator>steven_okennedy</dc:creator>
      <dc:date>2016-05-10T16:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: script javascript API in java</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/script-javascript-api-in-java/m-p/294742#M247872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, I wasn't able to do it in JAVA 'cause the user I was trying to disable was a user created from an LDAP sync. I finally done it by changing the way all users from Ldap was created in alfresco. thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 13:57:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/script-javascript-api-in-java/m-p/294742#M247872</guid>
      <dc:creator>litllel</dc:creator>
      <dc:date>2016-05-19T13:57:33Z</dc:date>
    </item>
  </channel>
</rss>

