public interface Project
Modifier and Type | Field and Description |
---|---|
static String |
KEY_REGEXP
The regexp to validate the project key when creating or updating from an untrusted source.
|
static String |
KEY_TRUSTED_REGEXP
The regexp to validate the project key when creating or updating from a trusted source, which is slightly more relaxed
than
KEY_REGEXP . |
static int |
MAX_KEY_LENGTH
The maximum length of a project key.
|
static int |
MAX_NAME_LENGTH
The maximum length of a project name.
|
static int |
MAX_NAMESPACE_LENGTH
The maximum length of a project namespace.
|
static String |
NAME_REGEXP
The regexp to validate the project name.
|
static String |
NAMESPACE_REGEXP
The regexp to validate the project namespace.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(ProjectVisitor<T> visitor) |
String |
getDescription() |
int |
getId() |
@Pattern(regexp="[a-zA-Z][a-zA-Z0-9_\\-]*",groups={Create.class,Update.class},message="{com.atlassian.bitbucket.validation.project.key.pattern.message}") @Pattern(regexp="~[a-zA-Z0-9\\-_.]+|[a-zA-Z][a-zA-Z0-9_\\-]*",groups={TrustedCreate.class,TrustedUpdate.class},message="{com.atlassian.bitbucket.validation.project.key.trusted.pattern.message}") String |
getKey() |
@Pattern(regexp="^[^~].*",groups={Create.class,Update.class},message="{com.atlassian.bitbucket.validation.project.name.pattern.message}") String |
getName() |
@Pattern(regexp="[a-zA-Z0-9_\\-]*",message="{com.atlassian.bitbucket.validation.project.namespace.pattern.message}") String |
getNamespace() |
ProjectType |
getType()
Retrieves the project's
type . |
boolean |
isPublic()
Retrieves a flag indicating whether this project is public.
|
static final String KEY_REGEXP
static final String KEY_TRUSTED_REGEXP
KEY_REGEXP
. This regexp allows PersonalProject
keys (which must begin with tilda, and have
less restrictions on which characters can be included) and normal project keys (represented by KEY_REGEXP
,
which must not begin with tilda).static final int MAX_KEY_LENGTH
static final int MAX_NAME_LENGTH
static final int MAX_NAMESPACE_LENGTH
static final String NAME_REGEXP
static final String NAMESPACE_REGEXP
<T> T accept(@Nonnull ProjectVisitor<T> visitor)
T
- type of visitorvisitor
- the visitor to process the project instance@OptionalString(size=255) String getDescription()
int getId()
boolean isPublic()
Note, this flag is taken into account when calculating whether this project is accessible to
unauthenticated users but is not the definitive answer. For a definitive answer, use
isPubliclyAccessible
.
true
if the project has been marked as public, false
otherwise@Pattern(regexp="[a-zA-Z][a-zA-Z0-9_\\-]*",groups={Create.class,Update.class},message="{com.atlassian.bitbucket.validation.project.key.pattern.message}") @Pattern(regexp="~[a-zA-Z0-9\\-_.]+|[a-zA-Z][a-zA-Z0-9_\\-]*",groups={TrustedCreate.class,TrustedUpdate.class},message="{com.atlassian.bitbucket.validation.project.key.trusted.pattern.message}") @RequiredString(size=128) @Pattern(regexp="[a-zA-Z][a-zA-Z0-9_\\-]*",groups={Create.class,Update.class},message="{com.atlassian.bitbucket.validation.project.key.pattern.message}") @Pattern(regexp="~[a-zA-Z0-9\\-_.]+|[a-zA-Z][a-zA-Z0-9_\\-]*",groups={TrustedCreate.class,TrustedUpdate.class},message="{com.atlassian.bitbucket.validation.project.key.trusted.pattern.message}") String getKey()
@Pattern(regexp="^[^~].*", groups={Create.class,Update.class}, message="{com.atlassian.bitbucket.validation.project.name.pattern.message}") @RequiredString(size=128) @Pattern(regexp="^[^~].*",groups={Create.class,Update.class},message="{com.atlassian.bitbucket.validation.project.name.pattern.message}") String getName()
@Pattern(regexp="[a-zA-Z0-9_\\-]*", message="{com.atlassian.bitbucket.validation.project.namespace.pattern.message}") @OptionalString(size=128) @Pattern(regexp="[a-zA-Z0-9_\\-]*",message="{com.atlassian.bitbucket.validation.project.namespace.pattern.message}") String getNamespace()
mirror mode
and will be null
in standard installations.@Nonnull ProjectType getType()
type
. See the documentation for the various types to determine what
interfaces each implements.type
for this projectCopyright © 2020 Atlassian. All rights reserved.