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)
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.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.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
isTemporaryAvatarExistent
public boolean isTemporaryAvatarExistent()
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-2011 Atlassian. All Rights Reserved.