Skip to content

Commit

Permalink
update comments a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
dbu committed Aug 9, 2011
1 parent 1c6ebfa commit dc51144
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/Jackalope/ObjectManager.php
Expand Up @@ -144,7 +144,7 @@ public function getNodeByPath($absPath, $class = 'Node')
return $this->objectsByPath[$class][$absPath];
}

$fetchPath = $this->getFetchPath($absPath, $class);
$fetchPath = $this->getFetchPath($absPath, $class); // will throw error if path is deleted

$node = $this->factory->get(
$class,
Expand Down Expand Up @@ -568,14 +568,15 @@ protected function verifyAbsolutePath($path)
* 3. add new nodes
* 4. commit any other changes
*
* If transactions are enabled but we are not currently inside a
* transaction, the session is responsible to start a transaction to make
* sure the backend state does not get messed up in case of error.
*
* @return void
*/
public function save()
{
// TODO: start transaction (see transaction branch)
// TODO: or even better, adjust transport to accept lists and do a diff request instead of single requests
// this is extremly unspecific: http://jackrabbit.apache.org/frequently-asked-questions.html#FrequentlyAskedQuestions-HowdoIusetransactionswithJCR?
// or do we have to bundle everything into one request, make transport layer capable of transaction? http://jackrabbit.apache.org/api/2.1/org/apache/jackrabbit/server/remoting/davex/JcrRemotingServlet.html
// TODO: adjust transport to accept lists and do a diff request instead of single requests

/* remove nodes/properties
*
Expand Down Expand Up @@ -646,8 +647,6 @@ public function save()
}
}

// TODO: have a davex client method to commit transaction

// commit changes to the local state
foreach ($this->itemsRemove as $path => $dummy) {
unset($this->objectsByPath['Node'][$path]);
Expand Down Expand Up @@ -961,7 +960,7 @@ public function getPermissions($absPath)
*
* Removes all cached objects, planned changes etc. Mostly useful for testing purposes.
*
* TODO: this will screw up major, as the user of the api can still have references to nodes
* @depricated: this will screw up major, as the user of the api can still have references to nodes. USE refresh instead!
*/
public function clear()
{
Expand Down

0 comments on commit dc51144

Please sign in to comment.