Page 1 of 1

Get rendition thumbnail cmis

Posted: Thu Jun 27, 2019 3:09 pm
by tamires
Hi,

I trying get thumbnail using with cmis, but return null.

Code: Select all

public void getThumbnail(String id) {
		
			OperationContext context = session.createOperationContext();
			context.setRenditionFilterString("cmis:thumbnail");
			context.setCacheEnabled(true);
			CmisObject object= session.getObject(id, context);
			Document document = (Document)object;
			Rendition rendention = (Rendition)document.getRenditions();
			System.out.println(rendention);
		}

Re: Get rendition thumbnail cmis

Posted: Thu Jul 18, 2019 2:20 pm
by agaspa
Hi @tamires,
it would be possible, but currently the implementation of method getRenditions just returns an empty collection.
Of course you can implement this by yourself, you should modify the class com.logicaldoc.cmis.LDCmisService in module logicaldoc-cmis and provide a useful implementation of method

Code: Select all

public List<RenditionData> getRenditions(String repositoryId, String objectId, String renditionFilter,
			BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) 
You can get the source code from SourceForge
https://sourceforge.net/projects/logica ... p/download

Re: Get rendition thumbnail cmis

Posted: Thu Jul 18, 2019 2:57 pm
by tamires
Thanks @agaspa.