phpcr/src/PHPCR/Retention/RetentionManagerInterface.php
Copyright 2008-2011 Karsten Dambekalns karsten@typo3.org
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
\PHPCR\Retention\RetentionManagerInterface
- Api
Methods
addHold(string $absPath, string $name, boolean $isDeep) : \PHPCR\Retention\HoldInterface
Places a hold on the existing node at $absPath.
If $isDeep is true the hold applies to this node and its subgraph. The hold does not take effect until a save is performed. A node may have more than one hold. The format and interpretation of the name are not specified. They are application-dependent.
Name | Type | Description |
---|---|---|
$absPath | string | The absolute path to a node. |
$name | string | An application-dependent string. |
$isDeep | boolean | A boolean indicating if the hold applies to the subgraph. |
Type | Description |
---|---|
\PHPCR\Retention\HoldInterface | The Hold applied. |
Exception | Description |
---|---|
\PHPCR\PathNotFoundException | if no node at $absPath exists or the session does not have sufficient access to retrieve the node. |
\PHPCR\AccessDeniedException | if the current session does not have sufficient access to perform the operation. |
\PHPCR\Lock\LockException | if a lock applies at the node at $absPath and this implementation performs this validation immediately. |
\PHPCR\Version\VersionException | if the node at $absPath is read-only due to a checked-in node and this implementation performs this validation immediately. |
\PHPCR\RepositoryException | if another error occurs. |
- Api
getHolds(string $absPath) : array
Returns all hold objects that have been added through this API to the existing node at $absPath.
If no hold has been set before, this method returns an empty array.
Name | Type | Description |
---|---|---|
$absPath | string | The absolute path to a node. |
Type | Description |
---|---|
array | All hold objects that have been added to the existing node at absPath through this API or an empty array if no hold has been set. |
Exception | Description |
---|---|
\PHPCR\PathNotFoundException | if no node at absPath exists or the session does not have sufficient access to retrieve the node. |
\PHPCR\AccessDeniedException | if the current session does not have sufficient access to retrieve the holds. |
\PHPCR\RepositoryException | if another error occurs. |
- Api
getRetentionPolicy(string $absPath) : \PHPCR\Retention\RetentionPolicyInterface
Gets the retention poilcy of a node identified by its path.
Returns the retention policy that has been set using setRetentionPolicy() on the node at $absPath or null if no policy has been set.
Name | Type | Description |
---|---|---|
$absPath | string | an absolute path to an existing node. |
Type | Description |
---|---|
\PHPCR\Retention\RetentionPolicyInterface | The retention policy that applies to the existing node at $absPath or null if no policy applies. |
Exception | Description |
---|---|
\PHPCR\PathNotFoundException | if no node at $absPath exists or the session does not have sufficient access to retrieve the node. |
\PHPCR\AccessDeniedException | if the current session does not have sufficient access to retrieve the policy. |
\PHPCR\RepositoryException | if another error occurs. |
- Api
removeHold(string $absPath, \PHPCR\Retention\HoldInterface $hold) : void
Removes the specified hold from the node at $absPath.
The removal does not take effect until a save is performed.
Name | Type | Description |
---|---|---|
$absPath | string | an absolute path. |
$hold | \PHPCR\Retention\HoldInterface | the hold to be removed. |
Exception | Description |
---|---|
\PHPCR\PathNotFoundException | if no node at $absPath exists or the session does not have sufficient access to retrieve the node. |
\PHPCR\AccessDeniedException | if the current session does not have sufficient access to perform the operation. |
\PHPCR\Lock\LockException | if a lock applies at the node at $absPath and this implementation performs this validation immediately. |
\PHPCR\Version\VersionException | if the node at $absPath is read-only due to a checked-in node and this implementation performs this validation immediately. |
\PHPCR\RepositoryException | if another error occurs. |
- Api
removeRetentionPolicy(string $absPath) : void
Removes a previously set retention policy.
Causes the current retention policy on the node at $absPath to no longer apply. The removal does not take effect until a save is performed.
Name | Type | Description |
---|---|---|
$absPath | string | an absolute path to an existing node. |
Exception | Description |
---|---|
\PHPCR\PathNotFoundException | if no node at $absPath exists or the session does not have sufficient access to retrieve the node. |
\PHPCR\AccessDeniedException | if the current session does not have sufficient access to perform the operation. |
\PHPCR\Lock\LockException | if a lock applies at the node at $absPath and this implementation performs this validation immediately. |
\PHPCR\Version\VersionException | if the node at $absPath is read-only due to a checked-in node and this implementation performs this validation immediately. |
\PHPCR\RepositoryException | if another error occurs. |
- Api
setRetentionPolicy(string $absPath, \PHPCR\Retention\RetentionPolicyInterface $retentionPolicy) : void
Sets a retention policy of a node identified by the given path.
Sets the retention policy of the node at $absPath to that defined in the specified policy node. Interpretation and enforcement of this policy is an implementation issue. In any case the policy does does not take effect until a save is performed.
Name | Type | Description |
---|---|---|
$absPath | string | an absolute path to an existing node. |
$retentionPolicy | \PHPCR\Retention\RetentionPolicyInterface | a retention policy. |
Exception | Description |
---|---|
\PHPCR\PathNotFoundException | if no node at $absPath exists or the session does not have sufficient access to retrieve the node. |
\PHPCR\AccessDeniedException | if the current session does not have sufficient access to perform the operation. |
\PHPCR\Lock\LockException | if a lock applies at the node at $absPath and this implementation performs this validation immediately. |
\PHPCR\Version\VersionException | if the node at $absPath is read-only due to a checked-in node and this implementation performs this validation immediately. |
\PHPCR\RepositoryException | if another error occurs. |
- Api