[jira] [Created] (OAK-343) Session.getNodeByUUID requires save call
angela created OAK-343: -- Summary: Session.getNodeByUUID requires save call Key: OAK-343 URL: https://issues.apache.org/jira/browse/OAK-343 Project: Jackrabbit Oak Issue Type: Bug Components: core, jcr Reporter: angela while adding mix:referenceable to a new node immediately assigns a uuid and makes the node referenceable, session.getNodeByUUID only works after saving the changes. the following test illustrates this behavior: @Test public void getNodeByUUID() throws RepositoryException { Node node = getNode(/foo).addNode(boo); node.addMixin(JcrConstants.MIX_REFERENCEABLE); assertTrue(node.isNodeType(JcrConstants.MIX_REFERENCEABLE)); String uuid = node.getUUID(); assertNotNull(uuid); assertEquals(uuid, node.getIdentifier()); Node nAgain = node.getSession().getNodeByUUID(uuid); assertTrue(nAgain.isSame(node)); assertTrue(nAgain.isSame(node.getSession().getNodeByIdentifier(uuid))); } -- 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
[jira] [Commented] (OAK-343) Session.getNodeByUUID requires save call
[ https://issues.apache.org/jira/browse/OAK-343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13463663#comment-13463663 ] angela commented on OAK-343: the same applies to IdentifierManager#getTree and main issue behind is that uuid/identifier resolutions uses the query which relies on an index that is only populated after changes have been saved. Session.getNodeByUUID requires save call Key: OAK-343 URL: https://issues.apache.org/jira/browse/OAK-343 Project: Jackrabbit Oak Issue Type: Bug Components: core, jcr Reporter: angela while adding mix:referenceable to a new node immediately assigns a uuid and makes the node referenceable, session.getNodeByUUID only works after saving the changes. the following test illustrates this behavior: @Test public void getNodeByUUID() throws RepositoryException { Node node = getNode(/foo).addNode(boo); node.addMixin(JcrConstants.MIX_REFERENCEABLE); assertTrue(node.isNodeType(JcrConstants.MIX_REFERENCEABLE)); String uuid = node.getUUID(); assertNotNull(uuid); assertEquals(uuid, node.getIdentifier()); Node nAgain = node.getSession().getNodeByUUID(uuid); assertTrue(nAgain.isSame(node)); assertTrue(nAgain.isSame(node.getSession().getNodeByIdentifier(uuid))); } -- 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
[jira] [Commented] (OAK-343) Session.getNodeByUUID requires save call
[ https://issues.apache.org/jira/browse/OAK-343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13463745#comment-13463745 ] angela commented on OAK-343: well, since the uuid is created immediately and the node is referenceable as well, i would expect that i could also get it by uuid. second we have an issue with a backwards compatible user mgt implementation: a NEW user used to be accessible by for the editing session even before commiting it. second, since the tree object isn't stable it needs to be re-accessed during the life-time of a user object. searching isn't possible but i would expect that lookup be id was possible. Session.getNodeByUUID requires save call Key: OAK-343 URL: https://issues.apache.org/jira/browse/OAK-343 Project: Jackrabbit Oak Issue Type: Bug Components: core, jcr Reporter: angela while adding mix:referenceable to a new node immediately assigns a uuid and makes the node referenceable, session.getNodeByUUID only works after saving the changes. the following test illustrates this behavior: @Test public void getNodeByUUID() throws RepositoryException { Node node = getNode(/foo).addNode(boo); node.addMixin(JcrConstants.MIX_REFERENCEABLE); assertTrue(node.isNodeType(JcrConstants.MIX_REFERENCEABLE)); String uuid = node.getUUID(); assertNotNull(uuid); assertEquals(uuid, node.getIdentifier()); Node nAgain = node.getSession().getNodeByUUID(uuid); assertTrue(nAgain.isSame(node)); assertTrue(nAgain.isSame(node.getSession().getNodeByIdentifier(uuid))); } -- 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
[jira] [Updated] (OAK-343) Session.getNodeByUUID requires save call
[ https://issues.apache.org/jira/browse/OAK-343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-343: --- Description: while adding mix:referenceable to a new node immediately assigns a uuid and makes the node referenceable, session.getNodeByUUID only works after saving the changes. the following test illustrates this behavior: @Test public void getNodeByUUID() throws RepositoryException { Node node = getNode(/foo).addNode(boo); node.addMixin(JcrConstants.MIX_REFERENCEABLE); assertTrue(node.isNodeType(JcrConstants.MIX_REFERENCEABLE)); String uuid = node.getUUID(); assertNotNull(uuid); assertEquals(uuid, node.getIdentifier()); Node nAgain = node.getSession().getNodeByUUID(uuid); assertTrue(nAgain.isSame(node)); assertTrue(nAgain.isSame(node.getSession().getNodeByIdentifier(uuid))); } was: while adding mix:referenceable to a new node immediately assigns a uuid and makes the node referenceable, session.getNodeByUUID only works after saving the changes. the following test illustrates this behavior: @Test public void getNodeByUUID() throws RepositoryException { Node node = getNode(/foo).addNode(boo); node.addMixin(JcrConstants.MIX_REFERENCEABLE); assertTrue(node.isNodeType(JcrConstants.MIX_REFERENCEABLE)); String uuid = node.getUUID(); assertNotNull(uuid); assertEquals(uuid, node.getIdentifier()); Node nAgain = node.getSession().getNodeByUUID(uuid); assertTrue(nAgain.isSame(node)); assertTrue(nAgain.isSame(node.getSession().getNodeByIdentifier(uuid))); } Session.getNodeByUUID requires save call Key: OAK-343 URL: https://issues.apache.org/jira/browse/OAK-343 Project: Jackrabbit Oak Issue Type: Bug Components: core, jcr Reporter: angela while adding mix:referenceable to a new node immediately assigns a uuid and makes the node referenceable, session.getNodeByUUID only works after saving the changes. the following test illustrates this behavior: @Test public void getNodeByUUID() throws RepositoryException { Node node = getNode(/foo).addNode(boo); node.addMixin(JcrConstants.MIX_REFERENCEABLE); assertTrue(node.isNodeType(JcrConstants.MIX_REFERENCEABLE)); String uuid = node.getUUID(); assertNotNull(uuid); assertEquals(uuid, node.getIdentifier()); Node nAgain = node.getSession().getNodeByUUID(uuid); assertTrue(nAgain.isSame(node)); assertTrue(nAgain.isSame(node.getSession().getNodeByIdentifier(uuid))); } -- 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
[jira] [Commented] (OAK-250) Enforce jcr constraints for 'protected' items
[ https://issues.apache.org/jira/browse/OAK-250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13463789#comment-13463789 ] angela commented on OAK-250: IMO the protection of items in terms of JCR has nothing to do with access control. thus the approach that would allow admin/system but not other users looks a bit awkward to me. an alternative approach was: - enforce item protection on oak-jcr based on the node type definitions: i.e. add an extra check for regular JCR API write operations if the target items are protected. - not enforcing item protection in oak-core but rather cover this with the commit-validator concept that was in charge of making sure that content of protected items was reasonable, correct in terms of node type constraints... the reason for this approach is that a protected item is not defined to be read-only. instead the goal of the protection is to force the usage of additional API (versioning, access control) that may enforce extra constraints or actually knows what to do in term of item-modification when e.g. a node is checked-in. that logic is executed in the corresponding API implementation but validation can (and probably should) be delegated to oak-core. similarly: if someone is allowed to write protected items by calling the corresponding API methods is defined by specific permissions (e.g. jcr:versionManagement privilege) that again can be checked as part of the commit validation. Enforce jcr constraints for 'protected' items - Key: OAK-250 URL: https://issues.apache.org/jira/browse/OAK-250 Project: Jackrabbit Oak Issue Type: Sub-task Components: jcr Reporter: angela -- 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
[jira] [Commented] (OAK-41) Initial repository setup
[ https://issues.apache.org/jira/browse/OAK-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13467565#comment-13467565 ] angela commented on OAK-41: --- please note that - initial users - initial permissions are depending on the configured setup and implementation. we cannot assume that users or permissions are stored in one particular way. the same applies for those parts of :unique constraint that are bound to a particular implementation (i added a FIXME there). Initial repository setup Key: OAK-41 URL: https://issues.apache.org/jira/browse/OAK-41 Project: Jackrabbit Oak Issue Type: Task Components: core Reporter: angela Attachments: OAK-41-initial-proposal.patch upon the initial creation of a JCR repository the associated SPI layer (oak-core) should take care of setting up the corresponding MK-instance. this includes (incomplete list): - create the jcr repo (not sure what that means in terms of mk-implementation) - create the jcr:system node (unique for the repository, across workspaces) - create the default workspace (- name from config) - create the root node of the default workspace in addition the repository would need to have access to the following information (maybe also mk-nodes underneath jcr:system ??) - built-in node types - built-in namespace - built-in privileges - built-in permissions - repository configuration (can that be stored in the mk?) as far as the workspace is concerned a functional repository would in addition need to have: - build-in users (based on some sort of configuration) - workspace configuration -- 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
[jira] [Created] (OAK-354) Support node types and node type inheritance in query
angela created OAK-354: -- Summary: Support node types and node type inheritance in query Key: OAK-354 URL: https://issues.apache.org/jira/browse/OAK-354 Project: Jackrabbit Oak Issue Type: Sub-task Components: core Reporter: angela i recently tried to run some user mgt related test and found that they might be failing due to a query that restricts the results to nodes of a particular base node type. adding this sub-task as a reminder and to be able to cover dependencies here in jira -- 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
[jira] [Commented] (OAK-169) Support orderable nodes
[ https://issues.apache.org/jira/browse/OAK-169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13469262#comment-13469262 ] angela commented on OAK-169: that's a perfect move. i definitely prefer that over the previous approach that delegated the complete reordering to the implementation on top of oak. similarly i think having an extra api method to cover reordering of nodes makes sense... for the save of flexibility i would however prefer a more general method (reorder() or similar)... while 'orderBefore' has a 1:1 match with the jcr api, i don't particularly like it as it feels a bit awkward to use, when you want to move something to the start or to the end. Support orderable nodes --- Key: OAK-169 URL: https://issues.apache.org/jira/browse/OAK-169 Project: Jackrabbit Oak Issue Type: New Feature Components: jcr Reporter: Jukka Zitting There are JCR clients that depend on the ability to explicitly specify the order of child nodes. That functionality is not included in the MicroKernel tree model, so we need to implement it either in oak-core or oak-jcr using something like an extra (hidden) {{oak:childOrder}} property that records the specified ordering of child nodes. A multi-valued string property is probably good enough for this. -- 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
[jira] [Created] (OAK-369) missing support for relative path consisting of parent-element
angela created OAK-369: -- Summary: missing support for relative path consisting of parent-element Key: OAK-369 URL: https://issues.apache.org/jira/browse/OAK-369 Project: Jackrabbit Oak Issue Type: Bug Components: jcr Reporter: angela Priority: Minor Fix For: 0.3 Persisting paths in properties of type path requires that we can round-trip relative JCR paths through the oak-core persistence, such as ../foobar or . Note that these paths still need prefix remapping so that they are stable with respect to session prefix remappings. -- 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
[jira] [Updated] (OAK-369) missing support for relative path consisting of parent-element
[ https://issues.apache.org/jira/browse/OAK-369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-369: --- Fix Version/s: (was: 0.3) missing support for relative path consisting of parent-element -- Key: OAK-369 URL: https://issues.apache.org/jira/browse/OAK-369 Project: Jackrabbit Oak Issue Type: Bug Components: jcr Reporter: angela Priority: Minor could not reopen OAK-95 - cloning. during testing of user-mgt api found that relpath consisting of a single parent element doesn't work (but used to): @Test public void getNode3() throws RepositoryException { Node node = getNode(/foo); Node root = node.getNode(..); assertNotNull(root); assertEquals(, root.getName()); assertTrue(/.equals(root.getPath())); } -- 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
[jira] [Updated] (OAK-369) missing support for relative path consisting of parent-element
[ https://issues.apache.org/jira/browse/OAK-369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-369: --- Description: could not reopen OAK-95 - cloning. during testing of user-mgt api found that relpath consisting of a single parent element doesn't work (but used to): {code} @Test public void getNode3() throws RepositoryException { Node node = getNode(/foo); Node root = node.getNode(..); assertNotNull(root); assertEquals(, root.getName()); assertTrue(/.equals(root.getPath())); } : {code} was: could not reopen OAK-95 - cloning. during testing of user-mgt api found that relpath consisting of a single parent element doesn't work (but used to): @Test public void getNode3() throws RepositoryException { Node node = getNode(/foo); Node root = node.getNode(..); assertNotNull(root); assertEquals(, root.getName()); assertTrue(/.equals(root.getPath())); } missing support for relative path consisting of parent-element -- Key: OAK-369 URL: https://issues.apache.org/jira/browse/OAK-369 Project: Jackrabbit Oak Issue Type: Bug Components: jcr Reporter: angela Priority: Minor could not reopen OAK-95 - cloning. during testing of user-mgt api found that relpath consisting of a single parent element doesn't work (but used to): {code} @Test public void getNode3() throws RepositoryException { Node node = getNode(/foo); Node root = node.getNode(..); assertNotNull(root); assertEquals(, root.getName()); assertTrue(/.equals(root.getPath())); } : {code} -- 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
[jira] [Created] (OAK-370) Creating Root is too expensive
angela created OAK-370: -- Summary: Creating Root is too expensive Key: OAK-370 URL: https://issues.apache.org/jira/browse/OAK-370 Project: Jackrabbit Oak Issue Type: Improvement Components: core Reporter: angela see http://mail-archives.apache.org/mod_mbox/jackrabbit-oak-dev/201210.mbox/%3c50741032.4050...@adobe.com%3E imo creating a new root instance (and thus creating a new session) should be for free. even creating a root instance that is just used for reading should be cheap. all kind of extra effort associated with a potential write operation should be postponed until write does really happen. -- 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
[jira] [Created] (OAK-380) Define conversion of property values
angela created OAK-380: -- Summary: Define conversion of property values Key: OAK-380 URL: https://issues.apache.org/jira/browse/OAK-380 Project: Jackrabbit Oak Issue Type: Bug Components: core Reporter: angela i just run into the situation of converting a propertystate's value of type Date to a Long, which currently throws numberformatexception. while i can work around this, i think we should come up with a clear definition on value conversion provided by oak-api. the only thing i found so far was the description in PropertyState#getValue that claims that a conversion in done but not which conversions are supported. unless otherwise specified i had silently expected that simple jcr-conversions would work. -- 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
[jira] [Updated] (OAK-386) Define equality or 'sameness' of Tree objects
[ https://issues.apache.org/jira/browse/OAK-386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-386: --- Component/s: core Define equality or 'sameness' of Tree objects - Key: OAK-386 URL: https://issues.apache.org/jira/browse/OAK-386 Project: Jackrabbit Oak Issue Type: Improvement Components: core Reporter: angela i think the Tree interface and implementation should define what exactly can be expected with regard to equality of 2 Tree objects. Since the tree is an oak-level correspondent of the jcr Node we may even take 'sameness' into consideration as it is defined by Item#isSame. That doesn't necessarily mean that we need this on the API but IMO the interface description should mention the contract (equality across repositories, sessions, workspaces...). -- 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
[jira] [Created] (OAK-386) Define equality or 'sameness' of Tree objects
angela created OAK-386: -- Summary: Define equality or 'sameness' of Tree objects Key: OAK-386 URL: https://issues.apache.org/jira/browse/OAK-386 Project: Jackrabbit Oak Issue Type: Improvement Reporter: angela i think the Tree interface and implementation should define what exactly can be expected with regard to equality of 2 Tree objects. Since the tree is an oak-level correspondent of the jcr Node we may even take 'sameness' into consideration as it is defined by Item#isSame. That doesn't necessarily mean that we need this on the API but IMO the interface description should mention the contract (equality across repositories, sessions, workspaces...). -- 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
[jira] [Created] (OAK-387) Clarify behavior/state of Root and Tree after calling ContentSession#close()
angela created OAK-387: -- Summary: Clarify behavior/state of Root and Tree after calling ContentSession#close() Key: OAK-387 URL: https://issues.apache.org/jira/browse/OAK-387 Project: Jackrabbit Oak Issue Type: Improvement Components: core Reporter: angela quickly discussed this topic with jukka today in the office. as far as i know the API contract does currently not specify what happens to (the state of) a Root or Tree once the ContentSession has been closed. if i am not mistaken, the current implementation would just loose the permissions that were granted to the original subject... but that's rather a coincidence (and i didn't test it to verify that's really the case) possible solutions could be: - upon session closure the root/tree becomes invalid (invalidstate) and throws - the root/tree are still valid but doesn't have the original permissions any more - default permissions for empty-subject would apply - ... whatever solution we may prefer in the end, i think that API contract should state the expected behavior (even if it was undefined) and we should have tests verifying the current implementation does what we think it should do. -- 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
[jira] [Assigned] (OAK-395) Inconsistency in Node#setProperty in case of null value
[ https://issues.apache.org/jira/browse/OAK-395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela reassigned OAK-395: -- Assignee: angela Inconsistency in Node#setProperty in case of null value --- Key: OAK-395 URL: https://issues.apache.org/jira/browse/OAK-395 Project: Jackrabbit Oak Issue Type: Bug Components: jcr Reporter: angela Assignee: angela Setting a null value to a single valued property will result in 'null' being returned while executing the same on a multivalued property will return the removed property. jr2 returned the removed property in both cases as far as i remember and i would suggest that we don't change that behavior. in particular since the specification IMO doesn't allow to return null-values for these methods. -- 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
[jira] [Created] (OAK-395) Inconsistency in Node#setProperty in case of null value
angela created OAK-395: -- Summary: Inconsistency in Node#setProperty in case of null value Key: OAK-395 URL: https://issues.apache.org/jira/browse/OAK-395 Project: Jackrabbit Oak Issue Type: Bug Components: jcr Reporter: angela Setting a null value to a single valued property will result in 'null' being returned while executing the same on a multivalued property will return the removed property. jr2 returned the removed property in both cases as far as i remember and i would suggest that we don't change that behavior. in particular since the specification IMO doesn't allow to return null-values for these methods. -- 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
[jira] [Commented] (OAK-250) Enforce jcr constraints for 'protected' items
[ https://issues.apache.org/jira/browse/OAK-250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13486786#comment-13486786 ] angela commented on OAK-250: Revision: 1403656 - move definition and effective node type related code to nodetype plugin package - remove duplicate code in NodeTypeImpl - add missing test for protection in NodeType#canSetProperty - add TODO/FIXME comments in NodeTypeImpl for code that seems insufficient to me the test for items being protected is still missing with - Session#move - Workspace#move - Workspace#copy - Workspace#clone Enforce jcr constraints for 'protected' items - Key: OAK-250 URL: https://issues.apache.org/jira/browse/OAK-250 Project: Jackrabbit Oak Issue Type: Sub-task Components: jcr Reporter: angela -- 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
[jira] [Commented] (OAK-395) Inconsistency in Node#setProperty in case of null value
[ https://issues.apache.org/jira/browse/OAK-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13486881#comment-13486881 ] angela commented on OAK-395: as long as we don't return null, i am fine with any solution. Inconsistency in Node#setProperty in case of null value --- Key: OAK-395 URL: https://issues.apache.org/jira/browse/OAK-395 Project: Jackrabbit Oak Issue Type: Bug Components: jcr Reporter: angela Assignee: angela Setting a null value to a single valued property will result in 'null' being returned while executing the same on a multivalued property will return the removed property. jr2 returned the removed property in both cases as far as i remember and i would suggest that we don't change that behavior. in particular since the specification IMO doesn't allow to return null-values for these methods. -- 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
[jira] [Commented] (OAK-411) Validator for node type management
[ https://issues.apache.org/jira/browse/OAK-411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13487633#comment-13487633 ] angela commented on OAK-411: added initial draft of RegistrationValidator in revision 1404049. it currently still has plenty of TODOs and currently only prevents un-registration of built-in node types in order to be able to resolve the hack/todo in ReadWriteNodeTypeManager. Validator for node type management -- Key: OAK-411 URL: https://issues.apache.org/jira/browse/OAK-411 Project: Jackrabbit Oak Issue Type: Sub-task Components: core Reporter: angela while working on the protected item definitions i realized that we don't have any validation for node type management operations on the oak-level. IMO there should be a separate validator for content changes underneath /jcr:system/jcr:nodeTypes with the following characteristics: - prevent removal of built-in node types - assert validity of node type definition - prevent changes to registered node types that would render existing nodes invalid -- 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
[jira] [Commented] (OAK-250) Enforce jcr constraints for 'protected' items
[ https://issues.apache.org/jira/browse/OAK-250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13487731#comment-13487731 ] angela commented on OAK-250: btw: NodeType#getSuperType is something different (or maybe a subtask)... the effective node type also should take mixin types into account not just the primary type. Enforce jcr constraints for 'protected' items - Key: OAK-250 URL: https://issues.apache.org/jira/browse/OAK-250 Project: Jackrabbit Oak Issue Type: Sub-task Components: jcr Reporter: angela -- 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
[jira] [Comment Edited] (OAK-250) Enforce jcr constraints for 'protected' items
[ https://issues.apache.org/jira/browse/OAK-250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13487721#comment-13487721 ] angela edited comment on OAK-250 at 10/31/12 1:01 PM: -- as you might have seen there is a TODO there and there is another TODO in the TypeValidator you created earlier that again provides the same functionality (and added a third time the exact same but buggy code) and in effect defines an effectivenodetype. i just didn't want to change too much to the original logic that's why i didn't introduce an 'EffectiveNodeType' class which IMO was much better than having the provider return IterableNodeType'. feel free to clean up any remaining redundancies but please be aware that it wasn't me introducing the redundancy... you may not have notice before, because the code was just spread all over the place. svn annotate will be your friend ;-) was (Author: anchela): as you might have seen there is a TODO there and there is another TODO in the TypeValidator you created earlier that again provides the same functionality (and added a third time the exact same - but buggy - code) and in effect defines an effectivenodetype. i just didn't want to change too much to the original logic that's why i didn't introduce an 'EffectiveNodeType' class which IMO was much better than having the provider return IterableNodeType'. Enforce jcr constraints for 'protected' items - Key: OAK-250 URL: https://issues.apache.org/jira/browse/OAK-250 Project: Jackrabbit Oak Issue Type: Sub-task Components: jcr Reporter: angela -- 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
[jira] [Commented] (OAK-411) Validator for node type management
[ https://issues.apache.org/jira/browse/OAK-411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13488037#comment-13488037 ] angela commented on OAK-411: just one additional comment: currently there is some validation done in ReadWriteNodeTypeManager before registration or unregistration of nodetypes. IMHO that needs to be done in the RegistrationValidator (or however that validator is called in the end) as we also have to make sure that no invalid node type definitions are created or modified by means of using oak-api (circumventing jcr node type management API)... where or not some preliminary validations should be done in the NodeTypeManager methods upfront is most probably a question of preference... however, i think it is mandatory upon commit. Validator for node type management -- Key: OAK-411 URL: https://issues.apache.org/jira/browse/OAK-411 Project: Jackrabbit Oak Issue Type: Sub-task Components: core Reporter: angela while working on the protected item definitions i realized that we don't have any validation for node type management operations on the oak-level. IMO there should be a separate validator for content changes underneath /jcr:system/jcr:nodeTypes with the following characteristics: - prevent removal of built-in node types - assert validity of node type definition - prevent changes to registered node types that would render existing nodes invalid -- 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
[jira] [Commented] (OAK-414) Importing protected properties
[ https://issues.apache.org/jira/browse/OAK-414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13488792#comment-13488792 ] angela commented on OAK-414: in revision: 1404623 i added another package to oak-spi containing a slightly modified version of protected item import facility that we used to have in jackrabbit core. in particular i completely dropped the distinction between methods used for workspace vs session import. in addition i modified the security related configurations that they can expose their implementation specific importer functionality. currently this code is not used in the XML-importer which IMO needs some major refactoring in order to really provide support for the full JCR import functionality. in a next step, i would verify if the initial draft was suitable to cover user information. feel free to adjust or modify it, if there is something missing or not suitable. Importing protected properties -- Key: OAK-414 URL: https://issues.apache.org/jira/browse/OAK-414 Project: Jackrabbit Oak Issue Type: Sub-task Components: jcr Reporter: angela for backwards compatibility with jackrabbit we should also implement the ability to import protected items. while import version content is most probably unique and system defined, there are quite some areas like user management and access control that need to be pluggable and thus the particular import behavior should be defined by the corresponding implementation. i envision this to work in a similar way than the implementation specific validators. steps to get there include: - properly setup the xml-import such that it recognizes protected items and calls the configured protected-item-importers. - allow to plugin implementation specific extensions - define an interface for that protected item import. regarding the latest part: in contrast to jackrabbit core, where we had just the JCR API at hand i would suggest to setup those special importers such that they can operate both on the JCR API (session and extensions) and on the OAK API giving the implementation more flexibility on how to actually treat the import. -- 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
[jira] [Updated] (OAK-414) Importing protected properties and nodes
[ https://issues.apache.org/jira/browse/OAK-414?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-414: --- Summary: Importing protected properties and nodes (was: Importing protected properties) Importing protected properties and nodes Key: OAK-414 URL: https://issues.apache.org/jira/browse/OAK-414 Project: Jackrabbit Oak Issue Type: Sub-task Components: jcr Reporter: angela for backwards compatibility with jackrabbit we should also implement the ability to import protected items. while import version content is most probably unique and system defined, there are quite some areas like user management and access control that need to be pluggable and thus the particular import behavior should be defined by the corresponding implementation. i envision this to work in a similar way than the implementation specific validators. steps to get there include: - properly setup the xml-import such that it recognizes protected items and calls the configured protected-item-importers. - allow to plugin implementation specific extensions - define an interface for that protected item import. regarding the latest part: in contrast to jackrabbit core, where we had just the JCR API at hand i would suggest to setup those special importers such that they can operate both on the JCR API (session and extensions) and on the OAK API giving the implementation more flexibility on how to actually treat the import. -- 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
[jira] [Commented] (OAK-427) ItemDelegate has dependency to TreeImpl#NullLocation
[ https://issues.apache.org/jira/browse/OAK-427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13492249#comment-13492249 ] angela commented on OAK-427: i might well be mistaken, but from my understanding the NullLocation doesn't have any dependency to TreeImpl and it also felt a bit odd if it had one since as you state it is intended to represent those case where there is no (accessible) tree. ItemDelegate has dependency to TreeImpl#NullLocation Key: OAK-427 URL: https://issues.apache.org/jira/browse/OAK-427 Project: Jackrabbit Oak Issue Type: Bug Components: jcr Reporter: angela Priority: Minor The item-delegate has a dependency to NullLocation which is a inner class of TreeImpl and as such is an implementation detail. -- 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
[jira] [Commented] (OAK-396) Limit property index to nodes of given type
[ https://issues.apache.org/jira/browse/OAK-396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13493147#comment-13493147 ] angela commented on OAK-396: this is a bug not an improvement Limit property index to nodes of given type --- Key: OAK-396 URL: https://issues.apache.org/jira/browse/OAK-396 Project: Jackrabbit Oak Issue Type: Bug Components: core Affects Versions: 0.5 Reporter: Marcel Reutegger As discussed on the mailing list [0] the property index must be enhanced to take the node type into account. [0] http://jackrabbit.markmail.org/thread/loudobqviwvhsli5 -- 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
[jira] [Commented] (OAK-432) Repository does not restart with PrivilegeInitializer
[ https://issues.apache.org/jira/browse/OAK-432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13493168#comment-13493168 ] angela commented on OAK-432: sorry for that... i always run the complete build including integrationtest but never restart ;) hope it's fixed with revision 1407069, please reopen if that's not the case Repository does not restart with PrivilegeInitializer - Key: OAK-432 URL: https://issues.apache.org/jira/browse/OAK-432 Project: Jackrabbit Oak Issue Type: Bug Reporter: Marcel Reutegger Assignee: angela Priority: Blocker PrivilegeInitializer tries to register built-in privileges on every startup and fails on a second start with: javax.jcr.RepositoryException: Privilege definition with name 'rep:readNodes' already exists. at org.apache.jackrabbit.oak.security.privilege.PrivilegeDefinitionWriter.writePrivilegeNode(PrivilegeDefinitionWriter.java:75) at org.apache.jackrabbit.oak.security.privilege.PrivilegeDefinitionWriter.writeDefinitions(PrivilegeDefinitionWriter.java:56) at org.apache.jackrabbit.oak.security.privilege.PrivilegeInitializer.initialize(PrivilegeInitializer.java:82) ... 34 more -- 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
[jira] [Created] (OAK-435) Compilation failure due to MongoGridFSBlobStore
angela created OAK-435: -- Summary: Compilation failure due to MongoGridFSBlobStore Key: OAK-435 URL: https://issues.apache.org/jira/browse/OAK-435 Project: Jackrabbit Oak Issue Type: Bug Components: mongomk Reporter: angela building the oak-mongomk failes on my machine with the following error: ERROR] COMPILATION ERROR : [INFO] - [ERROR] [...]oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/blob/MongoGridFsBlobStore.java:[35,7] class MongoGridFSBlobStore is public, should be declared in a file named MongoGridFSBlobStore.java [ -- 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
[jira] [Updated] (OAK-424) MongoMicroKernel changes
[ https://issues.apache.org/jira/browse/OAK-424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-424: --- Component/s: (was: mk) mongomk MongoMicroKernel changes Key: OAK-424 URL: https://issues.apache.org/jira/browse/OAK-424 Project: Jackrabbit Oak Issue Type: Improvement Components: mongomk Reporter: Mete Atamel Assignee: Michael Dürig Fix For: 0.6 Attachments: oak-mongomk-merge-failure-test.diff I worked on MongoMK in my own fork [0] and this is a request to merge those changes back into Oak. There's a pull request [1] but the summary of changes are the following: -Performance tests for MicroKernel by Tudor Rogoz. -Test and fix for OAK-351 -Removed all @author and other code reorganization -Fix for FetchValidCommitsQuery -Fix for MicroKernelIT#copyDescendant test -Jsop fixes -Diff support and tests -Osgi support -Branch support and tests -Merge support and tests -GetJournal fixes -GetRevisionHistory fixes -Fixes and tests for copy, move nodes -Fix for OAK-384 -General API and code cleanup -Split diff, merge, getJournal, getRevHistory, waitForCommit into its own commands -Converted *CommandMongo tests into MongoMK* tests -Fixes for concurrency issue reported by Tudor. -Renamed head collection to sync -Moved MongoUtil functionality under Mongoconnection -Renamed *Query clases into *Action -oak-mongo-perf cleanup -Merged CommitImpl into CommitMongo -Renamed MongoBlobStore to MongoGridFSBlobStore -Initial MongoBlobStore implementation based on AbstractBlobStore -Blob retrieval fix in MongoGridFSBlobStore -Move collection handling from MongoConnection to MongoNodeStore [0] https://github.com/meteatamel/jackrabbit-oak/ [1] https://github.com/apache/jackrabbit-oak/pull/6 -- 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
[jira] [Commented] (OAK-426) TreeLocation: Add support for relative paths containing current or parent element
[ https://issues.apache.org/jira/browse/OAK-426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13494053#comment-13494053 ] angela commented on OAK-426: that the Tree doesn't handle it is pretty obvious but if it really should not care is IMHO debatable. the longer i actually think about the more i have the impression that it was better to deal with '.' and '..' wherever the OAK API takes a relative path. keeping this in a utility might work but i have the feeling that it's really sensible to do so and will be prone for errors as there will be many places where that needs to be enforced. in addition i simply can't come up with a use-case of having '.' and '..' being valid names for a Tree or a PropertyState and since the OAK API is on a different level of abstraction than the MK I don't see why we should be bound to the same level of ignorance. TreeLocation: Add support for relative paths containing current or parent element - Key: OAK-426 URL: https://issues.apache.org/jira/browse/OAK-426 Project: Jackrabbit Oak Issue Type: New Feature Components: core Reporter: angela i just run into another place where i would need to work around missing support for the current (.) and parent (..) element in the TreeLocation. IMO it would make sense to add this to TreeLocation#getChild... maybe even rename it to TreeLocation#getLocation(String relativePath)? -- 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
[jira] [Updated] (OAK-426) OAK-API: Deal with names and relativePaths consisting/containing . and ..
[ https://issues.apache.org/jira/browse/OAK-426?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-426: --- Summary: OAK-API: Deal with names and relativePaths consisting/containing . and .. (was: TreeLocation: Add support for relative paths containing current or parent element) i slightly adjusted to subject to match what i feel should be present... if TreeLocation is able to handle relative paths containing . and .. the rest of the OAK-API should act consistently OAK-API: Deal with names and relativePaths consisting/containing . and .. - Key: OAK-426 URL: https://issues.apache.org/jira/browse/OAK-426 Project: Jackrabbit Oak Issue Type: New Feature Components: core Reporter: angela i just run into another place where i would need to work around missing support for the current (.) and parent (..) element in the TreeLocation. IMO it would make sense to add this to TreeLocation#getChild... maybe even rename it to TreeLocation#getLocation(String relativePath)? -- 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
[jira] [Updated] (OAK-51) Access Control Management
[ https://issues.apache.org/jira/browse/OAK-51?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-51: -- Summary: Access Control Management (was: Implement JCR Access Control Management) Access Control Management - Key: OAK-51 URL: https://issues.apache.org/jira/browse/OAK-51 Project: Jackrabbit Oak Issue Type: Task Components: core, jcr Reporter: angela Assignee: angela -- 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
[jira] [Created] (OAK-444) Authorization for the jcr version store
angela created OAK-444: -- Summary: Authorization for the jcr version store Key: OAK-444 URL: https://issues.apache.org/jira/browse/OAK-444 Project: Jackrabbit Oak Issue Type: Sub-task Components: core Reporter: angela as explained in JCR-2963 the version store needs special attention when it comes to access control and permissions enforced on the store. for oak we need to define mechanisms on how to control access to the version store and provide the possibility to limit access to individual parts of the version store. some possibilities are already listed in JCR-2963. additional topics include: - searching for versioned content - find and restore versions that have no corresponding versionable node in the content tree - ability to prevent access to version store altogether without preventing access to versions/version histories through JCR version operations -- 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
[jira] [Commented] (OAK-453) Move move and copy methods from Root to Tree
[ https://issues.apache.org/jira/browse/OAK-453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13500955#comment-13500955 ] angela commented on OAK-453: -1 for moving copy/move to Tree as long as we didn't reach consensus on how to deal with multiple workspace. Move move and copy methods from Root to Tree Key: OAK-453 URL: https://issues.apache.org/jira/browse/OAK-453 Project: Jackrabbit Oak Issue Type: Improvement Components: core Reporter: Michael Dürig Attachments: OAK-453.patch In OAK-391 we decided to not track trees through moves any more (see also http://markmail.org/message/b6dcyae362akyogd). This allows us to move the {{move}} and {{copy}} methods from {{Root}} to {{Tree}} where they feel more natural. -- 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
[jira] [Reopened] (OAK-410) RepositoryInitializer runs before the CommitHooks are in place
[ https://issues.apache.org/jira/browse/OAK-410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela reopened OAK-410: i have the impression that fix broke the build... reopening. RepositoryInitializer runs before the CommitHooks are in place -- Key: OAK-410 URL: https://issues.apache.org/jira/browse/OAK-410 Project: Jackrabbit Oak Issue Type: Bug Components: core Reporter: Alex Parvulescu Fix For: 0.6 Attachments: 0001-OAK-410-RepositoryInitializer-runs-before-the-Commit.patch, OAK-410.patch The InitialContent installs a bunch of content nodes before the CommitHooks are enabled. This hurts the query indexes as they don't get notified about the initial content and cannot index/process it. I'm mostly referring to the Auth stuff that relies on a combo of initial content queries. Luckily when using the PropertyIndex it does fallback to full repository traversal, which works (albeit slowly). Unfortunately I can't say the same for the lucene index). A bit of context here [0]. [0] https://issues.apache.org/jira/browse/OAK-403?focusedCommentId=13486763page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13486763 -- 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
[jira] [Commented] (OAK-458) Define upgrade from Jackrabbit2.x to Jackrabbit OAK
[ https://issues.apache.org/jira/browse/OAK-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13501828#comment-13501828 ] angela commented on OAK-458: among other things this includes: - content migration - migrating custom node types - migrating custom privileges - migrating locks - migrating repository configuration Define upgrade from Jackrabbit2.x to Jackrabbit OAK --- Key: OAK-458 URL: https://issues.apache.org/jira/browse/OAK-458 Project: Jackrabbit Oak Issue Type: Task Components: core, jcr, mk Reporter: angela sooner or later we should start thinking about the upgrade path that allows existing jackrabbit 2.x repositories to be moved to 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
[jira] [Created] (OAK-460) Node#getDefinition and Property#getDefinition depend on the accessibility of the parent node
angela created OAK-460: -- Summary: Node#getDefinition and Property#getDefinition depend on the accessibility of the parent node Key: OAK-460 URL: https://issues.apache.org/jira/browse/OAK-460 Project: Jackrabbit Oak Issue Type: Bug Components: jcr Reporter: angela currently the definition of a given item is obtained by reading the node type information of the parent node and is thus relying on the accessibility of the parent node. as discussed previously in other occasions we cannot rely on this as access to the parent might be denied. in the long run we may want to think about a way on how to determine the definition (or parts of the definition such as for example information about the protection status) in the absence of the parent. -- 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
[jira] [Commented] (OAK-460) Node#getDefinition and Property#getDefinition depend on the accessibility of the parent node
[ https://issues.apache.org/jira/browse/OAK-460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13501884#comment-13501884 ] angela commented on OAK-460: yes we need to worry about this a long as we don't have any other way to determine the protected status of a given node than by accessing the item definition... this is currently just added on top of JCR API which will not work in the long run... in other words i think that we need the ability to determine the characteristics of an item on a deeper level that JCR... this is not limited to the protection status. even internal calls that make decisions based on node type characteristics just use JCR API to retrieve the corresponding properties. this will not work once we have access control restrictions being enforced. Node#getDefinition and Property#getDefinition depend on the accessibility of the parent node Key: OAK-460 URL: https://issues.apache.org/jira/browse/OAK-460 Project: Jackrabbit Oak Issue Type: Bug Components: jcr Reporter: angela currently the definition of a given item is obtained by reading the node type information of the parent node and is thus relying on the accessibility of the parent node. as discussed previously in other occasions we cannot rely on this as access to the parent might be denied. in the long run we may want to think about a way on how to determine the definition (or parts of the definition such as for example information about the protection status) in the absence of the parent. -- 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
[jira] [Updated] (OAK-127) Support for XML imports
[ https://issues.apache.org/jira/browse/OAK-127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-127: --- Component/s: jcr Support for XML imports --- Key: OAK-127 URL: https://issues.apache.org/jira/browse/OAK-127 Project: Jackrabbit Oak Issue Type: Bug Components: jcr Reporter: Jukka Zitting Oak already supports document and system view XML exports. We need support for also importing those formats. -- 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
[jira] [Updated] (OAK-127) JCR: Support for XML imports
[ https://issues.apache.org/jira/browse/OAK-127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-127: --- Summary: JCR: Support for XML imports (was: Support for XML imports) JCR: Support for XML imports Key: OAK-127 URL: https://issues.apache.org/jira/browse/OAK-127 Project: Jackrabbit Oak Issue Type: Bug Components: jcr Reporter: Jukka Zitting Oak already supports document and system view XML exports. We need support for also importing those formats. -- 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
[jira] [Updated] (OAK-359) QueryEngine joins lack nodeType information
[ https://issues.apache.org/jira/browse/OAK-359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-359: --- Component/s: core QueryEngine joins lack nodeType information --- Key: OAK-359 URL: https://issues.apache.org/jira/browse/OAK-359 Project: Jackrabbit Oak Issue Type: Sub-task Components: core Reporter: Alex Parvulescu When using a lucene index, the test testInnerJoin(org.apache.jackrabbit.test.api.query.qom.ChildNodeJoinConditionTest) fails because the provided filter contains an empty node type info. -- 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
[jira] [Updated] (OAK-201) NamespaceRegistry is very slow
[ https://issues.apache.org/jira/browse/OAK-201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-201: --- Component/s: jcr core NamespaceRegistry is very slow -- Key: OAK-201 URL: https://issues.apache.org/jira/browse/OAK-201 Project: Jackrabbit Oak Issue Type: Bug Components: core, jcr Reporter: Thomas Mueller Attachments: OAK-201.patch, SessionImpl.patch The NamespaceRegistryImpl.getURI and getPrefix are called a lot, for example by NamePathMapperImpl.getOakName. The method doesn't do any caching, which is a problem because it has to read it each time from the repository. Even if it would do caching, it wouldn't help because it the method WorkspaceImpl.getNamespaceRegistry creates a new NamespaceRegistryImpl each time it is called. To allow caching of known mappings, the instance needs to be cached as well. -- 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
[jira] [Updated] (OAK-450) MongoMK requires H2
[ https://issues.apache.org/jira/browse/OAK-450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-450: --- Component/s: mongomk MongoMK requires H2 --- Key: OAK-450 URL: https://issues.apache.org/jira/browse/OAK-450 Project: Jackrabbit Oak Issue Type: Bug Components: mongomk Reporter: Carsten Ziegeler The current MongoMK bundle includes org/apache/jackrabbit/mk/persistence which in turn requires h2. So right now it's now possible to resolve the MongoMK bundle without having a h2 bundle deployed -- 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
[jira] [Updated] (OAK-301) Document Oak internals
[ https://issues.apache.org/jira/browse/OAK-301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-301: --- Component/s: core Document Oak internals -- Key: OAK-301 URL: https://issues.apache.org/jira/browse/OAK-301 Project: Jackrabbit Oak Issue Type: New Feature Components: core Reporter: Jukka Zitting To make it easier for new people to get involved, we should have some higher level documentation than just javadocs and dev@ threads about key parts of the internal design 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
[jira] [Updated] (OAK-388) Add NodeType Index
[ https://issues.apache.org/jira/browse/OAK-388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-388: --- Component/s: core Add NodeType Index -- Key: OAK-388 URL: https://issues.apache.org/jira/browse/OAK-388 Project: Jackrabbit Oak Issue Type: Improvement Components: core Reporter: Alex Parvulescu Assignee: Marcel Reutegger Fix For: 0.6 Attachments: OAK-388.patch, oak-core-property-index.patch I'm proposing a new property index for node types. -- 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
[jira] [Updated] (OAK-392) Review ContentSession#createBlob
[ https://issues.apache.org/jira/browse/OAK-392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-392: --- Component/s: mk core Review ContentSession#createBlob Key: OAK-392 URL: https://issues.apache.org/jira/browse/OAK-392 Project: Jackrabbit Oak Issue Type: Improvement Components: core, mk Reporter: angela see also http://markmail.org/message/xc2klids33vjjkud -- 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
[jira] [Updated] (OAK-295) Jackrabbit query with spaces in node names
[ https://issues.apache.org/jira/browse/OAK-295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-295: --- Component/s: query core Jackrabbit query with spaces in node names -- Key: OAK-295 URL: https://issues.apache.org/jira/browse/OAK-295 Project: Jackrabbit Oak Issue Type: Sub-task Components: core, query Reporter: Alex Parvulescu Assignee: Thomas Mueller I'm looking at {{SQL2PathEscapingTest#testGetChildrenApiDirect}} - one of 2 failing tests imported from the Jackrabbit query test suite. The query that doesn't work looks like {code} select [selector].* from [{http://www.jcp.org/jcr/nt/1.0}base] AS [selector] where ISCHILDNODE([selector], [/testroot/a b]) {code} This query is build using the {{QueryObjectModelFactory}} but then it gets transformed to its sql2 query equivalent string and then parsed back in again, so the {{SQL2Parser}} in oak gets confused and the path {{/testroot/a b}} gets mangled into {{/testroot/ab}}. I see one of 2 issues as the coulprit - the path is not quoted, maybe that is why the {{SQL2Parser}} can't extract it properly. In this case who should handle quoting? or - the SQL2Parser should be able to extract the path properly, it is surrounded by [] tokens anyway. thoughts? -- 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
[jira] [Updated] (OAK-402) Refactor query and index tests
[ https://issues.apache.org/jira/browse/OAK-402?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-402: --- Component/s: query core Refactor query and index tests -- Key: OAK-402 URL: https://issues.apache.org/jira/browse/OAK-402 Project: Jackrabbit Oak Issue Type: Bug Components: core, query Reporter: Thomas Mueller Assignee: Thomas Mueller The query tests should be refactored so that tests are only run once unless they need to run with different index providers. -- 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
[jira] [Updated] (OAK-14) Identify and document changes in behaviour wrt. Jackrabbit 2
[ https://issues.apache.org/jira/browse/OAK-14?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-14: -- Component/s: jcr core Identify and document changes in behaviour wrt. Jackrabbit 2 Key: OAK-14 URL: https://issues.apache.org/jira/browse/OAK-14 Project: Jackrabbit Oak Issue Type: Task Components: core, jcr Reporter: Michael Dürig Labels: documentation, test Some implementation specific behaviour will likely change. We should document the cases, provide test cases and migration paths where applicable. This issue serves as a container. Please create separate issues for each identifies change in behaviour. -- 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
[jira] [Updated] (OAK-74) avoid use of internal namespace
[ https://issues.apache.org/jira/browse/OAK-74?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-74: -- Component/s: core avoid use of internal namespace - Key: OAK-74 URL: https://issues.apache.org/jira/browse/OAK-74 Project: Jackrabbit Oak Issue Type: Wish Components: core Reporter: Julian Reschke Priority: Minor We should try to avoid using the internal namespace in Oak (reminder: the string internal is not a valid URI) -- 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
[jira] [Created] (OAK-480) Authorizable Query
angela created OAK-480: -- Summary: Authorizable Query Key: OAK-480 URL: https://issues.apache.org/jira/browse/OAK-480 Project: Jackrabbit Oak Issue Type: Sub-task Reporter: angela most authorizable queries are still failing. this subtask is a reminder for that particular topic within the user-mgt implementation. - test if query code is correct and produces equivalent queries as in jackrabbit 2.x - test if query itself works in a backwards compatible manner. - finally excluded user-query tests should be removed from the known issues list. -- 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
[jira] [Created] (OAK-482) Group members stored in a rep:members tree
angela created OAK-482: -- Summary: Group members stored in a rep:members tree Key: OAK-482 URL: https://issues.apache.org/jira/browse/OAK-482 Project: Jackrabbit Oak Issue Type: Sub-task Components: core Reporter: angela storing group members in a dedicated rep:members tree is currently not yet implemented. - jr 2.x node type definition allows SNS which are not supported in oak - jr 2.x node type definition stores members in residual properties, which up to now doesn't allow to use a specific property index. - the jr 2.x implementation is rather cumbersome as it doesn't allow to change the configuration later on such that existing groups can benefit from the config change. for a new implementation in oak i would like to slightly change the way group members are stored in a hierarchy: - drop SNS - change member-property to a multivalue rep:members property in the node hierarchy - same index as for non-tree implementation - config change will result in the member-tree to be created also for existing groups. - even if member-tree option is enabled the members are stored in the default mv property and just have a tree structured added if required based on the config option. - adjust xml import of user content accordingly this would required the following additional steps: - add backwards compatible behavior when reading and querying existing membership information. - ev. add commit hook that migrates the 'old' structure to the new one upon modification of the group - ev. add migration path (depending on how we envision upgrading from jr 2.x to oak in general). -- 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
[jira] [Created] (OAK-483) Implement AccessControlAction
angela created OAK-483: -- Summary: Implement AccessControlAction Key: OAK-483 URL: https://issues.apache.org/jira/browse/OAK-483 Project: Jackrabbit Oak Issue Type: Sub-task Components: core Reporter: angela implementation of AccessControlAction is still commented and waiting for the authorization code to be usable to some extend... -- 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
[jira] [Created] (OAK-486) Add pluggability for Observer implementations
angela created OAK-486: -- Summary: Add pluggability for Observer implementations Key: OAK-486 URL: https://issues.apache.org/jira/browse/OAK-486 Project: Jackrabbit Oak Issue Type: Improvement Components: core Reporter: angela as far as i understood during our berlin oakathon the aim of the Observer interface is the allow for final commit processing after the CommitHook(s) in particular the validators have completed their job. however, there is currently no way to plugin such these extra commit actions that come after the hooks/validators. -- 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
[jira] [Updated] (OAK-485) Store jcr:all in the content and update upon privilege registration
[ https://issues.apache.org/jira/browse/OAK-485?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-485: --- Parent Issue: OAK-64 (was: OAK-90) Store jcr:all in the content and update upon privilege registration --- Key: OAK-485 URL: https://issues.apache.org/jira/browse/OAK-485 Project: Jackrabbit Oak Issue Type: Sub-task Components: core Reporter: angela Assignee: angela in the light of the access control implementation the special handling of the jcr:all privilege doesn't work any more (see also TODO in the code). instead it should be stored in the content along with the other privileges and needs to be updated upon successful privilege registration AFTER the PrivilegeValidator performed the validation of the new privilege. -- 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
[jira] [Resolved] (OAK-485) Store jcr:all in the content and update upon privilege registration
[ https://issues.apache.org/jira/browse/OAK-485?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela resolved OAK-485. Resolution: Fixed Committed revision 1416413. Store jcr:all in the content and update upon privilege registration --- Key: OAK-485 URL: https://issues.apache.org/jira/browse/OAK-485 Project: Jackrabbit Oak Issue Type: Sub-task Components: core Reporter: angela Assignee: angela in the light of the access control implementation the special handling of the jcr:all privilege doesn't work any more (see also TODO in the code). instead it should be stored in the content along with the other privileges and needs to be updated upon successful privilege registration AFTER the PrivilegeValidator performed the validation of the new privilege. -- 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
[jira] [Reopened] (OAK-490) Add EffectiveNodeTypeManager#isNodeType
[ https://issues.apache.org/jira/browse/OAK-490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela reopened OAK-490: for some reason this causes a regression in our adobe internal build... Add EffectiveNodeTypeManager#isNodeType --- Key: OAK-490 URL: https://issues.apache.org/jira/browse/OAK-490 Project: Jackrabbit Oak Issue Type: Improvement Reporter: angela Assignee: angela currently testing for a given node/tree is of a particular node type is hardcoded in NodeImpl... moving that to the EffectiveNodeTypeManager would allow to use the same functionality also throughout oak-core where there are still some todos left with unsufficient implementation. -- 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
[jira] [Created] (OAK-491) NodeType#isNodeType: wrong comparision of jcr names
angela created OAK-491: -- Summary: NodeType#isNodeType: wrong comparision of jcr names Key: OAK-491 URL: https://issues.apache.org/jira/browse/OAK-491 Project: Jackrabbit Oak Issue Type: Bug Components: core Reporter: angela the current implementation of NodeType#isNodeType uses equals to compare the jcr name of the node type to the jcr name passed to the method... but the latter might be in the expanded form - comparision with equals doesn't work. suggested fix: compare oak names. -- 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
[jira] [Created] (OAK-492) InitialContent: missing jcr primary type with oak:index node
angela created OAK-492: -- Summary: InitialContent: missing jcr primary type with oak:index node Key: OAK-492 URL: https://issues.apache.org/jira/browse/OAK-492 Project: Jackrabbit Oak Issue Type: Bug Components: core Reporter: angela Priority: Minor -- 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
[jira] [Resolved] (OAK-491) NodeType#isNodeType: wrong comparision of jcr names
[ https://issues.apache.org/jira/browse/OAK-491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela resolved OAK-491. Resolution: Fixed NodeType#isNodeType: wrong comparision of jcr names --- Key: OAK-491 URL: https://issues.apache.org/jira/browse/OAK-491 Project: Jackrabbit Oak Issue Type: Bug Components: core Reporter: angela the current implementation of NodeType#isNodeType uses equals to compare the jcr name of the node type to the jcr name passed to the method... but the latter might be in the expanded form - comparision with equals doesn't work. suggested fix: compare oak names. -- 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
[jira] [Resolved] (OAK-490) Add EffectiveNodeTypeManager#isNodeType
[ https://issues.apache.org/jira/browse/OAK-490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela resolved OAK-490. Resolution: Fixed Add EffectiveNodeTypeManager#isNodeType --- Key: OAK-490 URL: https://issues.apache.org/jira/browse/OAK-490 Project: Jackrabbit Oak Issue Type: Improvement Reporter: angela Assignee: angela currently testing for a given node/tree is of a particular node type is hardcoded in NodeImpl... moving that to the EffectiveNodeTypeManager would allow to use the same functionality also throughout oak-core where there are still some todos left with unsufficient implementation. -- 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
[jira] [Resolved] (OAK-492) InitialContent: missing jcr primary type with oak:index node
[ https://issues.apache.org/jira/browse/OAK-492?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela resolved OAK-492. Resolution: Fixed InitialContent: missing jcr primary type with oak:index node Key: OAK-492 URL: https://issues.apache.org/jira/browse/OAK-492 Project: Jackrabbit Oak Issue Type: Bug Components: core Reporter: angela Priority: Minor -- 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
[jira] [Created] (OAK-494) Cleanup ReadOnlyNodeTypeManager
angela created OAK-494: -- Summary: Cleanup ReadOnlyNodeTypeManager Key: OAK-494 URL: https://issues.apache.org/jira/browse/OAK-494 Project: Jackrabbit Oak Issue Type: Improvement Reporter: angela Assignee: angela while looking at different issues i found that we have some inconsistencies and issues with the usage of jcr vs oak name in the node type plugin. -- 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
[jira] [Created] (OAK-495) Run TCK with local namespace remapping
angela created OAK-495: -- Summary: Run TCK with local namespace remapping Key: OAK-495 URL: https://issues.apache.org/jira/browse/OAK-495 Project: Jackrabbit Oak Issue Type: Task Reporter: angela jukka suggested that we run the TCK with session local namespace remappings in order to be able to detect more issues we might have with usage of oak vs jcr names. +1 from my side. -- 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
[jira] [Commented] (OAK-493) Drop fallback in Node#getPrimaryType
[ https://issues.apache.org/jira/browse/OAK-493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13510474#comment-13510474 ] angela commented on OAK-493: ok... while looking at it i actually found that there is a copy of that shortcut in the node type manager... i will take care of that as well. btw, the jcr:primaryType property is defined to be mandatory by nt:base. so, having the check for mandatory items enable in the type validator renders that fallback pretty useless anyway. Drop fallback in Node#getPrimaryType Key: OAK-493 URL: https://issues.apache.org/jira/browse/OAK-493 Project: Jackrabbit Oak Issue Type: Improvement Reporter: angela currently the implementation of NodeImpl#getPrimaryType has a fallback if the primary type property is missing (to nt:unstructured). while that might have been useful in the beginning when be basically didn't have anything running, i am not convinced that this is really a reasonable setup for a mature implementation... the regression i was referring to in OAK-490 wasn't caused by the move itself but by the fact that i didn't (nor intend to) copy over that shortcut to the node type manager. -- 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
[jira] [Assigned] (OAK-493) Drop fallback in Node#getPrimaryType
[ https://issues.apache.org/jira/browse/OAK-493?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela reassigned OAK-493: -- Assignee: angela Drop fallback in Node#getPrimaryType Key: OAK-493 URL: https://issues.apache.org/jira/browse/OAK-493 Project: Jackrabbit Oak Issue Type: Improvement Reporter: angela Assignee: angela currently the implementation of NodeImpl#getPrimaryType has a fallback if the primary type property is missing (to nt:unstructured). while that might have been useful in the beginning when be basically didn't have anything running, i am not convinced that this is really a reasonable setup for a mature implementation... the regression i was referring to in OAK-490 wasn't caused by the move itself but by the fact that i didn't (nor intend to) copy over that shortcut to the node type manager. -- 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
[jira] [Resolved] (OAK-493) Drop fallback in Node#getPrimaryType
[ https://issues.apache.org/jira/browse/OAK-493?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela resolved OAK-493. Resolution: Fixed Drop fallback in Node#getPrimaryType Key: OAK-493 URL: https://issues.apache.org/jira/browse/OAK-493 Project: Jackrabbit Oak Issue Type: Improvement Reporter: angela Assignee: angela currently the implementation of NodeImpl#getPrimaryType has a fallback if the primary type property is missing (to nt:unstructured). while that might have been useful in the beginning when be basically didn't have anything running, i am not convinced that this is really a reasonable setup for a mature implementation... the regression i was referring to in OAK-490 wasn't caused by the move itself but by the fact that i didn't (nor intend to) copy over that shortcut to the node type manager. -- 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
[jira] [Reopened] (OAK-426) OAK-API: Deal with names and relativePaths consisting/containing . and ..
[ https://issues.apache.org/jira/browse/OAK-426?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela reopened OAK-426: the commit that was marked to fix that issue was vetoed as it apparently was not complete and therefore required tests to be commented out. that is different from rejecting the proposal, which was not the case. OAK-API: Deal with names and relativePaths consisting/containing . and .. - Key: OAK-426 URL: https://issues.apache.org/jira/browse/OAK-426 Project: Jackrabbit Oak Issue Type: New Feature Components: core Reporter: angela Fix For: 0.6 i just run into another place where i would need to work around missing support for the current (.) and parent (..) element in the TreeLocation. IMO it would make sense to add this to TreeLocation#getChild... maybe even rename it to TreeLocation#getLocation(String relativePath)? -- 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
[jira] [Created] (OAK-510) Multivalued properties with array size 0 forget their type
angela created OAK-510: -- Summary: Multivalued properties with array size 0 forget their type Key: OAK-510 URL: https://issues.apache.org/jira/browse/OAK-510 Project: Jackrabbit Oak Issue Type: Bug Components: core, jcr Reporter: angela thought i remember that i have seen a related TODO or issue before, i couldn't find it any more... sorry for that. while cleaning up the node type code i found that one FIXME in the ReadOnlyNodeTypeManager related to definition generation was only needed because the TypeValidator failed upon validation of an empty jcr:supertypes definition. not storing the super types if none has be declared solved the problem for the time being. however, it seems to me that the underlying problem is in a completely different area: namely that mv properties with an empty value array forget their type. this can be verified with the following test: {code} @Test public void addEmptyMultiValueName() throws RepositoryException { Node parentNode = getNode(TEST_PATH); Value[] values = new Value[0]; parentNode.setProperty(multi name, values); parentNode.getSession().save(); Session session2 = createAnonymousSession(); try { Property property = session2.getProperty(TEST_PATH + /multi name); assertTrue(property.isMultiple()); assertEquals(PropertyType.NAME, property.getType()); Value[] values2 = property.getValues(); assertEquals(values.length, values2.length); assertEquals(values[0], values2[0]); assertEquals(values[1], values2[1]); } finally { session2.logout(); } } {code} -- 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
[jira] [Commented] (OAK-516) Create LdapLoginModule based on ExternalLoginModule
[ https://issues.apache.org/jira/browse/OAK-516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13531285#comment-13531285 ] angela commented on OAK-516: assigning to me for applying expected patch.. (actually should be assigned to manfred as he is working on the issue... but that didn't work). Create LdapLoginModule based on ExternalLoginModule --- Key: OAK-516 URL: https://issues.apache.org/jira/browse/OAK-516 Project: Jackrabbit Oak Issue Type: New Feature Components: core Reporter: Manfred Baedke Assignee: angela Priority: Minor An LdapLoginModule is a natural candidate for a proof of concept of the ExternalLoginModule framework. -- 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
[jira] [Commented] (OAK-497) No LoginModules configured error on Java 7
[ https://issues.apache.org/jira/browse/OAK-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13532312#comment-13532312 ] angela commented on OAK-497: Once we address the OAK-17 TODO in OakConfiguration and get rid of that class there will be no need for the extra logic to detect whether a JAAS configuration is present or not. right... for the time being i just added a commented to the code explaining why it does the extra check for the missing config. No LoginModules configured error on Java 7 -- Key: OAK-497 URL: https://issues.apache.org/jira/browse/OAK-497 Project: Jackrabbit Oak Issue Type: Bug Components: core Environment: java version 1.7.0_04 Java(TM) SE Runtime Environment (build 1.7.0_04-b20) Java HotSpot(TM) 64-Bit Server VM (build 23.0-b21, mixed mode) Reporter: Jukka Zitting Assignee: Jukka Zitting Fix For: 0.6 The AuthenticationConfigurationImpl uses Configuration.getConfiguration() to get JAAS configuration when available, and falls back to the default OakConfiguration when not. That fallback is currently triggered by a SecurityException thrown from getConfiguration(), which seems to *not* happen on Java 7 where instead just an empty Configuration is returned. A better approach might be to check if the returned configuration (if any) contains entries for the specified appName, and to fall back to default configuration if not. -- 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
[jira] [Resolved] (OAK-494) Cleanup ReadOnlyNodeTypeManager
[ https://issues.apache.org/jira/browse/OAK-494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela resolved OAK-494. Resolution: Fixed hopefully found and fixed all bogus name comparison (jcr-jcr, jcr-oak, oak-jcr)... the additional interfaces implemented by ReadOnlyNodeTypeManager has been adjusted to explicitly state if oak or jcr name is expected. there one minor oddity left in ReadWriteNodeTypeManager#registerNodeTypes(Reader cnd) where the template name is compared against NT_BASE and - in case of empty super types - NT_BASE is added as declared super type... i wasn't totally sure if that one really needs a fix. Cleanup ReadOnlyNodeTypeManager --- Key: OAK-494 URL: https://issues.apache.org/jira/browse/OAK-494 Project: Jackrabbit Oak Issue Type: Improvement Reporter: angela Assignee: angela while looking at different issues i found that we have some inconsistencies and issues with the usage of jcr vs oak name in the node type plugin. -- 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
[jira] [Commented] (OAK-516) Create LdapLoginModule based on ExternalLoginModule
[ https://issues.apache.org/jira/browse/OAK-516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13532344#comment-13532344 ] angela commented on OAK-516: well... we probably could if it was just about authenticating against LDAP. but the main goal here is to have login module that synchronizes ldap accounts into the repository in order to limit the number of interactions needed with LDAP. Create LdapLoginModule based on ExternalLoginModule --- Key: OAK-516 URL: https://issues.apache.org/jira/browse/OAK-516 Project: Jackrabbit Oak Issue Type: New Feature Components: core Reporter: Manfred Baedke Assignee: angela Priority: Minor Attachments: LdapLoginModule.patch An LdapLoginModule is a natural candidate for a proof of concept of the ExternalLoginModule framework. -- 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
[jira] [Commented] (OAK-521) Configurable AuthorizableAction(s)
[ https://issues.apache.org/jira/browse/OAK-521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13532355#comment-13532355 ] angela commented on OAK-521: see also TODO comments in the current user configuration and in DefaultAuthorizableActionProvider Configurable AuthorizableAction(s) -- Key: OAK-521 URL: https://issues.apache.org/jira/browse/OAK-521 Project: Jackrabbit Oak Issue Type: Sub-task Components: core, jcr Reporter: angela subtask to address a remaining TODO with respect to configuration of authorizable actions such that it's extensible and pluggable. -- 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
[jira] [Created] (OAK-521) Configurable AuthorizableAction(s)
angela created OAK-521: -- Summary: Configurable AuthorizableAction(s) Key: OAK-521 URL: https://issues.apache.org/jira/browse/OAK-521 Project: Jackrabbit Oak Issue Type: Sub-task Reporter: angela subtask to address a remaining TODO with respect to configuration of authorizable actions such that it's extensible and pluggable. -- 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
[jira] [Created] (OAK-522) Pluggable User Management
angela created OAK-522: -- Summary: Pluggable User Management Key: OAK-522 URL: https://issues.apache.org/jira/browse/OAK-522 Project: Jackrabbit Oak Issue Type: Sub-task Reporter: angela in contrast to built in functionality like nt-mgt and privilege mgt the user management implementation needs to be configurable. in addition to ordinary repo configuration as we used to have in jr2 the oak user mgt configuration should be pluggable at runtime using osci. -- 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
[jira] [Created] (OAK-523) AuthorizableImpl: add propery equals/hashCode implementation
angela created OAK-523: -- Summary: AuthorizableImpl: add propery equals/hashCode implementation Key: OAK-523 URL: https://issues.apache.org/jira/browse/OAK-523 Project: Jackrabbit Oak Issue Type: Sub-task Reporter: angela remaining TODO in AuthorizableImpl -- 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
[jira] [Created] (OAK-525) Pluggable Principal Management
angela created OAK-525: -- Summary: Pluggable Principal Management Key: OAK-525 URL: https://issues.apache.org/jira/browse/OAK-525 Project: Jackrabbit Oak Issue Type: Sub-task Reporter: angela principal management implementation needs to be configurable. in addition to ordinary repo configuration as we used to have in jr2 the oak principal mgt configuration should be pluggable at runtime using osci. -- 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
[jira] [Created] (OAK-526) Implement AC-Postprocessing in AccessControlHook
angela created OAK-526: -- Summary: Implement AC-Postprocessing in AccessControlHook Key: OAK-526 URL: https://issues.apache.org/jira/browse/OAK-526 Project: Jackrabbit Oak Issue Type: Sub-task Components: core Reporter: angela Assignee: angela in order not to search for effective access control content upon permission evaluation, any changes to access control content should lead to an update of the persisted compiled permissions for each principal that are planned to be stored in a separate structure underneath jcr:system/rep:permissions/workspaceName. the (empty) commit hook can be found at org.apache.jackrabbit.oak.security.authorization.AccessControlHook which is already pushed to the list of commit hooks upon repo-setup. -- 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
[jira] [Created] (OAK-527) Implement Permission evaluation
angela created OAK-527: -- Summary: Implement Permission evaluation Key: OAK-527 URL: https://issues.apache.org/jira/browse/OAK-527 Project: Jackrabbit Oak Issue Type: Sub-task Reporter: angela Assignee: angela this subtasks goes along with OAK-526: for efficient permission evaluation the compiledpermission implementation should not attempt to collect the relevant ac-content such as looked at and written by the jcr ac-mgt implementation. instead it should make use of the persisted effective permission for the dedicated set of principals that forms the subject of a given contentsession. tbd: - privileged access to the effective permission store (independent of the content sessions permission) - ability to read all required information from the target tree/property that is passed to the hasPermission/canRead call. - efficient handling of pluggable restrictions - special handling for access control content an items residing inside the version store. -- 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
[jira] [Created] (OAK-528) Support configurable/pluggable restrictions
angela created OAK-528: -- Summary: Support configurable/pluggable restrictions Key: OAK-528 URL: https://issues.apache.org/jira/browse/OAK-528 Project: Jackrabbit Oak Issue Type: Sub-task Components: core Reporter: angela apart from the built-in restrictions (rep:glob, possible a regexp matching, possible nt-matching) it would be desirable to allow for easy deployment of additional restrictions. in a first step i added a RestrictionProvider interface to the spi authorization package that is intended to be used both for JCR ac-editing as well as for the ac-evaluation inside oak-core. -- 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
[jira] [Assigned] (OAK-444) Authorization for the jcr version store
[ https://issues.apache.org/jira/browse/OAK-444?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela reassigned OAK-444: -- Assignee: angela Authorization for the jcr version store --- Key: OAK-444 URL: https://issues.apache.org/jira/browse/OAK-444 Project: Jackrabbit Oak Issue Type: Sub-task Components: core Reporter: angela Assignee: angela as explained in JCR-2963 the version store needs special attention when it comes to access control and permissions enforced on the store. for oak we need to define mechanisms on how to control access to the version store and provide the possibility to limit access to individual parts of the version store. some possibilities are already listed in JCR-2963. additional topics include: - searching for versioned content - find and restore versions that have no corresponding versionable node in the content tree - ability to prevent access to version store altogether without preventing access to versions/version histories through JCR version operations -- 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
[jira] [Commented] (OAK-124) Default to nt:unstructured for nodes where jcr:primaryType is not set
[ https://issues.apache.org/jira/browse/OAK-124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13532433#comment-13532433 ] angela commented on OAK-124: IMO we should resolve this wontfix Default to nt:unstructured for nodes where jcr:primaryType is not set - Key: OAK-124 URL: https://issues.apache.org/jira/browse/OAK-124 Project: Jackrabbit Oak Issue Type: Improvement Components: core, jcr Environment: We should default to nt:unstructured if jcr:primaryType is not set, and on node creation not set jcr:primaryType if it is nt:unstructured. Reporter: Michael Dürig -- 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
[jira] [Resolved] (OAK-502) User.getPropertyNames throws StringIndexOutOfBoundsException
[ https://issues.apache.org/jira/browse/OAK-502?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela resolved OAK-502. Resolution: Fixed rev. 1421980 User.getPropertyNames throws StringIndexOutOfBoundsException Key: OAK-502 URL: https://issues.apache.org/jira/browse/OAK-502 Project: Jackrabbit Oak Issue Type: Bug Components: core Reporter: Michael Dürig This goes unnoted by other half-way test cases like {{testGetPropertyNamesByInvalidRelPath}}, which catch an overly broad range of exceptions. PS: https://issues.apache.org/jira/browse/OAK-189?focusedCommentId=13527880page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13527880 -- 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
[jira] [Created] (OAK-541) Pluggable AccessControl
angela created OAK-541: -- Summary: Pluggable AccessControl Key: OAK-541 URL: https://issues.apache.org/jira/browse/OAK-541 Project: Jackrabbit Oak Issue Type: Sub-task Components: core Reporter: angela -- 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
[jira] [Commented] (OAK-480) Authorizable Query
[ https://issues.apache.org/jira/browse/OAK-480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13546783#comment-13546783 ] angela commented on OAK-480: fixed some bugs in the UserQueryManager at revision: 1430204. the remaining commented query tests are currently failing due to OAK-343... leaving this issue open until the remaining tests can be verified. Authorizable Query -- Key: OAK-480 URL: https://issues.apache.org/jira/browse/OAK-480 Project: Jackrabbit Oak Issue Type: Sub-task Components: core, jcr Reporter: angela most authorizable queries are still failing. this subtask is a reminder for that particular topic within the user-mgt implementation. - test if query code is correct and produces equivalent queries as in jackrabbit 2.x - test if query itself works in a backwards compatible manner. - finally excluded user-query tests should be removed from the known issues list. -- 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
[jira] [Created] (OAK-549) PropertyLocation#remove not part of TreeLocation API
angela created OAK-549: -- Summary: PropertyLocation#remove not part of TreeLocation API Key: OAK-549 URL: https://issues.apache.org/jira/browse/OAK-549 Project: Jackrabbit Oak Issue Type: Bug Components: core Reporter: angela In order to remove a property without having to access the parent node can be achieved by PropertyLocation#remove(). however, this method is not part of the TreeLocation API and thus oak-jcr needs to cast the location associated with a given property to TreeImpl#PropertyLocation. I would suggest to expose that method in the TreeLocation interface as the implementation was straight forward for all implementations. Alternatively, if that's not acceptable i think we should split the TreeLocation interface into a property and a node variant and add the remove method the property-location only. -- 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
[jira] [Created] (OAK-550) PropertyLocation#remove always returns true
angela created OAK-550: -- Summary: PropertyLocation#remove always returns true Key: OAK-550 URL: https://issues.apache.org/jira/browse/OAK-550 Project: Jackrabbit Oak Issue Type: Bug Components: core Reporter: angela Priority: Minor according to the javadoc (and now to the API definition) the remove method should only return true if the underlying property has been removed. -- 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
[jira] [Resolved] (OAK-549) PropertyLocation#remove not part of TreeLocation API
[ https://issues.apache.org/jira/browse/OAK-549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela resolved OAK-549. Resolution: Fixed fixed at revision: 1431499 PropertyLocation#remove not part of TreeLocation API Key: OAK-549 URL: https://issues.apache.org/jira/browse/OAK-549 Project: Jackrabbit Oak Issue Type: Bug Components: core Reporter: angela Attachments: OAK-549.patch In order to remove a property without having to access the parent node can be achieved by PropertyLocation#remove(). however, this method is not part of the TreeLocation API and thus oak-jcr needs to cast the location associated with a given property to TreeImpl#PropertyLocation. I would suggest to expose that method in the TreeLocation interface as the implementation was straight forward for all implementations. Alternatively, if that's not acceptable i think we should split the TreeLocation interface into a property and a node variant and add the remove method the property-location only. -- 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
[jira] [Resolved] (OAK-524) Implement PrincipalManager#getPrincipals(int searchType)
[ https://issues.apache.org/jira/browse/OAK-524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela resolved OAK-524. Resolution: Fixed Implement PrincipalManager#getPrincipals(int searchType) - Key: OAK-524 URL: https://issues.apache.org/jira/browse/OAK-524 Project: Jackrabbit Oak Issue Type: Sub-task Components: core, jcr Reporter: angela -- 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
[jira] [Commented] (OAK-554) PropertyStates#createProperty ignores namespace mappings when creating states of type NAME and PATH
[ https://issues.apache.org/jira/browse/OAK-554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13554956#comment-13554956 ] angela commented on OAK-554: agreed... this would be my preferred so solution as well. in particular as i don't remember a use-case for custom value implementations... if we can handle them smoothly (for example someone using the value impls from jcr-commons) it's nice but i am perfectly fine throwing for the name/path variants as people should really use the valuefactory obtained from the session to build value objects. PropertyStates#createProperty ignores namespace mappings when creating states of type NAME and PATH --- Key: OAK-554 URL: https://issues.apache.org/jira/browse/OAK-554 Project: Jackrabbit Oak Issue Type: Bug Components: core Reporter: angela as far as i saw we use PropertyStates#createProperty to create and set an OAK property from a given JCR value or a list of JCR values. this works well for all types of values except for NAME, PATH which may contain values with remapped namespaces which will not be converted back to oak-values during the state creation: {code} ListString vals = Lists.newArrayList(); for (Value value : values) { vals.add(value.getString()); } return new MultiGenericPropertyState(name, vals, Type.fromTag(type, true)); {code} if am not mistaken {code}value.getString(){code} will return the JCR representation of the value instead of the oak representation as it would be needed here. possible solutions include: - passing namepathmapper to the create method - only accept oak Value implementation that allows to retrieve the internal representation, which is present in the ValueImpl afaik. -- 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
[jira] [Commented] (OAK-553) Add NameMapper#getValidOakName that never returns null
[ https://issues.apache.org/jira/browse/OAK-553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13555022#comment-13555022 ] angela commented on OAK-553: in the security code that is located in oak-core i don't have access to the SessionDelegate#getOakNameOrThrow and in most cases the API actually defines that a RepositoryException is thrown if there is something wrong with the path/name passed to the method call. That's why i was not proposing a runtime exception. regarding NameMapper or Utility: i definitely prefer adding it to the NameMapper which i consider to be some sort of utility already. apart from that i like thomas' idea of renaming getOakName to getOakNameOrNull. but we should probably do that in a separate step in case we agree that this is useful. i will create a patch today for the first step later today. Add NameMapper#getValidOakName that never returns null -- Key: OAK-553 URL: https://issues.apache.org/jira/browse/OAK-553 Project: Jackrabbit Oak Issue Type: Improvement Components: core Reporter: angela we keep adding methods that convert a jcrName into an oak-name and throw an exception if the value returned by NameMapper#getOakName is null. instead of duplicating code i would like to add a second flavor of the method that throws if the the jcrName cannot be resolved to an oak name. i even suspect that most usages of the getOakName call that don't throw in case of null-value are susceptible to NPE. but we can still review those and possible replace them with the save method call. proposed patch for the interface: {code} /** * Returns the Oak name for the specified JCR name. In contrast to * {@link #getOakName(String)} this method will throw a {@code NamespaceException} * if the JCR name is invalid and cannot be resolved. * * @param jcrName The JCR name to be converted. * @return A valid Oak name. * @throws NamespaceException If the JCR name cannot be resolved. */ @Nonnull String getValidOakName(@Nonnull String jcrName) throws NamespaceException; {code} -- 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
[jira] [Commented] (OAK-553) Add NameMapper#getValidOakName that never returns null
[ https://issues.apache.org/jira/browse/OAK-553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13555066#comment-13555066 ] angela commented on OAK-553: regarding NameMapper.normalizeJcrName(name): i would prefer to refactor the classes in the node type package such that they keep oak-names internally and convert them to jcr-names on demand. Add NameMapper#getValidOakName that never returns null -- Key: OAK-553 URL: https://issues.apache.org/jira/browse/OAK-553 Project: Jackrabbit Oak Issue Type: Improvement Components: core Reporter: angela we keep adding methods that convert a jcrName into an oak-name and throw an exception if the value returned by NameMapper#getOakName is null. instead of duplicating code i would like to add a second flavor of the method that throws if the the jcrName cannot be resolved to an oak name. i even suspect that most usages of the getOakName call that don't throw in case of null-value are susceptible to NPE. but we can still review those and possible replace them with the save method call. proposed patch for the interface: {code} /** * Returns the Oak name for the specified JCR name. In contrast to * {@link #getOakName(String)} this method will throw a {@code NamespaceException} * if the JCR name is invalid and cannot be resolved. * * @param jcrName The JCR name to be converted. * @return A valid Oak name. * @throws NamespaceException If the JCR name cannot be resolved. */ @Nonnull String getValidOakName(@Nonnull String jcrName) throws NamespaceException; {code} -- 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
[jira] [Updated] (OAK-553) Add NameMapper#getValidOakName that never returns null
[ https://issues.apache.org/jira/browse/OAK-553?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-553: --- Attachment: OAK-553.patch proposed patch: - renaming getOakName to getOakNameOrNull (IMO it's much clearer now where calls of that method are suspicious) - adding getOakName that throws Repository if the jcrName cannot be resolved the following topics are not (yet) addressed: - tests for the new method - possibly renaming NodeUtil#getOakName - streamlining/fixing the doubled conversion in the nt-package Add NameMapper#getValidOakName that never returns null -- Key: OAK-553 URL: https://issues.apache.org/jira/browse/OAK-553 Project: Jackrabbit Oak Issue Type: Improvement Components: core Reporter: angela Attachments: OAK-553.patch we keep adding methods that convert a jcrName into an oak-name and throw an exception if the value returned by NameMapper#getOakName is null. instead of duplicating code i would like to add a second flavor of the method that throws if the the jcrName cannot be resolved to an oak name. i even suspect that most usages of the getOakName call that don't throw in case of null-value are susceptible to NPE. but we can still review those and possible replace them with the save method call. proposed patch for the interface: {code} /** * Returns the Oak name for the specified JCR name. In contrast to * {@link #getOakName(String)} this method will throw a {@code NamespaceException} * if the JCR name is invalid and cannot be resolved. * * @param jcrName The JCR name to be converted. * @return A valid Oak name. * @throws NamespaceException If the JCR name cannot be resolved. */ @Nonnull String getValidOakName(@Nonnull String jcrName) throws NamespaceException; {code} -- 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
[jira] [Comment Edited] (OAK-553) Add NameMapper#getValidOakName that never returns null
[ https://issues.apache.org/jira/browse/OAK-553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13555102#comment-13555102 ] angela edited comment on OAK-553 at 1/16/13 3:16 PM: - proposed patch: - renaming getOakName to getOakNameOrNull (IMO it's much clearer now where calls of that method are suspicious) - adding getOakName that throws Repository if the jcrName cannot be resolved - using the new getOakName where the check for null + repo-exception was used or where throwing the exception was missing (bug). the following topics are not (yet) addressed: - tests for the new method - possibly renaming NodeUtil#getOakName - streamlining/fixing the doubled conversion in the nt-package was (Author: anchela): proposed patch: - renaming getOakName to getOakNameOrNull (IMO it's much clearer now where calls of that method are suspicious) - adding getOakName that throws Repository if the jcrName cannot be resolved the following topics are not (yet) addressed: - tests for the new method - possibly renaming NodeUtil#getOakName - streamlining/fixing the doubled conversion in the nt-package Add NameMapper#getValidOakName that never returns null -- Key: OAK-553 URL: https://issues.apache.org/jira/browse/OAK-553 Project: Jackrabbit Oak Issue Type: Improvement Components: core Reporter: angela Attachments: OAK-553.patch we keep adding methods that convert a jcrName into an oak-name and throw an exception if the value returned by NameMapper#getOakName is null. instead of duplicating code i would like to add a second flavor of the method that throws if the the jcrName cannot be resolved to an oak name. i even suspect that most usages of the getOakName call that don't throw in case of null-value are susceptible to NPE. but we can still review those and possible replace them with the save method call. proposed patch for the interface: {code} /** * Returns the Oak name for the specified JCR name. In contrast to * {@link #getOakName(String)} this method will throw a {@code NamespaceException} * if the JCR name is invalid and cannot be resolved. * * @param jcrName The JCR name to be converted. * @return A valid Oak name. * @throws NamespaceException If the JCR name cannot be resolved. */ @Nonnull String getValidOakName(@Nonnull String jcrName) throws NamespaceException; {code} -- 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
[jira] [Resolved] (OAK-553) Add NameMapper#getOakName that never returns null
[ https://issues.apache.org/jira/browse/OAK-553?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela resolved OAK-553. Resolution: Fixed resolving this issue fixed. please create new improvement issues for the related discussions started in this thread. Add NameMapper#getOakName that never returns null - Key: OAK-553 URL: https://issues.apache.org/jira/browse/OAK-553 Project: Jackrabbit Oak Issue Type: Improvement Components: core Reporter: angela Attachments: OAK-553.patch, OAK-553_test.patch we keep adding methods that convert a jcrName into an oak-name and throw an exception if the value returned by NameMapper#getOakName is null. instead of duplicating code i would like to add a second flavor of the method that throws if the the jcrName cannot be resolved to an oak name. i even suspect that most usages of the getOakName call that don't throw in case of null-value are susceptible to NPE. but we can still review those and possible replace them with the save method call. proposed patch for the interface: {code} /** * Returns the Oak name for the specified JCR name. In contrast to * {@link #getOakName(String)} this method will throw a {@code NamespaceException} * if the JCR name is invalid and cannot be resolved. * * @param jcrName The JCR name to be converted. * @return A valid Oak name. * @throws NamespaceException If the JCR name cannot be resolved. */ @Nonnull String getValidOakName(@Nonnull String jcrName) throws NamespaceException; {code} -- 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
[jira] [Created] (OAK-561) Remove duplicate code in *DefinitionTemplateImpl
angela created OAK-561: -- Summary: Remove duplicate code in *DefinitionTemplateImpl Key: OAK-561 URL: https://issues.apache.org/jira/browse/OAK-561 Project: Jackrabbit Oak Issue Type: Improvement Reporter: angela there is quite some code duplication in PropertyDefinitionTemplateImpl and NodeDefinitionTemplateImpl due to the fact that they don't share a common ItemDefinitionTemplate. this is currently not possible since both classes extend from the corresponding Abstract*DefinitionBuilder. IMO this should be improved and i have the impression that overall readability of the code would benefit from this as well. -- 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
[jira] [Updated] (OAK-561) Remove duplicate code in *DefinitionTemplateImpl
[ https://issues.apache.org/jira/browse/OAK-561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-561: --- Component/s: core Remove duplicate code in *DefinitionTemplateImpl Key: OAK-561 URL: https://issues.apache.org/jira/browse/OAK-561 Project: Jackrabbit Oak Issue Type: Improvement Components: core Reporter: angela there is quite some code duplication in PropertyDefinitionTemplateImpl and NodeDefinitionTemplateImpl due to the fact that they don't share a common ItemDefinitionTemplate. this is currently not possible since both classes extend from the corresponding Abstract*DefinitionBuilder. IMO this should be improved and i have the impression that overall readability of the code would benefit from this as well. -- 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