com.atlassian.jira.web.servlet
Class ViewUserAvatarServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.atlassian.jira.web.servlet.AbstractAvatarServlet
              extended by com.atlassian.jira.web.servlet.ViewUserAvatarServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ViewUserAvatarServlet
extends AbstractAvatarServlet

Serves avatar images for users.

Since:
v4.2
See Also:
Serialized Form

Constructor Summary
ViewUserAvatarServlet()
           
 
Method Summary
protected  java.lang.String getOwnerIdParamName()
          Slight hack to stay backwards compatible for project avatars via the 'pid' param.
protected  java.lang.Long validateInput(java.lang.String ownerId, java.lang.Long avatarId, 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, doGet, handleOutputStreamingException
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewUserAvatarServlet

public ViewUserAvatarServlet()
Method Detail

validateInput

protected java.lang.Long validateInput(java.lang.String ownerId,
                                       java.lang.Long avatarId,
                                       javax.servlet.http.HttpServletResponse response)
                                throws java.io.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:
validateInput in class AbstractAvatarServlet
Parameters:
ownerId - 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:
java.io.IOException - If there's an error updating the response object

getOwnerIdParamName

protected java.lang.String 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 class AbstractAvatarServlet
Returns:
The parameter used to identify the owner in the request.


Copyright © 2002-2010 Atlassian. All Rights Reserved.