Uploaded image for project: 'Chemistry'
  1. Chemistry
  2. CMIS-395

Misleading method signatures - parameter names : repositoryId / workspaceId

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: OpenCMIS 0.3.0
    • Fix Version/s: OpenCMIS 0.4.0
    • Component/s: opencmis-server-jcr
    • Labels:
      None

      Description

      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 :

      JcrServiceFactory.java
          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);
          }
      

      but then it works with workspaceId;

      JcrRepository.login(Credentials credentials, String repositoryId);  //should be workspaceId
      JcrService.login(String repositoryId); //should be workspaceId
      
      JcrService.java
      @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);
          }
      

        Attachments

          Activity

            People

            • Assignee:
              mduerig Michael Dürig
              Reporter:
              vychtrle Joseph Vychtrle
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: