You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "angela (JIRA)" <ji...@apache.org> on 2013/07/18 14:58:48 UTC

[jira] [Updated] (OAK-919) Proper handling of locks present on copied nodes

     [ https://issues.apache.org/jira/browse/OAK-919?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

angela updated OAK-919:
-----------------------

    Description: 
i just had a quick look on how copy was implemented in JR-core with respect
to locks present on the tree to be copied to a new location.

it seems that all lock related properties are skipped and thus not copied over to the new location (which IMHO makes sense though i could not find a section in the specification explicitly defining the behavior):

{code}
// copy properties
            for (Name propName : srcState.getPropertyNames()) {

[...]

/**
                 * special handling required for properties with special semantics
                 * (e.g. those defined by mix:referenceable, mix:versionable,
                 * mix:lockable, et.al.)
                 *
                 * todo FIXME delegate to 'node type instance handler'
                 */
                QPropertyDefinition def = ent.getApplicablePropertyDef(
                        srcChildState.getName(), srcChildState.getType(),
                        srcChildState.isMultiValued());
                if (NameConstants.MIX_LOCKABLE.equals(def.getDeclaringNodeType())) {
                    // skip properties defined by mix:lockable
                    continue;
                }
{code}

this is currently missing in OAK

  was:
i just had a quick look on how copy was implemented in JR-core with respect
to locks present on the tree to be copied to a new location.

it seems that all lock related properties are skipped and thus not copied over to the new location (which IMHO makes sense though i could not find a section in the specification explicitly defining the behavior):

{code}
// copy properties
            for (Name propName : srcState.getPropertyNames()) {

[...]

/**
                 * special handling required for properties with special semantics
                 * (e.g. those defined by mix:referenceable, mix:versionable,
                 * mix:lockable, et.al.)
                 *
                 * todo FIXME delegate to 'node type instance handler'
                 */
                QPropertyDefinition def = ent.getApplicablePropertyDef(
                        srcChildState.getName(), srcChildState.getType(),
                        srcChildState.isMultiValued());
                if (NameConstants.MIX_LOCKABLE.equals(def.getDeclaringNodeType())) {
                    // skip properties defined by mix:lockable
                    continue;
                }
{code}

    
> Proper handling of locks present on copied nodes
> ------------------------------------------------
>
>                 Key: OAK-919
>                 URL: https://issues.apache.org/jira/browse/OAK-919
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>            Reporter: angela
>
> i just had a quick look on how copy was implemented in JR-core with respect
> to locks present on the tree to be copied to a new location.
> it seems that all lock related properties are skipped and thus not copied over to the new location (which IMHO makes sense though i could not find a section in the specification explicitly defining the behavior):
> {code}
> // copy properties
>             for (Name propName : srcState.getPropertyNames()) {
> [...]
> /**
>                  * special handling required for properties with special semantics
>                  * (e.g. those defined by mix:referenceable, mix:versionable,
>                  * mix:lockable, et.al.)
>                  *
>                  * todo FIXME delegate to 'node type instance handler'
>                  */
>                 QPropertyDefinition def = ent.getApplicablePropertyDef(
>                         srcChildState.getName(), srcChildState.getType(),
>                         srcChildState.isMultiValued());
>                 if (NameConstants.MIX_LOCKABLE.equals(def.getDeclaringNodeType())) {
>                     // skip properties defined by mix:lockable
>                     continue;
>                 }
> {code}
> this is currently missing in OAK

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira