Package com.liferay.portal.webserver
Class WebServerServlet
Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.liferay.portal.webserver.WebServerServlet
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class WebServerServlet
extends javax.servlet.http.HttpServlet
- Author:
- Alexander Chow, Brian Wing Shun Chan
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.liferay.portal.kernel.model.Image
convertFileEntry
(boolean smallImage, com.liferay.portal.kernel.repository.model.FileEntry fileEntry) protected com.liferay.portal.kernel.model.Image
getDefaultImage
(javax.servlet.http.HttpServletRequest httpServletRequest, long imageId) protected com.liferay.portal.kernel.model.Image
getImage
(javax.servlet.http.HttpServletRequest httpServletRequest, boolean getDefault) protected byte[]
getImageBytes
(javax.servlet.http.HttpServletRequest httpServletRequest, com.liferay.portal.kernel.model.Image image) protected long
getImageId
(javax.servlet.http.HttpServletRequest httpServletRequest) protected long
getLastModified
(javax.servlet.http.HttpServletRequest httpServletRequest) protected static com.liferay.portal.kernel.repository.model.FileEntry
getPortletFileEntry
(javax.servlet.http.HttpServletRequest httpServletRequest, String[] pathArray) protected com.liferay.portal.kernel.model.Image
getUserPortraitImageResized
(com.liferay.portal.kernel.model.Image image, long imageId) static boolean
hasFiles
(javax.servlet.http.HttpServletRequest httpServletRequest) void
init
(javax.servlet.ServletConfig servletConfig) protected boolean
isLegacyImageGalleryImageId
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) protected boolean
isSupportsRangeHeader
(String contentType) protected void
processPrincipalException
(Throwable throwable, com.liferay.portal.kernel.model.User user, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) protected void
sendDocumentLibrary
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, com.liferay.portal.kernel.model.User user, String path, String[] pathArray) protected void
sendFile
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, com.liferay.portal.kernel.model.User user, String[] pathArray) protected void
sendFile
(javax.servlet.http.HttpServletResponse httpServletResponse, com.liferay.portal.kernel.model.User user, long groupId, long folderId, String title) protected void
sendGroups
(javax.servlet.http.HttpServletResponse httpServletResponse, com.liferay.portal.kernel.model.User user, String path) protected void
sendHTML
(javax.servlet.http.HttpServletResponse httpServletResponse, String path, List<WebServerEntry> webServerEntries) static void
sendMessageObjectEntryAttachmentDownload
(javax.servlet.http.HttpServletRequest httpServletRequest, com.liferay.portal.kernel.model.User user) protected void
sendPortletFileEntry
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String path, String[] pathArray) void
service
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) protected void
writeImage
(com.liferay.portal.kernel.model.Image image, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, service
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Field Details
-
PATH_PORTLET_FILE_ENTRY
- See Also:
-
-
Constructor Details
-
WebServerServlet
public WebServerServlet()
-
-
Method Details
-
hasFiles
public static boolean hasFiles(javax.servlet.http.HttpServletRequest httpServletRequest) - See Also:
-
sendMessageObjectEntryAttachmentDownload
public static void sendMessageObjectEntryAttachmentDownload(javax.servlet.http.HttpServletRequest httpServletRequest, com.liferay.portal.kernel.model.User user) - See Also:
-
init
public void init(javax.servlet.ServletConfig servletConfig) throws javax.servlet.ServletException - Specified by:
init
in interfacejavax.servlet.Servlet
- Overrides:
init
in classjavax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
-
service
public void service(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws IOException, javax.servlet.ServletException - Overrides:
service
in classjavax.servlet.http.HttpServlet
- Throws:
IOException
javax.servlet.ServletException
-
getPortletFileEntry
protected static com.liferay.portal.kernel.repository.model.FileEntry getPortletFileEntry(javax.servlet.http.HttpServletRequest httpServletRequest, String[] pathArray) throws Exception - Throws:
Exception
-
convertFileEntry
protected com.liferay.portal.kernel.model.Image convertFileEntry(boolean smallImage, com.liferay.portal.kernel.repository.model.FileEntry fileEntry) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getDefaultImage
protected com.liferay.portal.kernel.model.Image getDefaultImage(javax.servlet.http.HttpServletRequest httpServletRequest, long imageId) -
getImage
protected com.liferay.portal.kernel.model.Image getImage(javax.servlet.http.HttpServletRequest httpServletRequest, boolean getDefault) throws Exception - Throws:
Exception
-
getImageBytes
protected byte[] getImageBytes(javax.servlet.http.HttpServletRequest httpServletRequest, com.liferay.portal.kernel.model.Image image) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getImageId
protected long getImageId(javax.servlet.http.HttpServletRequest httpServletRequest) -
getLastModified
protected long getLastModified(javax.servlet.http.HttpServletRequest httpServletRequest) - Overrides:
getLastModified
in classjavax.servlet.http.HttpServlet
-
getUserPortraitImageResized
protected com.liferay.portal.kernel.model.Image getUserPortraitImageResized(com.liferay.portal.kernel.model.Image image, long imageId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
isLegacyImageGalleryImageId
protected boolean isLegacyImageGalleryImageId(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) -
isSupportsRangeHeader
-
processPrincipalException
protected void processPrincipalException(Throwable throwable, com.liferay.portal.kernel.model.User user, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws IOException, javax.servlet.ServletException - Throws:
IOException
javax.servlet.ServletException
-
sendDocumentLibrary
protected void sendDocumentLibrary(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, com.liferay.portal.kernel.model.User user, String path, String[] pathArray) throws Exception - Throws:
Exception
-
sendFile
protected void sendFile(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, com.liferay.portal.kernel.model.User user, String[] pathArray) throws Exception - Throws:
Exception
-
sendFile
protected void sendFile(javax.servlet.http.HttpServletResponse httpServletResponse, com.liferay.portal.kernel.model.User user, long groupId, long folderId, String title) throws Exception - Throws:
Exception
-
sendGroups
protected void sendGroups(javax.servlet.http.HttpServletResponse httpServletResponse, com.liferay.portal.kernel.model.User user, String path) throws Exception - Throws:
Exception
-
sendHTML
protected void sendHTML(javax.servlet.http.HttpServletResponse httpServletResponse, String path, List<WebServerEntry> webServerEntries) throws Exception - Throws:
Exception
-
sendPortletFileEntry
protected void sendPortletFileEntry(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String path, String[] pathArray) throws Exception - Throws:
Exception
-
writeImage
protected void writeImage(com.liferay.portal.kernel.model.Image image, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-