Package org.apache.chemistry.opencmis.commons.data

Examples of org.apache.chemistry.opencmis.commons.data.RepositoryInfo


          // from everywhere
          DummyCallContext ctx = new DummyCallContext();
          svc.setCallContext(ctx);

          // Build the tree
          RepositoryInfo rep = svc.getRepositoryInfo(repositoryId, null);
          String rootFolderId = rep.getRootFolderId();

          try {
              gen.createFolderHierachy(levels, childrenPerLevel, rootFolderId);
              // Dump the tree
              gen.dumpFolder(rootFolderId, "*");
 
View Full Code Here


     */
    private void createTestFolder() {
        System.out.println("Creating test folder...");

        // get root folder id
        RepositoryInfo ri = getBinding().getRepositoryService().getRepositoryInfo(fRepositoryId, null);
        assertNotNull(ri);
        assertNotNull(ri.getRootFolderId());

        String rootFolderId = ri.getRootFolderId();

        // set up properties
        List<PropertyData<?>> propertyList = new ArrayList<PropertyData<?>>();
        propertyList.add(getBinding().getObjectFactory().createPropertyStringData(PropertyIds.NAME,
                "provider-tests-" + System.currentTimeMillis()));
View Full Code Here

        ObjectStore sm = fMapRepositoryToObjectStore.get(repositoryId);
        if (null == sm) {
            return null;
        }

        RepositoryInfo repoInfo = createDefaultRepositoryInfo(repositoryId);

        return repoInfo;
    }
View Full Code Here

    public ObjectList getContentChanges(CallContext context, String repositoryId, Holder<String> changeLogToken,
            Boolean includeProperties, String filter, Boolean includePolicyIds, Boolean includeAcl,
            BigInteger maxItems, ExtensionsData extension, ObjectInfoHandler objectInfos) {
        // dummy implementation using hard coded values

        RepositoryInfo rep = fRepositoryService.getRepositoryInfo(context, repositoryId, null);
        String rootFolderId = rep.getRootFolderId();

        ObjectListImpl objList = new ObjectListImpl();
        List<ObjectInFolderContainer> tempRes = fNavigationService.getDescendants(context, repositoryId, rootFolderId,
                BigInteger.valueOf(3), filter, false, IncludeRelationships.NONE, null, false, extension, null);
View Full Code Here

    public RepositoryInfo getRepositoryInfo(CallContext context, String repositoryId, ExtensionsData extension) {

        validator.getRepositoryInfo(context, repositoryId, extension);

        RepositoryInfo repoInfo = getRepositoryInfoFromStoreManager(repositoryId);

        return repoInfo;
    }
View Full Code Here

        return result;
    }

    private RepositoryInfo getRepositoryInfoFromStoreManager(String repositoryId) {
        RepositoryInfo repoInfo = fStoreManager.getRepositoryInfo(repositoryId);
        if (null == repoInfo || !repoInfo.getId().equals(repositoryId)) {
            throw new CmisInvalidArgumentException("Unknown repository: " + repositoryId);
        }
        return repoInfo;
    }
View Full Code Here

     */
    private static void createTestFolder() {
        // System.out.println("Creating test folder...");

        // get root folder id
        RepositoryInfo ri = getBinding().getRepositoryService().getRepositoryInfo(fRepositoryId, null);
        assertNotNull(ri);
        assertNotNull(ri.getRootFolderId());

        String rootFolderId = ri.getRootFolderId();

        // set up properties
        List<PropertyData<?>> propertyList = new ArrayList<PropertyData<?>>();
        propertyList.add(getBinding().getObjectFactory().createPropertyStringData(PropertyIds.NAME,
                "provider-tests-" + System.currentTimeMillis()));
View Full Code Here

        assertFalse(repositories.isEmpty());

        log.info("geRepositoryInfo(), found " + repositories.size() + " repository/repositories).");

        for (RepositoryInfo repository : repositories) {
            RepositoryInfo repository2 = fRepSvc.getRepositoryInfo(repository.getId(), null);
            assertNotNull(repository2);
            assertEquals(repository.getId(), repository2.getId());
            log.info("found repository" + repository2.getId());
        }

        log.info("... testRepositoryInfo() finished.");
    }
View Full Code Here

        // get types
        int depth = -1;
        String wrongTypeId = "UnknownType";

        try {
            RepositoryInfo repInf = fRepSvc.getRepositoryInfo(wrongRepositoryId, null);
            log.debug("getRepositoryInfo(): " + repInf);
            fail("getRepositoryInfo() with illegal repository id should throw InvalidArgumentException.");
        } catch (CmisInvalidArgumentException e) {
            log.info("getRepositoryInfo() with depth==0 raised expected exception: " + e);
        }
View Full Code Here

        log.info("... testInheritedProperties() finished.");
    }

    private String getRepositoryId() {
        List<RepositoryInfo> repositories = fRepSvc.getRepositoryInfos(null);
        RepositoryInfo repository = repositories.get(0);
        assertNotNull(repository);
        return repository.getId();
    }
View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.commons.data.RepositoryInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.