[ 
https://issues.apache.org/jira/browse/CMIS-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918636#action_12918636
 ] 

Florian Müller commented on CMIS-242:
-------------------------------------

+1

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

Reply via email to