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/07 14:49:34 UTC

[jira] Resolved: (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 resolved CMIS-242.
------------------------------------

    Resolution: Fixed

Done.
http://svn.apache.org/viewvc?rev=1005432&view=rev

> 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.