In my previous post, I explained how to create extension
element. In this post, I am going to show you, how to add extension elements to
repository information.
RepositoryInfo interface provides
'setExtensions' method to set extensions to a repository.
Ex
CmisExtensionElement
leafExtension1 = new CmisExtensionElementImpl("",
"confidentialLevel", null,
"confidential");
CmisExtensionElement
leafExtension2 = new CmisExtensionElementImpl("",
"rootFolderId", null, "folder_1234");
CmisExtensionElement
leafExtension3 = new CmisExtensionElementImpl("",
"classification", null, "public");
List<CmisExtensionElement>
list = new ArrayList<>();
list.add(leafExtension1);
list.add(leafExtension2);
list.add(leafExtension3);
CmisExtensionElement
parentExtension = new CmisExtensionElementImpl("",
"parentExtension", null, list);
List<CmisExtensionElement>
extensions = Collections.singletonList(parentExtension);
RepositoryInfo
repoInfo = ....//Repository Information
repoInfo.setExtensions(extensions);
No comments:
Post a Comment