You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Florent Guillaume (JIRA)" <ji...@apache.org> on 2010/10/06 18:37:32 UTC
[jira] Reopened: (CMIS-242) API improvement for methods having long
parameter list
[ https://issues.apache.org/jira/browse/CMIS-242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Florent Guillaume reopened CMIS-242:
------------------------------------
I'd like to remove OperationContext from the short version of the APIs, as they are usually unneeded and always available in the long version. Anyone against this?
> API improvement for methods having long parameter list
> ------------------------------------------------------
>
> Key: CMIS-242
> URL: https://issues.apache.org/jira/browse/CMIS-242
> Project: Chemistry
> Issue Type: Improvement
> Components: opencmis-client
> Reporter: Stephan Klevenz
> Assignee: Stephan Klevenz
> Fix For: 0.2.0-incubating
>
>
> The parameter list of methods like
> Document createDocument(Map<String, ?> properties, ContentStream contentStream, VersioningState versioningState,
> List<Policy> policies, List<Ace> addAces, List<Ace> removeAces, OperationContext context);
> is very long and often many of the parameters will be set simply to null. API usability and code readability is not nice.
> I suggest to overload method for the 80% use case having a shorter parameter list. In this example it could be
> Document createDocument(Map<String, ?> properties, ContentStream contentStream);
> Rule of thumb could be to have at least one overloaded method where all parameters related to optional features are removed.
> WDYT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.