public interface

AvatarService

com.atlassian.bitbucket.avatar.AvatarService

Class Overview

Provides URLs from which avatar images can be retrieved.

Summary

Public Methods
@Nonnull String getUrlForPerson(Person person, AvatarRequest request)
Retrieves a URL referencing an avatar for the provided person.
@Nonnull String getUrlForProject(Project project, AvatarRequest request)
Retrieves a URL referencing an avatar for the provided project.

Public Methods

@Nonnull public String getUrlForPerson (Person person, AvatarRequest request)

Retrieves a URL referencing an avatar for the provided person.

Implementations of this interface shall not return null. If no avatar is available for the provided person, the URL of a default avatar is returned.

Parameters
person the person whose avatar is being requested
request a request describing the avatar being requested
Returns
  • a URL referencing an avatar for the provided person

@Nonnull public String getUrlForProject (Project project, AvatarRequest request)

Retrieves a URL referencing an avatar for the provided project.

Implementations of this interface shall not return null. If no avatar is available for the provided project, the URL of a default avatar is returned. The default avatar for a project will be randomly assigned, but will be stable once set.

Parameters
project the project whose avatar is being requested
request a request describing the avatar being requested
Returns
  • a URL referencing an avatar for the provided project