phpcr/src/PHPCR/Retention/RetentionManagerInterface.php

Show: PublicProtectedPrivateinherited
    Table of Contents
    This file is part of the PHPCR API and was originally ported from the Java JCR API to PHP by Karsten Dambekalns for the FLOW3 project.

    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.

    License
    Apache Software License 2.0  
    Link
    http://phpcr.github.com/  

    \PHPCR\Retention\RetentionManagerInterface

    Package: Default
    The RetentionManager object is accessed via SessionInterface::getRetentionManager().
    Api
     

    Methods

    methodpublicaddHold(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.

    Parameters
    NameTypeDescription
    $absPathstring

    The absolute path to a node.

    $namestring

    An application-dependent string.

    $isDeepboolean

    A boolean indicating if the hold applies to the subgraph.

    Returns
    TypeDescription
    \PHPCR\Retention\HoldInterfaceThe Hold applied.
    Throws
    ExceptionDescription
    \PHPCR\PathNotFoundExceptionif no node at $absPath exists or the session does not have sufficient access to retrieve the node.
    \PHPCR\AccessDeniedExceptionif the current session does not have sufficient access to perform the operation.
    \PHPCR\Lock\LockExceptionif a lock applies at the node at $absPath and this implementation performs this validation immediately.
    \PHPCR\Version\VersionExceptionif the node at $absPath is read-only due to a checked-in node and this implementation performs this validation immediately.
    \PHPCR\RepositoryExceptionif another error occurs.
    Details
    Api
     
    methodpublicgetHolds(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.

    Parameters
    NameTypeDescription
    $absPathstring

    The absolute path to a node.

    Returns
    TypeDescription
    arrayAll 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.
    Throws
    ExceptionDescription
    \PHPCR\PathNotFoundExceptionif no node at absPath exists or the session does not have sufficient access to retrieve the node.
    \PHPCR\AccessDeniedExceptionif the current session does not have sufficient access to retrieve the holds.
    \PHPCR\RepositoryExceptionif another error occurs.
    Details
    Api
     
    methodpublicgetRetentionPolicy(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.

    Parameters
    NameTypeDescription
    $absPathstring

    an absolute path to an existing node.

    Returns
    TypeDescription
    \PHPCR\Retention\RetentionPolicyInterfaceThe retention policy that applies to the existing node at $absPath or null if no policy applies.
    Throws
    ExceptionDescription
    \PHPCR\PathNotFoundExceptionif no node at $absPath exists or the session does not have sufficient access to retrieve the node.
    \PHPCR\AccessDeniedExceptionif the current session does not have sufficient access to retrieve the policy.
    \PHPCR\RepositoryExceptionif another error occurs.
    Details
    Api
     
    methodpublicremoveHold(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.

    Parameters
    NameTypeDescription
    $absPathstring

    an absolute path.

    $hold\PHPCR\Retention\HoldInterface

    the hold to be removed.

    Throws
    ExceptionDescription
    \PHPCR\PathNotFoundExceptionif no node at $absPath exists or the session does not have sufficient access to retrieve the node.
    \PHPCR\AccessDeniedExceptionif the current session does not have sufficient access to perform the operation.
    \PHPCR\Lock\LockExceptionif a lock applies at the node at $absPath and this implementation performs this validation immediately.
    \PHPCR\Version\VersionExceptionif the node at $absPath is read-only due to a checked-in node and this implementation performs this validation immediately.
    \PHPCR\RepositoryExceptionif another error occurs.
    Details
    Api
     
    methodpublicremoveRetentionPolicy(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.

    Parameters
    NameTypeDescription
    $absPathstring

    an absolute path to an existing node.

    Throws
    ExceptionDescription
    \PHPCR\PathNotFoundExceptionif no node at $absPath exists or the session does not have sufficient access to retrieve the node.
    \PHPCR\AccessDeniedExceptionif the current session does not have sufficient access to perform the operation.
    \PHPCR\Lock\LockExceptionif a lock applies at the node at $absPath and this implementation performs this validation immediately.
    \PHPCR\Version\VersionExceptionif the node at $absPath is read-only due to a checked-in node and this implementation performs this validation immediately.
    \PHPCR\RepositoryExceptionif another error occurs.
    Details
    Api
     
    methodpublicsetRetentionPolicy(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.

    Parameters
    NameTypeDescription
    $absPathstring

    an absolute path to an existing node.

    $retentionPolicy\PHPCR\Retention\RetentionPolicyInterface

    a retention policy.

    Throws
    ExceptionDescription
    \PHPCR\PathNotFoundExceptionif no node at $absPath exists or the session does not have sufficient access to retrieve the node.
    \PHPCR\AccessDeniedExceptionif the current session does not have sufficient access to perform the operation.
    \PHPCR\Lock\LockExceptionif a lock applies at the node at $absPath and this implementation performs this validation immediately.
    \PHPCR\Version\VersionExceptionif the node at $absPath is read-only due to a checked-in node and this implementation performs this validation immediately.
    \PHPCR\RepositoryExceptionif another error occurs.
    Details
    Api
     
    Documentation was generated by phpDocumentor 2.0.0a12.