phpcr/src/PHPCR/Lock/LockInfoInterface.php

Show: PublicProtectedPrivateinherited
    Table of Contents
    This file is part of the PHPCR API and was ported from the Java JCR API to PHP by David Buchmann.

    Copyright 2012 David Buchmann david@liip.ch

    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\Lock\LockInfoInterface

    Package: Default
    A storage object for lock configuration.

    A blank

    LockInfoInterface

    is acquired through LockManagerInterface::createLockInfo().

    The parameters of the LockInfo object can then be set by chaining the set methods, since each method returns the same

    LockInfoInterface

    with the indicated parameter set.

    Once the object is configured, it is passed (along with the path of the node to be locked) to LockManagerInterface::lock.

    The lock characteristics are defined according to the following parameters:

    • isDeep
      : If
      true
      then the lock applies to the specified node and all its descendant nodes; if
      false
      , the lock applies only to the specified node. On a successful lock, the
      jcr:lockIsDeep
      property of the locked node is set to this value.
    • isSessionScoped
      : If
      true
      then the lock will expire upon the expiration of the current session (either through an automatic or explicit
      Session.logout
      ); if false, the lock does not expire until it is explicitly unlocked, it times out, or it is automatically unlocked due to a implementation-specific limitation.

      timeoutHint
      : Specifies the number of seconds until the lock times out (if it is not refreshed with
      Lock.refresh
      in the meantime). An implementation may use this information as a hint or ignore it altogether. Clients can discover the actual timeout by inspecting the returned
      Lock
      object.
    • ownerInfo
      :This parameter can be used to pass a string holding owner information relevant to the client. An implementation may either use or ignore this parameter. If it uses the parameter it must set the
      jcr:lockOwner
      property of the locked node to this value and return this value on
      Lock.getLockOwner
      . If it ignores this parameter the
      jcr:lockOwner
      property (and the value returned by
      Lock.getLockOwner
      ) is set to either the value returned by
      Session.getUserID
      of the owning session or an implementation-specific string identifying the owner.

    Methods

    methodpublicgetIsDeep() : boolean

    Returns the isDeep parameter of the LockInfo object.

    Returns
    TypeDescription
    boolean
    methodpublicgetIsSessionScoped() : boolean

    Returns the isSessionScoped parameter of the LockInfo object.

    Returns
    TypeDescription
    boolean
    methodpublicgetOwnerInfo() : string

    Returns the ownerInfo parameter of the LockInfo object.

    Returns
    TypeDescription
    string
    methodpublicgetTimeoutHint() : int

    Returns the timeoutHint parameter of the LockInfo object.

    Returns
    TypeDescription
    int
    methodpublicsetIsDeep(boolean $isDeep) : \PHPCR\Lock\LockInfoInterface

    Sets the isDeep parameter of the LockInfo object.

    If left unset, this parameter defaults to

    true

    .

    Parameters
    NameTypeDescription
    $isDeepboolean
    Returns
    TypeDescription
    \PHPCR\Lock\LockInfoInterfacethis object with the <code>isDeep</code> parameter set.
    methodpublicsetIsSessionScoped(boolean $isSessionScoped) : \PHPCR\Lock\LockInfoInterface

    Sets the isSessionScoped parameter of the LockInfo object.

    If left unset, this parameter defaults to

    false

    .

    Parameters
    NameTypeDescription
    $isSessionScopedboolean
    Returns
    TypeDescription
    \PHPCR\Lock\LockInfoInterfacethis object with the <code>isSessionScoped</code> parameter set.
    methodpublicsetOwnerInfo(string $ownerInfo) : \PHPCR\Lock\LockInfoInterface

    Sets the ownerInfo parameter of the LockInfo object.

    If left unset, this parameter defaults to

    null

    , meaning no owner information is provided.

    Parameters
    NameTypeDescription
    $ownerInfostring
    Returns
    TypeDescription
    \PHPCR\Lock\LockInfoInterfacethis object with the <code>ownerInfo</code> parameter set.
    methodpublicsetTimeoutHint(int $timeoutHint) : \PHPCR\Lock\LockInfoInterface

    Sets the timeoutHint parameter of the LockInfo object.

    If left unset, this parameter defaults to

    -1

    , meaning no timeout is specified.

    Parameters
    NameTypeDescription
    $timeoutHintint
    Returns
    TypeDescription
    \PHPCR\Lock\LockInfoInterfacethis code> object with the <code>timeoutHint</code> parameter set.
    Documentation was generated by phpDocumentor 2.0.0a12.