public class

ViewProjectAvatarServlet

extends AbstractAvatarServlet
java.lang.Object
   ↳ javax.servlet.GenericServlet
     ↳ javax.servlet.http.HttpServlet
       ↳ com.atlassian.jira.web.servlet.AbstractAvatarServlet
         ↳ com.atlassian.jira.web.servlet.ViewProjectAvatarServlet
Known Direct Subclasses

Class Overview

Serves avatar images for projects.

Summary

Public Constructors
ViewProjectAvatarServlet()
Protected Methods
String getOwnerIdParamName()
Slight hack to stay backwards compatible for project avatars via the 'pid' param.
Long validateInput(String projectId, Long avatarId, HttpServletResponse response)
Ensures the input is valid and if validation passes returns a valid avatarId to serve.
[Expand]
Inherited Methods
From class com.atlassian.jira.web.servlet.AbstractAvatarServlet
From class javax.servlet.http.HttpServlet
From class javax.servlet.GenericServlet
From class java.lang.Object
From interface javax.servlet.Servlet
From interface javax.servlet.ServletConfig

Public Constructors

public ViewProjectAvatarServlet ()

Protected Methods

protected String getOwnerIdParamName ()

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.

Returns
  • The parameter used to identify the owner in the request.

protected Long validateInput (String projectId, Long avatarId, HttpServletResponse response)

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.

Parameters
projectId The owner of the avatar
avatarId The avatarId requested
response The response to send
Returns
  • The avatarId to serve to the user or null if validation fails
Throws
IOException