Search code examples
liferaydocument-library

How to show metadata of a document in liferay


I have a custom document library portlet, where I have to show metadata of attached document in another page, can anyone suggest how can I show these fields?


Solution

  • You can use DLFileEntryMetadataLocalServiceUtil.

    DLFileEntryMetadata fileEntryMetadata = DLFileEntryMetadataLocalServiceUtil
                          .getFileEntryMetadata(ddmStructure.getStructureId(), fileVersionId);
    
    Fields fields = StorageEngineUtil.getFields(fileEntryMetadata.getDDMStorageId());