<?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: How to set permanent permission with Java API? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-set-permanent-permission-with-java-api/m-p/319963#M6964</link>
    <description>&lt;P&gt;I have found a way by passing the add permission call and going directly to nuxeoClient&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Map&amp;lt;String, Object&amp;gt; params = new HashMap&amp;lt;&amp;gt;();
params.put("user", ace.getUsername());
params.put("permission", ace.getPermission());
params.put("creator", ace.getCreator());
params.put("blockInheritance", ace.isBlockInheritance());
params.put("comment", ace.getComment());
params.put("notify", ace.isNotify());
nuxeoClient.automation("Document.AddPermission").input(newFolder).parameters(params).execute();
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 18 Jan 2017 22:47:17 GMT</pubDate>
    <dc:creator>Eduardo_Rodrigu</dc:creator>
    <dc:date>2017-01-18T22:47:17Z</dc:date>
    <item>
      <title>How to set permanent permission with Java API?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-set-permanent-permission-with-java-api/m-p/319962#M6963</link>
      <description>&lt;P&gt;I am trying to assign a permanent permission to a group but I got null pointer exception when begin or end dates are not defined.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;ACE ace = new ACE();
ace.setUsername(username);
ace.setPermission("Everything");
ace.setCreator(nuxeologin);
ace.setBlockInheritance(true);
newFolder.addPermission(ace);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;Exception in thread "main" java.lang.NullPointerException
	at org.nuxeo.client.api.objects.acl.ACE.getBeginAsString(ACE.java:152)
	at org.nuxeo.client.api.objects.Document.setPermissionAutomationParameters(Document.java:422)
	at org.nuxeo.client.api.objects.Document.addPermission(Document.java:416)

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;how can I do this?&lt;/P&gt;
&lt;P&gt;Tks&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2017 23:40:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-set-permanent-permission-with-java-api/m-p/319962#M6963</guid>
      <dc:creator>Eduardo_Rodrigu</dc:creator>
      <dc:date>2017-01-17T23:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to set permanent permission with Java API?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-set-permanent-permission-with-java-api/m-p/319963#M6964</link>
      <description>&lt;P&gt;I have found a way by passing the add permission call and going directly to nuxeoClient&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Map&amp;lt;String, Object&amp;gt; params = new HashMap&amp;lt;&amp;gt;();
params.put("user", ace.getUsername());
params.put("permission", ace.getPermission());
params.put("creator", ace.getCreator());
params.put("blockInheritance", ace.isBlockInheritance());
params.put("comment", ace.getComment());
params.put("notify", ace.isNotify());
nuxeoClient.automation("Document.AddPermission").input(newFolder).parameters(params).execute();
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Jan 2017 22:47:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-set-permanent-permission-with-java-api/m-p/319963#M6964</guid>
      <dc:creator>Eduardo_Rodrigu</dc:creator>
      <dc:date>2017-01-18T22:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to set permanent permission with Java API?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-set-permanent-permission-with-java-api/m-p/319964#M6965</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thanks for your feedback!
I've created the &lt;A href="https://jira.nuxeo.com/browse/JAVACLIENT-113"&gt;following issue&lt;/A&gt; to track the bug.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2017 12:46:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-set-permanent-permission-with-java-api/m-p/319964#M6965</guid>
      <dc:creator>Thomas_Roger</dc:creator>
      <dc:date>2017-01-24T12:46:05Z</dc:date>
    </item>
  </channel>
</rss>

