public RepositoryCapabilitiesImpl(RepositoryCapabilities data) { allVersionsSearchable = data.isAllVersionsSearchableSupported(); capabilityAcl = data.getAclCapability(); capabilityChanges = data.getChangesCapability(); capabilityContentStreamUpdates = data.getContentStreamUpdatesCapability(); capabilityJoin = data.getJoinCapability(); capabilityQuery = data.getQueryCapability(); capabilityRendition = data.getRenditionsCapability(); isPwcSearchable = data.isPwcSearchableSupported(); isPwcUpdatable = data.isPwcUpdatableSupported(); supportsGetDescendants = data.isGetDescendantsSupported(); supportsGetFolderTree = data.isGetFolderTreeSupported(); capabilityOrderBy = data.getOrderByCapability(); supportsMultifiling = data.isMultifilingSupported(); supportsUnfiling = data.isUnfilingSupported(); supportsVersionSpecificFiling = data.isVersionSpecificFilingSupported(); creatablePropertyTypes = data.getCreatablePropertyTypes(); newTypeSettableAttributes = data.getNewTypeSettableAttributes(); setExtensions(data.getExtensions()); }
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()); } }
RepositoryCapabilities cap = infoData.getCapabilities(); if (cap.getQueryCapability() != null) { supportsQuery = (cap.getQueryCapability() != CapabilityQuery.NONE); if (cap.isUnfilingSupported() != null) { supportsUnFiling = cap.isUnfilingSupported(); if (cap.isMultifilingSupported() != null) { supportsMultifiling = cap.isMultifilingSupported(); if (cap.isGetFolderTreeSupported() != null) { supportsFolderTree = cap.isGetFolderTreeSupported(); if (cap.isGetDescendantsSupported() != null) { supportsRootDescendants = cap.isGetDescendantsSupported(); if (cap.getChangesCapability() != null) { supportsChanges = (cap.getChangesCapability() != CapabilityChanges.NONE);
info.setHasAcl(capabilities.getAclCapability() == CapabilityAcl.DISCOVER || capabilities.getAclCapability() == CapabilityAcl.MANAGE); if (object.getBaseTypeId() == BaseTypeId.CMIS_FOLDER) { info.setSupportsDescendants(Boolean.TRUE.equals(capabilities.isGetDescendantsSupported())); info.setSupportsFolderTree(Boolean.TRUE.equals(capabilities.isGetFolderTreeSupported()));
protected boolean isFulltextOnly(Session session) { RepositoryInfo repository = session.getRepositoryInfo(); if (repository.getCapabilities().getQueryCapability() == null) { return false; } return repository.getCapabilities().getQueryCapability() == CapabilityQuery.FULLTEXTONLY; } }
protected boolean supportsMultifiling(Session session) { RepositoryInfo repository = session.getRepositoryInfo(); if (repository.getCapabilities().isMultifilingSupported() == null) { return false; } return repository.getCapabilities().isMultifilingSupported().booleanValue(); } }
protected boolean supportsContentChanges(Session session) { RepositoryInfo repository = session.getRepositoryInfo(); if (repository.getCapabilities().getChangesCapability() == null) { return false; } return repository.getCapabilities().getChangesCapability() != CapabilityChanges.NONE; }
private CapabilityContentStreamUpdates getContentStreamUpdatesCapbility(Session session) { if (session.getRepositoryInfo().getCapabilities() == null) { return null; } return session.getRepositoryInfo().getCapabilities().getContentStreamUpdatesCapability(); }
protected boolean isGetFolderTreeSupported(Session session) { RepositoryCapabilities cap = session.getRepositoryInfo().getCapabilities(); if (cap == null) { return false; } if (cap.isGetFolderTreeSupported() == null) { return false; } return cap.isGetFolderTreeSupported().booleanValue(); }
protected boolean isGetDescendantsSupported(Session session) { RepositoryCapabilities cap = session.getRepositoryInfo().getCapabilities(); if (cap == null) { return false; } if (cap.isGetDescendantsSupported() == null) { return false; } return cap.isGetDescendantsSupported().booleanValue(); }
protected boolean supportsUnfiling(Session session) { RepositoryInfo repository = session.getRepositoryInfo(); if (repository.getCapabilities().isUnfilingSupported() == null) { return false; } return repository.getCapabilities().isUnfilingSupported().booleanValue(); } }
protected CapabilityAcl getAclCapability(Session session) { RepositoryInfo repository = session.getRepositoryInfo(); if (repository.getCapabilities().getAclCapability() == null) { return null; } return repository.getCapabilities().getAclCapability(); } }
info.setHasAcl(capabilities.getAclCapability() == CapabilityAcl.DISCOVER || capabilities.getAclCapability() == CapabilityAcl.MANAGE); if (object.getBaseTypeId() == BaseTypeId.CMIS_FOLDER) { info.setSupportsDescendants(Boolean.TRUE.equals(capabilities.isGetDescendantsSupported())); info.setSupportsFolderTree(Boolean.TRUE.equals(capabilities.isGetFolderTreeSupported()));
protected boolean supportsQuery(Session session) { RepositoryInfo repository = session.getRepositoryInfo(); if (repository.getCapabilities().getQueryCapability() == null) { return false; } return repository.getCapabilities().getQueryCapability() != CapabilityQuery.NONE; }
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!");
private void runContentTest(Session session, Folder testFolder) { if (session.getRepositoryInfo().getCapabilities().getContentStreamUpdatesCapability() != CapabilityContentStreamUpdates.ANYTIME) { addResult(createResult(SKIPPED, "Repository doesn't allow to replace content. Test skipped!")); return;
public RepositoryCapabilitiesImpl(RepositoryCapabilities data) { allVersionsSearchable = data.isAllVersionsSearchableSupported(); capabilityAcl = data.getAclCapability(); capabilityChanges = data.getChangesCapability(); capabilityContentStreamUpdates = data.getContentStreamUpdatesCapability(); capabilityJoin = data.getJoinCapability(); capabilityQuery = data.getQueryCapability(); capabilityRendition = data.getRenditionsCapability(); isPwcSearchable = data.isPwcSearchableSupported(); isPwcUpdatable = data.isPwcUpdatableSupported(); supportsGetDescendants = data.isGetDescendantsSupported(); supportsGetFolderTree = data.isGetFolderTreeSupported(); capabilityOrderBy = data.getOrderByCapability(); supportsMultifiling = data.isMultifilingSupported(); supportsUnfiling = data.isUnfilingSupported(); supportsVersionSpecificFiling = data.isVersionSpecificFilingSupported(); creatablePropertyTypes = data.getCreatablePropertyTypes(); newTypeSettableAttributes = data.getNewTypeSettableAttributes(); setExtensions(data.getExtensions()); }
XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_ACL, source.getAclCapability()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_ALL_VERSIONS_SEARCHABLE, source.isAllVersionsSearchableSupported()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_CHANGES, source.getChangesCapability()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_CONTENT_STREAM_UPDATABILITY, source.getContentStreamUpdatesCapability()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_GET_DESCENDANTS, source.isGetDescendantsSupported()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_GET_FOLDER_TREE, source.isGetFolderTreeSupported()); if (cmisVersion != CmisVersion.CMIS_1_0) { XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_ORDER_BY, source.getOrderByCapability()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_MULTIFILING, source.isMultifilingSupported()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_PWC_SEARCHABLE, source.isPwcSearchableSupported()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_PWC_UPDATABLE, source.isPwcUpdatableSupported()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_QUERY, source.getQueryCapability()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_RENDITIONS, source.getRenditionsCapability()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_UNFILING, source.isUnfilingSupported()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_VERSION_SPECIFIC_FILING, source.isVersionSpecificFilingSupported()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_JOIN, source.getJoinCapability()); if (cmisVersion != CmisVersion.CMIS_1_0) { if (source.getCreatablePropertyTypes() != null) { CreatablePropertyTypes creatablePropertyTypes = source.getCreatablePropertyTypes(); writer.writeEndElement(); if (source.getNewTypeSettableAttributes() != null) { NewTypeSettableAttributes newTypeSettableAttributes = source.getNewTypeSettableAttributes();
XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_ACL, source.getAclCapability()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_ALL_VERSIONS_SEARCHABLE, source.isAllVersionsSearchableSupported()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_CHANGES, source.getChangesCapability()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_CONTENT_STREAM_UPDATABILITY, source.getContentStreamUpdatesCapability()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_GET_DESCENDANTS, source.isGetDescendantsSupported()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_GET_FOLDER_TREE, source.isGetFolderTreeSupported()); if (cmisVersion != CmisVersion.CMIS_1_0) { XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_ORDER_BY, source.getOrderByCapability()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_MULTIFILING, source.isMultifilingSupported()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_PWC_SEARCHABLE, source.isPwcSearchableSupported()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_PWC_UPDATABLE, source.isPwcUpdatableSupported()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_QUERY, source.getQueryCapability()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_RENDITIONS, source.getRenditionsCapability()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_UNFILING, source.isUnfilingSupported()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_VERSION_SPECIFIC_FILING, source.isVersionSpecificFilingSupported()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_JOIN, source.getJoinCapability()); if (cmisVersion != CmisVersion.CMIS_1_0) { if (source.getCreatablePropertyTypes() != null) { CreatablePropertyTypes creatablePropertyTypes = source.getCreatablePropertyTypes(); writer.endTag(NAMESPACE_CMIS, TAG_CAP_CREATABLE_PROPERTY_TYPES); if (source.getNewTypeSettableAttributes() != null) { NewTypeSettableAttributes newTypeSettableAttributes = source.getNewTypeSettableAttributes();
getJSONEnumValue(capabilities.getContentStreamUpdatesCapability())); result.put(JSON_CAP_CHANGES, getJSONEnumValue(capabilities.getChangesCapability())); result.put(JSON_CAP_RENDITIONS, getJSONEnumValue(capabilities.getRenditionsCapability())); result.put(JSON_CAP_GET_DESCENDANTS, capabilities.isGetDescendantsSupported()); result.put(JSON_CAP_GET_FOLDER_TREE, capabilities.isGetFolderTreeSupported()); result.put(JSON_CAP_MULTIFILING, capabilities.isMultifilingSupported()); result.put(JSON_CAP_UNFILING, capabilities.isUnfilingSupported()); result.put(JSON_CAP_VERSION_SPECIFIC_FILING, capabilities.isVersionSpecificFilingSupported()); result.put(JSON_CAP_PWC_SEARCHABLE, capabilities.isPwcSearchableSupported()); result.put(JSON_CAP_PWC_UPDATABLE, capabilities.isPwcUpdatableSupported()); result.put(JSON_CAP_ALL_VERSIONS_SEARCHABLE, capabilities.isAllVersionsSearchableSupported()); result.put(JSON_CAP_ORDER_BY, getJSONEnumValue(capabilities.getOrderByCapability())); result.put(JSON_CAP_QUERY, getJSONEnumValue(capabilities.getQueryCapability())); result.put(JSON_CAP_JOIN, getJSONEnumValue(capabilities.getJoinCapability())); result.put(JSON_CAP_ACL, getJSONEnumValue(capabilities.getAclCapability())); if (capabilities.getCreatablePropertyTypes() != null) { CreatablePropertyTypes creatablePropertyTypes = capabilities.getCreatablePropertyTypes(); if (capabilities.getNewTypeSettableAttributes() != null) { NewTypeSettableAttributes newTypeSettableAttributes = capabilities.getNewTypeSettableAttributes();