public class VcsUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BRANCH_SPEC_PROP |
static java.lang.String |
CHECKOUT_ROOT |
static java.lang.String |
VCS_NAME_PROP |
static java.lang.String |
VCS_ROOT_NAME_PROP |
| Constructor and Description |
|---|
VcsUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
areEquivalentRoots(VcsRoot root1,
VcsRoot root2)
Checks whether the specified VCS roots are equivalent.
|
static VcsRoot |
convertStringToVcsRoot(long id,
java.lang.String serialized)
Deserialized VCS root from String
|
static VcsRoot |
convertStringToVcsRoot(long id,
java.lang.String serialized,
Function<java.lang.String,java.lang.String> decode)
Deserialized VCS root from String
|
static java.lang.String |
convertVcsRootToString(VcsRoot root)
Serializes VCS root contents without id to string.
|
static java.lang.String |
convertVcsRootToString(VcsRoot root,
Function<java.lang.String,java.lang.String> encode)
Serializes VCS root contents without id to string
|
static java.lang.String |
getSimplifiedName(VcsRoot vcsRoot) |
static java.lang.String |
getVcsRootPropertiesAsPresentableString(VcsRoot root) |
static long |
getVcsRootPropertiesHash(VcsRoot root) |
static java.util.Map<java.lang.String,java.lang.String> |
getVcsRootPublicProperties(VcsRoot root) |
static boolean |
isSecureProperty(java.lang.String propertyName)
Returns true if the property is secure, i.e.
|
static boolean |
isSet(VcsRoot root,
java.lang.String propertyName) |
static java.lang.String |
propertiesToString(java.util.Map<java.lang.String,java.lang.String> properties)
Converts properties set to string, without any transformation of the secured properties
|
static java.lang.String |
propertiesToString(java.util.Map<java.lang.String,java.lang.String> properties,
boolean scrambleSecureProps)
Converts properties set to string, with optional scrambling of the secured properties
|
static java.lang.String |
propertiesToStringSecure(java.util.Map<java.lang.String,java.lang.String> properties)
Converts properties set to string, with scrambling of the secure properties
|
static java.util.Map<java.lang.String,java.lang.String> |
stringToProperties(java.lang.String string)
Converts string to map of properties.
|
static java.util.Map<java.lang.String,java.lang.String> |
stringToProperties(java.lang.String string,
boolean unscrambleSecureProps)
Converts string to map of properties.
|
static java.util.Map<java.lang.String,java.lang.String> |
stringToPropertiesAsIs(java.lang.String string)
Converts string to map of properties.
|
static java.util.Map<java.lang.String,java.lang.String> |
stringToPropertiesSecure(java.lang.String string,
Function<java.lang.String,java.lang.String> decript)
Converts string to map of properties.
|
@NonNls public static final java.lang.String VCS_NAME_PROP
@NonNls public static final java.lang.String VCS_ROOT_NAME_PROP
@NonNls public static final java.lang.String BRANCH_SPEC_PROP
@NonNls public static final java.lang.String CHECKOUT_ROOT
public static boolean areEquivalentRoots(@Nullable
VcsRoot root1,
@Nullable
VcsRoot root2)
root1 - VCS rootroot2 - VCS root@NotNull
public static java.util.Map<java.lang.String,java.lang.String> getVcsRootPublicProperties(@NotNull
VcsRoot root)
public static long getVcsRootPropertiesHash(@NotNull
VcsRoot root)
@NotNull
public static java.lang.String getVcsRootPropertiesAsPresentableString(@NotNull
VcsRoot root)
@NotNull
public static java.lang.String convertVcsRootToString(@NotNull
VcsRoot root)
root - root to serializeconvertStringToVcsRoot(long, String)@NotNull
public static java.lang.String convertVcsRootToString(@NotNull
VcsRoot root,
Function<java.lang.String,java.lang.String> encode)
root - root to serializeencode - function to transform secured valuesconvertStringToVcsRoot(long, String)@NotNull public static VcsRoot convertStringToVcsRoot(long id, @NotNull java.lang.String serialized)
id - root idserialized - serialized root string from convertVcsRootToString(VcsRoot)convertVcsRootToString(VcsRoot)@NotNull public static VcsRoot convertStringToVcsRoot(long id, @NotNull java.lang.String serialized, Function<java.lang.String,java.lang.String> decode)
id - root idserialized - serialized root string from convertVcsRootToString(VcsRoot, Function)decode - function to transform secured values backconvertVcsRootToString(VcsRoot, Function)@NotNull
public static java.lang.String getSimplifiedName(@NotNull
VcsRoot vcsRoot)
vcsRoot - VcsRoot for which we need normalized namepublic static boolean isSecureProperty(@NotNull
java.lang.String propertyName)
propertyName - property name.true if property value should be scrambled.@NotNull
public static java.lang.String propertiesToStringSecure(@NotNull
java.util.Map<java.lang.String,java.lang.String> properties)
properties - map of properties values.stringToProperties(String),
VcsRoot.SECURE_PROPERTY_PREFIX@NotNull
public static java.lang.String propertiesToString(@NotNull
java.util.Map<java.lang.String,java.lang.String> properties,
boolean scrambleSecureProps)
properties - map of properties values.scrambleSecureProps - if true, secure properties will be scrambled to avoid their reading in plain textstringToProperties(String),
VcsRoot.SECURE_PROPERTY_PREFIX@NotNull
public static java.lang.String propertiesToString(@NotNull
java.util.Map<java.lang.String,java.lang.String> properties)
properties - map of properties values.stringToProperties(String)@NotNull public static java.util.Map<java.lang.String,java.lang.String> stringToProperties(java.lang.String string)
string - original string.VcsUtil#propertiesToStringSecure(java.util.Map, boolean)@NotNull
public static java.util.Map<java.lang.String,java.lang.String> stringToProperties(java.lang.String string,
boolean unscrambleSecureProps)
string - original string.unscrambleSecureProps - if true, will try to unscramble secure propertiespropertiesToString(java.util.Map, boolean)@NotNull public static java.util.Map<java.lang.String,java.lang.String> stringToPropertiesAsIs(java.lang.String string)
string - original string.VcsUtil#propertiesToStringSecure(java.util.Map, boolean)@NotNull
public static java.util.Map<java.lang.String,java.lang.String> stringToPropertiesSecure(java.lang.String string,
Function<java.lang.String,java.lang.String> decript)
string - original string.decript - method will try to transform secure properties by using this functionpropertiesToString(java.util.Map, boolean)public static boolean isSet(@NotNull
VcsRoot root,
java.lang.String propertyName)