[
https://issues.apache.org/jira/browse/CMIS-252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12914079#action_12914079
]
Stephan Klevenz commented on CMIS-252:
--------------------------------------
The use case is on the server side. I'm having an utility method to create CMIS
standard property instances:
a) public static <T> PropertyData<T> create(String pid, T value) { ... }
b) public static <T> PropertyData<T> create(PropertyId pid, T value) { ...
}
In a) I have to use string compare and it is not type save to create typed
property instances. With an Enum class it would be easier just implementing a
switch construct.
I see your point with cluttering code on client level. Let's keep it as it is
and I well see if there are more use cases. An additional enum could then be
also an option.
Stephan
> PropertyIds as Enum
> -------------------
>
> Key: CMIS-252
> URL: https://issues.apache.org/jira/browse/CMIS-252
> Project: Chemistry
> Issue Type: Wish
> Components: opencmis-commons
> Affects Versions: 0.2.0-incubating
> Reporter: Stephan Klevenz
> Priority: Minor
> Fix For: 0.2.0-incubating
>
>
> org.apache.chemistry.opencmis.commons.PropertyIds
> Is there a specific reason to use static const values in the interface
> mentioned? I would like to propose changing this into an enum class. Are
> there any objectives?
> Regards,
> Stephan
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.