Example usage for com.liferay.portal.kernel.atom AtomException AtomException

List of usage examples for com.liferay.portal.kernel.atom AtomException AtomException

Introduction

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

Prototype

public AtomException(int errorCode, Throwable cause) 

Source Link

Usage

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

License:Open Source License

@Override
public InputStream getMediaStream(FileEntry fileEntry) throws AtomException {

    try {/*  ww w . ja  va  2  s  .c  o  m*/
        return fileEntry.getContentStream();
    } catch (Exception e) {
        throw new AtomException(SC_INTERNAL_SERVER_ERROR, e);
    }
}

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

License:Open Source License

@Override
public InputStream getMediaStream(FileEntry fileEntry) throws AtomException {

    try {/*w  w  w .  j a  va2  s . c  om*/
        return fileEntry.getContentStream();
    } catch (Exception ex) {
        throw new AtomException(SC_INTERNAL_SERVER_ERROR, ex);
    }
}