[jira] [Commented] (SLING-3213) Resource hasChildren Convenience Method
[ https://issues.apache.org/jira/browse/SLING-3213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13807759#comment-13807759 ] Carsten Ziegeler commented on SLING-3213: - I think the api.resource package version does not need to be updated in this case, as we already have changes in there which caused the version to be updated. A resource by itself can't tell if it has children - this needs to go through the resource resolver and providers. For example, if there is a node at /bin in the repository without any children, but a resource provider mounts resources at /bin/foo the jcr resource can't tell whether it has children. So if we want to have such a method, we should add it to the resource resolver (hasChildren(Resource)) make AbstractResource call this method. Resource hasChildren Convenience Method --- Key: SLING-3213 URL: https://issues.apache.org/jira/browse/SLING-3213 Project: Sling Issue Type: Improvement Components: API Affects Versions: API 2.4.2 Reporter: Dan Klco Assignee: Dan Klco Priority: Minor Labels: features, patch Attachments: has-children.diff Add a method to the Resource interface for checking if a resource has child resources. This could either invoke an underlying implementation's equivalent method or simply invoke listResources().hasNext() if the underlying implementation does not have an appropriate method. I also added an EL function since the function naming isn't JavaBean compliant. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (SLING-3213) Resource hasChildren Convenience Method
[ https://issues.apache.org/jira/browse/SLING-3213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13808052#comment-13808052 ] Justin Edelson commented on SLING-3213: --- [~cziegeler] thanks for the clarification about the package export. I missed that change. Resource hasChildren Convenience Method --- Key: SLING-3213 URL: https://issues.apache.org/jira/browse/SLING-3213 Project: Sling Issue Type: Improvement Components: API Affects Versions: API 2.4.2 Reporter: Dan Klco Assignee: Dan Klco Priority: Minor Labels: features, patch Attachments: has-children.diff Add a method to the Resource interface for checking if a resource has child resources. This could either invoke an underlying implementation's equivalent method or simply invoke listResources().hasNext() if the underlying implementation does not have an appropriate method. I also added an EL function since the function naming isn't JavaBean compliant. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (SLING-3213) Resource hasChildren Convenience Method
[ https://issues.apache.org/jira/browse/SLING-3213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13808444#comment-13808444 ] Carsten Ziegeler commented on SLING-3213: - Thanks for the updated patch, looks good to me Resource hasChildren Convenience Method --- Key: SLING-3213 URL: https://issues.apache.org/jira/browse/SLING-3213 Project: Sling Issue Type: Improvement Components: API Affects Versions: API 2.4.2 Reporter: Dan Klco Assignee: Dan Klco Priority: Minor Labels: features, patch Attachments: has-children.diff Add a method to the Resource interface for checking if a resource has child resources. This could either invoke an underlying implementation's equivalent method or simply invoke listResources().hasNext() if the underlying implementation does not have an appropriate method. I also added an EL function since the function naming isn't JavaBean compliant. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (SLING-3213) Resource hasChildren Convenience Method
[ https://issues.apache.org/jira/browse/SLING-3213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13807205#comment-13807205 ] Justin Edelson commented on SLING-3213: --- A few quick comments: * What about adding the implementation to AbstractResource? * Export package version needs to be bumped. * IIRC, our convention is that @since tags should point to the bundle release version, which would be an even number. * Inefficient perhaps, but could the EL function use listChildren().hasNext() so as to not necessarily require the new Resource API? Resource hasChildren Convenience Method --- Key: SLING-3213 URL: https://issues.apache.org/jira/browse/SLING-3213 Project: Sling Issue Type: Improvement Components: API Affects Versions: API 2.4.2 Reporter: Dan Klco Priority: Minor Labels: features, patch Attachments: has-children.diff Add a method to the Resource interface for checking if a resource has child resources. This could either invoke an underlying implementation's equivalent method or simply invoke listResources().hasNext() if the underlying implementation does not have an appropriate method. I also added an EL function since the function naming isn't JavaBean compliant. -- This message was sent by Atlassian JIRA (v6.1#6144)