Package jetbrains.buildServer.users
Class VcsUsernamePropertyKey
- java.lang.Object
-
- jetbrains.buildServer.users.PropertyKey
-
- jetbrains.buildServer.users.PluginPropertyKey
-
- jetbrains.buildServer.users.VcsUsernamePropertyKey
-
public class VcsUsernamePropertyKey extends PluginPropertyKey
Represents VCS username property from the user profile
-
-
Field Summary
Fields Modifier and Type Field Description static long
ANY_VCS_ROOT_ID
static String
ANY_VCS_ROOT_PREFIX
static String
ANY_VCS_TYPE
static String
VCS_ROOT_PREFIX
-
Fields inherited from class jetbrains.buildServer.users.PluginPropertyKey
PLUGIN_PROPERTY_PREFIX
-
-
Constructor Summary
Constructors Constructor Description VcsUsernamePropertyKey()
Constructor for default VCS usernameVcsUsernamePropertyKey(String propertyKey)
ConstructorVcsUsernamePropertyKey(VcsRoot vcsRoot)
ConstructorVcsUsernamePropertyKey(VcsSupportConfig vcsSupport)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
extractVcsRootIdFromKey(String key)
Returns VCS root id from the property key or null if this key corresponds to any VCS rootString
getVcsName()
Returns name of VCS pluginlong
getVcsRootId()
Returns VCS root id from the property or -1 if this property corresponds to any VCS rootstatic boolean
isVcsUsernamePropertyKey(String propertyKey)
Returns true if the specified string representation of the property key represents VCS property keystatic String
substituteVcsRootId(String propertyKey, String newId)
Creates new property key from the specified one with the substituted vcs root id.-
Methods inherited from class jetbrains.buildServer.users.PluginPropertyKey
getKey, getPluginName, isPluginPropertyKey
-
Methods inherited from class jetbrains.buildServer.users.PropertyKey
equals, hashCode, toString
-
-
-
-
Field Detail
-
ANY_VCS_ROOT_ID
public static final long ANY_VCS_ROOT_ID
- See Also:
- Constant Field Values
-
VCS_ROOT_PREFIX
public static final String VCS_ROOT_PREFIX
- See Also:
- Constant Field Values
-
ANY_VCS_ROOT_PREFIX
public static final String ANY_VCS_ROOT_PREFIX
- See Also:
- Constant Field Values
-
ANY_VCS_TYPE
public static final String ANY_VCS_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VcsUsernamePropertyKey
public VcsUsernamePropertyKey(@NotNull VcsRoot vcsRoot)
Constructor- Parameters:
vcsRoot
- VCS root to associate username with
-
VcsUsernamePropertyKey
public VcsUsernamePropertyKey(@NotNull VcsSupportConfig vcsSupport)
Constructor- Parameters:
vcsSupport
- VCS plugin to associate username with
-
VcsUsernamePropertyKey
public VcsUsernamePropertyKey()
Constructor for default VCS username
-
VcsUsernamePropertyKey
public VcsUsernamePropertyKey(@NotNull String propertyKey)
Constructor- Parameters:
propertyKey
- property key from database
-
-
Method Detail
-
getVcsRootId
public long getVcsRootId()
Returns VCS root id from the property or -1 if this property corresponds to any VCS root- Returns:
- VCS root id or -1
-
getVcsName
public String getVcsName()
Returns name of VCS plugin- Returns:
- name of VCS plugin
-
isVcsUsernamePropertyKey
public static boolean isVcsUsernamePropertyKey(@NotNull String propertyKey)
Returns true if the specified string representation of the property key represents VCS property key- Parameters:
propertyKey
- property key- Returns:
- true if property key is VCS property key
-
extractVcsRootIdFromKey
@Nullable public static String extractVcsRootIdFromKey(String key)
Returns VCS root id from the property key or null if this key corresponds to any VCS root- Since:
- 9.0
-
substituteVcsRootId
public static String substituteVcsRootId(@NotNull String propertyKey, @NotNull String newId)
Creates new property key from the specified one with the substituted vcs root id.- Throws:
IllegalArgumentException
- if propertyKey corresponds to any VCS root, i.e.extractVcsRootIdFromKey(String)
returns null.- Since:
- 9.0
-
-