public RepositoryInfoImpl(RepositoryInfo data) { id = data.getId(); name = data.getName(); description = data.getDescription(); versionSupported = data.getCmisVersionSupported(); capabilities = data.getCapabilities(); rootFolderId = data.getRootFolderId(); aclCapabilities = data.getAclCapabilities(); principalAnonymous = data.getPrincipalIdAnonymous(); principalAnyone = data.getPrincipalIdAnyone(); thinClientUri = data.getThinClientUri(); changesIncomplete = data.getChangesIncomplete(); changesOnType = data.getChangesOnType(); latestChangeLogToken = data.getLatestChangeLogToken(); vendorName = data.getVendorName(); productName = data.getProductName(); productVersion = data.getProductVersion(); extensionFeatures = data.getExtensionFeatures(); setExtensions(data.getExtensions()); }
protected final void checkCmisVersion() { if (repositoryInfo.getCmisVersion() == CmisVersion.CMIS_1_0) { throw new CmisNotSupportedException("This method is not supported for CMIS 1.0 repositories."); } }
Collection<RepositoryInfo> infos = localManager.getAllRepositoryInfos(); for (RepositoryInfo info: infos) { System.out.println("id: " + info.getId()); System.out.println("description: " + info.getDescription()); System.out.println("location: " + info.getLocation()); }
public void doExample() { // Get a CMIS session Session cmisSession = getCmisSession(); // Get the repository info RepositoryInfo repoInfo = cmisSession.getRepositoryInfo(); System.out.println("Product name: " + repoInfo.getProductName()); System.out.println("Product version: " + repoInfo.getProductVersion()); System.out.println("Product vendor: " + repoInfo.getVendorName()); System.out.println("CMIS version supported: " + repoInfo.getCmisVersionSupported()); RepositoryCapabilities caps = repoInfo.getCapabilities(); System.out.println("Partial list of capabilities..."); System.out.println("Joins? " + caps.getJoinCapability()); System.out.println("ACLs? " + caps.getAclCapability()); System.out.println("Changes? " + caps.getChangesCapability()); System.out.println("Queries? " + caps.getQueryCapability()); System.out.println("Content stream updates? " + caps.getContentStreamUpdatesCapability()); System.out.println("Renditions? " + caps.getRenditionsCapability()); System.out.println("Multifiling? " + caps.isMultifilingSupported()); System.out.println("Version-specific filing? " + caps.isVersionSpecificFilingSupported()); } }
private void getRepositoryInfo() { LOG.debug("getting repository info for repository " + repositoryId); // Because some bindings silently retrieve all repositories on the first // request we call it twice // and use a dummy extension data element to prevent caching RepositoryInfo repoInfo = repSvc.getRepositoryInfo(repositoryId, null); ExtensionDataImpl dummyExt = new ExtensionDataImpl(); @SuppressWarnings("serial") List<CmisExtensionElement> extList = new ArrayList<CmisExtensionElement>() { { add(new CmisExtensionElementImpl("foo", "foo", null, "bar")); } }; dummyExt.setExtensions(extList); repoInfo = repSvc.getRepositoryInfo(repositoryId, dummyExt); LOG.debug("repository id is: " + repoInfo.getId()); rootFolderId = repoInfo.getRootFolderId(); changeToken = repoInfo.getLatestChangeLogToken(); LOG.debug("root folder id is: " + repoInfo.getRootFolderId()); renameFiles("getRepositoryInfo"); LOG.debug("getRepositoryInfo() done."); }
log.warn("Failed to get repository info for \"{}\" ECM repository !", uniqueName); } else { log.info("Product Name: ", repositoryInfo.getProductName()); log.info("Repository Id: ", repositoryInfo.getId()); log.info("Root Folder Id: ", repositoryInfo.getRootFolderId());
String repId = infoData.getId(); UrlBuilder baseUrl = compileBaseUrl(request, repId); boolean supportsChanges = false; if (infoData.getCapabilities() != null) { RepositoryCapabilities cap = infoData.getCapabilities(); serviceDoc.startWorkspace(infoData.getId()); serviceDoc.writeCollection(compileUrl(baseUrl, RESOURCE_CHILDREN, infoData.getRootFolderId()), Constants.COLLECTION_ROOT, "Root Collection", Constants.MEDIATYPE_ENTRY, Constants.MEDIATYPE_CMISATOM); compileUrl(baseUrl, RESOURCE_FOLDERTREE, infoData.getRootFolderId()), Constants.MEDIATYPE_DESCENDANTS, null); compileUrl(baseUrl, RESOURCE_DESCENDANTS, infoData.getRootFolderId()), Constants.MEDIATYPE_DESCENDANTS, infoData.getRootFolderId());
private static String getRootFolderId(CmisBinding binding, String repositoryId, String rootFolderId) { RepositoryService repSvc = binding.getRepositoryService(); RepositoryInfo rep = repSvc.getRepositoryInfo(repositoryId, null); if (null == rootFolderId || rootFolderId.length() == 0) { rootFolderId = rep.getRootFolderId(); } return rootFolderId; }
protected boolean supportsMultifiling(Session session) { RepositoryInfo repository = session.getRepositoryInfo(); if (repository.getCapabilities().isMultifilingSupported() == null) { return false; } return repository.getCapabilities().isMultifilingSupported().booleanValue(); } }
info.setHasParent(false); } else if (object.getBaseTypeId() == BaseTypeId.CMIS_FOLDER) { info.setHasParent(!object.getId().equals(repositoryInfo.getRootFolderId())); } else { try { info.setSupportsFolderTree(false); RepositoryCapabilities capabilities = repositoryInfo.getCapabilities(); if (capabilities != null) { info.setHasAcl(capabilities.getAclCapability() == CapabilityAcl.DISCOVER
/** * Translates CMIS repository information into Node. * * @return node document. */ private Document cmisRepository() { RepositoryInfo info = session.getRepositoryInfo(); DocumentWriter writer = newDocument(ObjectId.toString(ObjectId.Type.REPOSITORY_INFO, "")); writer.setPrimaryType(CmisLexicon.REPOSITORY); writer.setId(REPOSITORY_INFO_ID); // product name/vendor/version writer.addProperty(CmisLexicon.VENDOR_NAME, info.getVendorName()); writer.addProperty(CmisLexicon.PRODUCT_NAME, info.getProductName()); writer.addProperty(CmisLexicon.PRODUCT_VERSION, info.getProductVersion()); return writer.document(); }
.getAllowableActions(session.getRepositoryInfo().getId(), object.getId(), null); try { List<ObjectData> appliedPolicies = session.getBinding().getPolicyService() .getAppliedPolicies(session.getRepositoryInfo().getId(), object.getId(), "*", null); addResult(results, assertEquals(1, paths.size(), null, f)); } else { if (Boolean.FALSE.equals(session.getRepositoryInfo().getCapabilities().isMultifilingSupported())) { f = createResult(FAILURE, "Repository does not support multi-filing, but the object has more than one parent!");
public String execute() throws Exception { return cmisConnector.getRepositoryInfo(CmisVersion.CMIS_1_1).getLatestChangeLogToken(); } }, true, false);
cmisTypes.add(BaseTypeId.CMIS_POLICY.value()); if (session.getRepositoryInfo().getCmisVersion() != CmisVersion.CMIS_1_0) { cmisTypes.add(BaseTypeId.CMIS_ITEM.value()); cmisTypes.add(BaseTypeId.CMIS_SECONDARY.value()); if (session.getRepositoryInfo().getCmisVersion() == CmisVersion.CMIS_1_1) { .getBinding() .getRepositoryService() .getTypeChildren(session.getRepositoryInfo().getId(), null, false, BigInteger.valueOf(100), BigInteger.valueOf(6), null); if (typeDefinitionList == null) {
@Override public boolean isRootFolder() { String objectId = getObjectId(); String rootFolderId = getSession().getRepositoryInfo().getRootFolderId(); return objectId.equals(rootFolderId); }
protected boolean isFulltextOnly(Session session) { RepositoryInfo repository = session.getRepositoryInfo(); if (repository.getCapabilities().getQueryCapability() == null) { return false; } return repository.getCapabilities().getQueryCapability() == CapabilityQuery.FULLTEXTONLY; } }
info.setHasParent(false); } else if (object.getBaseTypeId() == BaseTypeId.CMIS_FOLDER) { info.setHasParent(!object.getId().equals(repositoryInfo.getRootFolderId())); } else { try { info.setSupportsFolderTree(false); RepositoryCapabilities capabilities = repositoryInfo.getCapabilities(); if (capabilities != null) { info.setHasAcl(capabilities.getAclCapability() == CapabilityAcl.DISCOVER
public Long execute() throws Exception { return Long.parseLong(cmisConnector.getRepositoryInfo(CmisVersion.CMIS_1_1).getLatestChangeLogToken()); } }, true, false);