You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Michael Dürig (JIRA)" <ji...@apache.org> on 2011/06/23 12:18:47 UTC

[jira] [Commented] (CMIS-395) Misleading method signatures - parameter names : repositoryId / workspaceId

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

Michael Dürig commented on CMIS-395:
------------------------------------

IIUC the issue is about the naming of the parameters. You would like to rename the parameter 'repositoryId' to 'workspaceId' in the login method of JcrService!?

Otherwise the behavior is as intended: the CMIS repositoryId is mapped to the workspace name in JCR.

> Misleading method signatures - parameter names : repositoryId / workspaceId
> ---------------------------------------------------------------------------
>
>                 Key: CMIS-395
>                 URL: https://issues.apache.org/jira/browse/CMIS-395
>             Project: Chemistry
>          Issue Type: Improvement
>          Components: opencmis-server-jcr
>    Affects Versions: OpenCMIS 0.3.0
>            Reporter: Joseph Vychtrle
>            Priority: Minor
>             Fix For: OpenCMIS 0.4.0
>
>
> Hey, I'm using openCMIS only with JCR repositories (jackrabbit / modeshape). The client bindings codebase uses repositoryId in its method signatures, as well as chemistry-opencmis-server-jcr ...
> The problem is, that it is actually workspaceId, not repositoryId. RepositoryId is taken from client parameters in JcrServiceFactory when it acquires JcrRepository :
> {code:title=JcrServiceFactory.java|borderStyle=solid}
>     private TypeManager typeManager;
>     private Map<String, String> jcrConfig;
>     private String mountPath;
>     private JcrRepository jcrRepository;
>     @Override
>     public void init(Map<String, String> parameters) {
>         typeManager = new TypeManager();
>         readConfiguration(parameters);
>         jcrRepository = new JcrRepository(acquireJcrRepository(jcrConfig), mountPath, typeManager);
>     }
> {code}
> but then it works with workspaceId;
> {code}
> JcrRepository.login(Credentials credentials, String repositoryId);  //should be workspaceId
> JcrService.login(String repositoryId); //should be workspaceId
> {code}
> {code:title=JcrService.java|borderStyle=solid}
> @Override
> public String createDocument(String repositoryId, Properties properties, String folderId,
>         ContentStream contentStream, VersioningState versioningState, List<String> policies, Acl addAces,
>         Acl removeAces, ExtensionsData extension) {
>         
>     //should be workspaceId
>     return jcrRepository.createDocument(login(repositoryId), properties, folderId, contentStream, versioningState);
>     }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira