com.atlassian.jira.avatar
Class AvatarPickerHelperImpl
java.lang.Object
com.atlassian.jira.avatar.AvatarPickerHelperImpl
- All Implemented Interfaces:
- AvatarPickerHelper
public class AvatarPickerHelperImpl
- extends Object
- implements AvatarPickerHelper
- Since:
- v5.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AvatarPickerHelperImpl
public AvatarPickerHelperImpl(AvatarManager avatarManager,
JiraAuthenticationContext authenticationContext,
ApplicationProperties properties,
VelocityRequestContextFactory requestContextFactory,
ProjectManager projectManager,
UserUtil userUtil)
upload
public AvatarPickerHelperImpl.Result<AvatarPickerHelperImpl.TemporaryAvatarBean> upload(InputStream stream,
String fileName,
String contentType,
long size,
String ownerId,
Avatar.Type type)
- Description copied from interface:
AvatarPickerHelper
- Handles upload of temporary avatar
- Specified by:
upload
in interface AvatarPickerHelper
- Parameters:
stream
- upload io streamfileName
- name of upload filecontentType
- image typesize
- size of avatarownerId
- ownerId the id of the owner, matches the type (project id or user key)type
- the desired type of the avatar.
- Returns:
- upload result and any errors
convertTemporaryToReal
public AvatarPickerHelperImpl.Result<Avatar> convertTemporaryToReal(String ownerId,
Avatar.Type type,
Selection selection)
- Description copied from interface:
AvatarPickerHelper
- Converts temporary avatar (uploaded) to real avatar
- Specified by:
convertTemporaryToReal
in interface AvatarPickerHelper
- Parameters:
ownerId
- the id of the owner, matches the type (project id or user key)type
- the desired type of the avatarselection
- the area of the temporary avatar to crop real avatar to
- Returns:
- conversion result and any errors
cropTemporary
public AvatarPickerHelperImpl.Result<AvatarPickerHelperImpl.TemporaryAvatarBean> cropTemporary(String ownerId,
Avatar.Type type,
Selection selection)
- Description copied from interface:
AvatarPickerHelper
- Crops the temporary avatar (uploaded) using the given selection.
- Specified by:
cropTemporary
in interface AvatarPickerHelper
- Parameters:
ownerId
- the id of the owner, matches the type (project id or user key)type
- the desired type of the avatar.selection
- the area of the temporary avatar to crop real avatar to
- Returns:
- crop result and any errors
getTemporaryAvatarUrl
public String getTemporaryAvatarUrl()
- Description copied from interface:
AvatarPickerHelper
- Gets temporary avatar url
- Specified by:
getTemporaryAvatarUrl
in interface AvatarPickerHelper
- Returns:
- temporary avatar url
Copyright © 2002-2013 Atlassian. All Rights Reserved.