Example usage for com.liferay.portal.kernel.atom AtomEntryContent setMimeType

List of usage examples for com.liferay.portal.kernel.atom AtomEntryContent setMimeType

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.atom AtomEntryContent setMimeType.

Prototype

public void setMimeType(String mimeType) 

Source Link

Usage

From source file:com.liferay.document.library.internal.atom.FileEntryAtomCollectionAdapter.java

License:Open Source License

@Override
public AtomEntryContent getEntryContent(FileEntry fileEntry, AtomRequestContext atomRequestContext) {

    AtomEntryContent atomEntryContent = new AtomEntryContent(AtomEntryContent.Type.MEDIA);

    atomEntryContent.setMimeType(fileEntry.getMimeType());

    String srcLink = AtomUtil.createEntryLink(atomRequestContext, COLLECTION_NAME,
            fileEntry.getFileEntryId() + ":media");

    atomEntryContent.setSrcLink(srcLink);

    return atomEntryContent;
}

From source file:com.liferay.portlet.documentlibrary.atom.FileEntryAtomCollectionAdapter.java

License:Open Source License

public AtomEntryContent getEntryContent(FileEntry fileEntry, AtomRequestContext atomRequestContext) {

    AtomEntryContent atomEntryContent = new AtomEntryContent(AtomEntryContent.Type.MEDIA);

    atomEntryContent.setMimeType(fileEntry.getMimeType());

    String srcLink = AtomUtil.createEntryLink(atomRequestContext, COLLECTION_NAME,
            fileEntry.getFileEntryId() + ":media");

    atomEntryContent.setSrcLink(srcLink);

    return atomEntryContent;
}