public interface

StashUser

implements Person Principal
com.atlassian.stash.user.StashUser
Known Indirect Subclasses

Class Overview

Represents a registered user of Stash.

Summary

Constants
int MAX_SLUG_LENGTH The maximum length of a user slug
String SLUG_REGEXP The regex for user slugs
Fields
public static final Function<StashUserInteger> TO_ID
[Expand]
Inherited Fields
From interface com.atlassian.stash.user.Person
Public Methods
<T> T accept(StashUserVisitor<T> visitor)
@Nonnull @RequiredString String getDisplayName()
@Nullable Integer getId()
@Nonnull @RequiredString String getSlug()
Retrieves the "slug" for this user, which is a URL-friendly variant of its name.
@Nonnull UserType getType()
boolean isActive()
[Expand]
Inherited Methods
From interface com.atlassian.stash.user.Person
From interface java.security.Principal

Constants

public static final int MAX_SLUG_LENGTH

The maximum length of a user slug

Constant Value: 127 (0x0000007f)

public static final String SLUG_REGEXP

The regex for user slugs

Constant Value: "[^\\/]+"

Fields

public static final Function<StashUserInteger> TO_ID

Public Methods

public T accept (StashUserVisitor<T> visitor)

@Nonnull @RequiredString public String getDisplayName ()

Returns
  • the user's display name

@Nullable public Integer getId ()

Returns
  • the user id

@Nonnull @RequiredString public String getSlug ()

Retrieves the "slug" for this user, which is a URL-friendly variant of its name. Each user's slug is guaranteed to be unique within the system. Although URL-friendly, appropriate encoding should still be performed on this slug whenever it is used in a URL.

Returns
  • the user's slug

@Nonnull public UserType getType ()

Returns
  • the type of user

public boolean isActive ()

Returns
  • true if the user is enabled, false for deleted and disabled users.