<?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: call custom java class from script in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/call-custom-java-class-from-script/m-p/72102#M46797</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We have disabled this ability as it effectively creates a huge security hole! Consider the possibility of a user with restricted access to only a single space in the app. They could write a javascript file that contained Java to execute and upload it to their space - they could then execute that file by URL using the script command processor. The Java code could contain anything - including code that could bring down the server, change the users security permissions or open files on the server disk itself - this would be very bad! Unlike the JavaScript API which is of course protected by all the usual Alfresco security and permissions, hand crafted Java code can do anything…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The way to call Java from JavaScript is to code an Alfresco repository action in Java. With Alfresco JavaScript 1.4 it is now possible to call repository actions including custom actions (which is very useful!).&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/Custom_Actions" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Custom_Actions&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/JavaScript_API#Actions_API" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/JavaScript_API#Actions_API&lt;/A&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>Tue, 05 Sep 2006 09:55:24 GMT</pubDate>
    <dc:creator>kevinr</dc:creator>
    <dc:date>2006-09-05T09:55:24Z</dc:date>
    <item>
      <title>call custom java class from script</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/call-custom-java-class-from-script/m-p/72101#M46796</link>
      <description>Hello,I'm trying to call a custom java class from a script.&amp;nbsp; According to the Rhino documentation, this should be possible using something like this:writer = new geoxt.test.dmc.de.Writer();The class is in the classpath.&amp;nbsp; I get the following error:11:28:07,890 ERROR [SpringAwareUserTransaction] Trans</description>
      <pubDate>Tue, 05 Sep 2006 09:33:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/call-custom-java-class-from-script/m-p/72101#M46796</guid>
      <dc:creator>rhofkens</dc:creator>
      <dc:date>2006-09-05T09:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: call custom java class from script</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/call-custom-java-class-from-script/m-p/72102#M46797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We have disabled this ability as it effectively creates a huge security hole! Consider the possibility of a user with restricted access to only a single space in the app. They could write a javascript file that contained Java to execute and upload it to their space - they could then execute that file by URL using the script command processor. The Java code could contain anything - including code that could bring down the server, change the users security permissions or open files on the server disk itself - this would be very bad! Unlike the JavaScript API which is of course protected by all the usual Alfresco security and permissions, hand crafted Java code can do anything…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The way to call Java from JavaScript is to code an Alfresco repository action in Java. With Alfresco JavaScript 1.4 it is now possible to call repository actions including custom actions (which is very useful!).&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/Custom_Actions" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Custom_Actions&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/JavaScript_API#Actions_API" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/JavaScript_API#Actions_API&lt;/A&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>Tue, 05 Sep 2006 09:55:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/call-custom-java-class-from-script/m-p/72102#M46797</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2006-09-05T09:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: call custom java class from script</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/call-custom-java-class-from-script/m-p/72103#M46798</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;you're completely right about the security implications of course, i hadn't thought about that.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll write a custom action instead, the documentation and SDK offer good guidelines on this topic.&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;roel.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Sep 2006 10:20:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/call-custom-java-class-from-script/m-p/72103#M46798</guid>
      <dc:creator>rhofkens</dc:creator>
      <dc:date>2006-09-05T10:20:54Z</dc:date>
    </item>
  </channel>
</rss>

