Package com.atlassian.jira.web.servlet
Class ViewProjectAvatarServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.atlassian.jira.web.servlet.AbstractAvatarServlet
com.atlassian.jira.web.servlet.ViewProjectAvatarServlet
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
- Direct Known Subclasses:
ViewTemporaryAvatarServlet
Serves avatar images for projects.
- Since:
- v4.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.jira.web.servlet.AbstractAvatarServlet
AbstractAvatarServlet.PreprocessedInput
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Slight hack to stay backwards compatible for project avatars via the 'pid' param.protected AbstractAvatarServlet.PreprocessedInput
preprocessInput
(String projectId, Long avatarId, Avatar.Size size, javax.servlet.http.HttpServletResponse response) Ensures the input is valid and if validation passes returns a valid avatarId to serve.Methods inherited from class com.atlassian.jira.web.servlet.AbstractAvatarServlet
avatarOkForOwner, defaultDoGet, doGet, getAvatarManager, getAvatarToStream, getFeatureManager, getOwnerId, handleOutputStreamingException, isFeatureEnabled
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
-
Constructor Details
-
ViewProjectAvatarServlet
public ViewProjectAvatarServlet()
-
-
Method Details
-
preprocessInput
protected AbstractAvatarServlet.PreprocessedInput preprocessInput(String projectId, Long avatarId, Avatar.Size size, javax.servlet.http.HttpServletResponse response) throws IOException Description copied from class:AbstractAvatarServlet
Ensures the input is valid and if validation passes returns a valid avatarId to serve. If validation fails, this method should send errors on the response and return a null avatar id.- Specified by:
preprocessInput
in classAbstractAvatarServlet
- Parameters:
projectId
- The owner of the avataravatarId
- The avatarId requestedsize
- The size of requested avatarresponse
- The response to send- Returns:
- The object containing avatarId to serve to the user or object containing null avatarId if validation fails
- Throws:
IOException
- If there's an error updating the response object
-
getOwnerIdParamName
Description copied from class:AbstractAvatarServlet
Slight hack to stay backwards compatible for project avatars via the 'pid' param. The project avatar servlet implementation can return pid here instead of ownerId.- Specified by:
getOwnerIdParamName
in classAbstractAvatarServlet
- Returns:
- The parameter used to identify the owner in the request.
-