<?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 documentManager.exists() behaves strangely in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/documentmanager-exists-behaves-strangely/m-p/327767#M14768</link>
    <description>&lt;P&gt;This is the problem: let's say I create a Workspace called "lalala".&lt;/P&gt;
&lt;P&gt;Now I run my code&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;
DocumentModel lalalaWs = new DocumentModelImpl("/default-domain/workspaces/", "lalala", "Workspace");
if (!documentManager.exists(lalalaWs.getRef())) {
log.info("it doesn't exist");
}
else {
log.info("it exists");
}
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;
&lt;P&gt;and it prints "it exists", then I delete the Workspace and call the code again and it still prints "it exists"&lt;/P&gt;
&lt;P&gt;is it a bug or am I doing something wrong?&lt;/P&gt;</description>
    <pubDate>Sun, 09 Dec 2012 19:04:42 GMT</pubDate>
    <dc:creator>roccapl_</dc:creator>
    <dc:date>2012-12-09T19:04:42Z</dc:date>
    <item>
      <title>documentManager.exists() behaves strangely</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/documentmanager-exists-behaves-strangely/m-p/327767#M14768</link>
      <description>&lt;P&gt;This is the problem: let's say I create a Workspace called "lalala".&lt;/P&gt;
&lt;P&gt;Now I run my code&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;
DocumentModel lalalaWs = new DocumentModelImpl("/default-domain/workspaces/", "lalala", "Workspace");
if (!documentManager.exists(lalalaWs.getRef())) {
log.info("it doesn't exist");
}
else {
log.info("it exists");
}
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;
&lt;P&gt;and it prints "it exists", then I delete the Workspace and call the code again and it still prints "it exists"&lt;/P&gt;
&lt;P&gt;is it a bug or am I doing something wrong?&lt;/P&gt;</description>
      <pubDate>Sun, 09 Dec 2012 19:04:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/documentmanager-exists-behaves-strangely/m-p/327767#M14768</guid>
      <dc:creator>roccapl_</dc:creator>
      <dc:date>2012-12-09T19:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: documentManager.exists() behaves strangely</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/documentmanager-exists-behaves-strangely/m-p/327768#M14769</link>
      <description>&lt;P&gt;documentManager is a variable of type CoreSession&lt;/P&gt;</description>
      <pubDate>Sun, 09 Dec 2012 19:09:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/documentmanager-exists-behaves-strangely/m-p/327768#M14769</guid>
      <dc:creator>roccapl_</dc:creator>
      <dc:date>2012-12-09T19:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: documentManager.exists() behaves strangely</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/documentmanager-exists-behaves-strangely/m-p/327769#M14770</link>
      <description>&lt;P&gt;The function exists() returns true becuause the "Delete" button moves the workspace to the Trash. The file is present but in a different state. The workspace should be removed from the Thrash to be permanently deleted.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2012 11:23:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/documentmanager-exists-behaves-strangely/m-p/327769#M14770</guid>
      <dc:creator>roccapl_</dc:creator>
      <dc:date>2012-12-10T11:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: documentManager.exists() behaves strangely</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/documentmanager-exists-behaves-strangely/m-p/327770#M14771</link>
      <description>&lt;P&gt;But now how can I check using the core java api if a workspace is in the trash, remove it and create a new one or else taking it back from the trash?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2012 11:25:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/documentmanager-exists-behaves-strangely/m-p/327770#M14771</guid>
      <dc:creator>roccapl_</dc:creator>
      <dc:date>2012-12-10T11:25:01Z</dc:date>
    </item>
  </channel>
</rss>

