[
https://issues.apache.org/jira/browse/CMIS-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12731894#action_12731894
]
Ugo Cei commented on CMIS-40:
-----------------------------
Yes, as a client implementor I shouldn't have to deal with the SPI, right?
Besides, the SPI method returns a collection of ObjectEntry, and from what I
see in the APPCollection#query method, the correct way to transform an
ObjectEntry to a CMISObject is the following:
{code}
for (ObjectEntry e : res) {
objects.add(APPObject.construct((APPObjectEntry) e));
}
{code}
which doesn't work outside of that class because APPObject.construct is
protected.
As a client implementor, all I should have to do is:
{code}
Connection conn = ...;
Collection<CMISObject> res = conn.query(stmt, false, false, 10, 0,
hasMoreItems);
{code}
Unfortunately, I cannot just add such a method to the Connection interface
because APPConnection implements both Connection and SPI and we cannot have
another method with the same name, arguments and a different return type. So we
need to either change the method name or its arguments.
> query method with full parameters should be exposed as part of the Connection
> interface
> ---------------------------------------------------------------------------------------
>
> Key: CMIS-40
> URL: https://issues.apache.org/jira/browse/CMIS-40
> Project: Chemistry
> Issue Type: Improvement
> Components: atompub, client
> Reporter: Ugo Cei
>
> The following method of APPConnection:
> {code}
> public Collection<ObjectEntry> query(String statement,
> boolean searchAllVersions,
> boolean includeAllowableActions,
> boolean includeRelationships,
> int maxItems, int skipCount,
> boolean[] hasMoreItems)
> {code}
> is not declared for the Collection interface, therefore it's not possible to
> specify parameters for a query without downcasting to APPCollection.
> Also, the method should return a Collection<CMISObject> for conformance with
> the existing query method.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.