Hi Tycho, I assume you used the OpenCMIS FileShare code as a starting point. If so, there should be a class FileShareTypeManager. (You may have renamed it.) The type definitions are set up in the constructor. To make your use case work, you need two additional type definitions: The base secondary type and your secondary type. The class TypeDefinitionFactory should help you constructing these type definitions. - Florian > Hi, > > I have been trying to add functionality to my custom CMIS server that > allows for custom properties to be set. The CMIS server implementation > is an adaptation of the OpenCMIS server framework stub, where the File > System structure has been replaced by object based storage with > ElasticSearch. I need these custom properties to allow not only > "cmis:file" types, but also "cmis:folder" types to have a url property > where you can download the appropriate metadata file. The "cmis:file" > type has a contentStream where you can find the actual content > (usually a PDF), where this custom property is also required to link > to the metadata file of the "cmis:file". > > Based on the instructions at this URL: > (https://chemistry.apache.org/docs/cmis-samples/samples/properties/index.html), > I have tried multiple variations of the following code: > >             // CMIS 1.1 properties >             if (context.getCmisVersion() != CmisVersion.CMIS_1_0) { >                 addPropertyString(result, typeId, filter, > PropertyIds.DESCRIPTION, null); > >                 List secondaryTypes = new > ArrayList(); >                 secondaryTypes.add("tmlo:metaDataFile"); > >                 addPropertyIdList(result, typeId, filter, > PropertyIds.SECONDARY_OBJECT_TYPE_IDS, secondaryTypes); >                 addPropertyString(result, typeId, filter, > "tmlo:metaDataFile", tmloCmisObject.getMetaDataFileLocation()); >             } > > /Note that the syntax is slightly different from the URL, because the > framework implementation comes with the "addProperty[X]" functions as > opposed to the "properties.put" found in the URL. > / > > This results in the following exception, however, when trying to > connect to the CMIS server: > > CMIS Exception: objectNotFound Type 'tmlo:metaDataFile' is unknown! > >   Error Content: Apache Chemistry OpenCMIS - > objectNotFound error

HTTP > Status 404 - > > objectNotFound

Type > 'tmlo:metaDataFile' is unknown!

> > I have not been able to find out what causes the error. There have > been responses to similar questions that "custom properties should be > defined in the repository", but they come without information on how > to actually do that. > > If further information is required I will gladly supply it. > > Best regards, > > Tycho Nijon > > -- > Digitaal Archief Service > > mob +31 6 43599147 > mail tycho@divault.nl > web www.divault.com > adres: Schieland 18, 1948RM, Beverwijk > > DiVault in beeld: VIDEO > > > > Deze e-mail inclusief inhoud is alleen voor de ontvanger van deze > e-mail. > Elk gebruik anders dan gebruik door de ontvanger is verboden en > onrechtmatig. > De verzender is niet verantwoordelijk voor de juiste en complete > verzending > van de informatie noch voor enige vertraging. > > This email and any attachments thereto may contain private, > confidential, > and privileged material for the sole use of the intended recipient. > Any review, copying, or distribution of this email (or any attachments > thereto) > by others is strictly prohibited. If you are not the intended > recipient, > please contact the sender immediately and permanently delete the > original and > any copies of this email and any attachments thereto. > © DiVault 2018