com.atlassian.jira.avatar
Interface AvatarPickerHelper

All Known Implementing Classes:
AvatarPickerHelperImpl

public interface AvatarPickerHelper

A helper interface for uploading and creating custom avatars

Since:
v5.0

Method Summary
 AvatarPickerHelperImpl.Result<Avatar> convertTemporaryToReal(String ownerId, Avatar.Type type, Selection selection)
          Converts temporary avatar (uploaded) to real avatar
 String getTemporaryAvatarUrl()
          Gets temporary avatar url
 AvatarPickerHelperImpl.Result<AvatarPickerHelperImpl.TemporaryAvatarBean> upload(InputStream stream, String fileName, String contentType, long size, String ownerId, Avatar.Type type)
          Handles upload of temporary avatar
 

Method Detail

upload

AvatarPickerHelperImpl.Result<AvatarPickerHelperImpl.TemporaryAvatarBean> upload(InputStream stream,
                                                                                 String fileName,
                                                                                 String contentType,
                                                                                 long size,
                                                                                 String ownerId,
                                                                                 Avatar.Type type)
Handles upload of temporary avatar

Parameters:
stream - upload io stream
fileName - name of upload file
contentType - image type
size - size of avatar
ownerId - ownerId the id of the owner, matches the type.
type - the desired type of the avatar.
Returns:
upload result and any errors

convertTemporaryToReal

AvatarPickerHelperImpl.Result<Avatar> convertTemporaryToReal(String ownerId,
                                                             Avatar.Type type,
                                                             Selection selection)
Converts temporary avatar (uploaded) to real avatar

Parameters:
ownerId - the id of the owner, matches the type.
type - the desired type of the avatar.
selection - the area of the temporary avatar to crop real avatar to
Returns:
conversion result and any errors

getTemporaryAvatarUrl

String getTemporaryAvatarUrl()
Gets temporary avatar url

Returns:
temporary avatar url


Copyright © 2002-2011 Atlassian. All Rights Reserved.