|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.microsoft.tfs.core.clients.versioncontrol.PropertyUtils
public abstract class PropertyUtils
Static methods to validate TFS 2010/2012 property names and values.
| Constructor Summary | |
|---|---|
PropertyUtils()
|
|
| Method Summary | |
|---|---|
static void |
checkForInvalidCharacters(java.lang.String string,
java.lang.String argumentName)
Checks the given string for invalid (control) characters, and throws IllegalArgumentException if found. |
static PropertyValue[] |
clonePropertyValues(PropertyValue[] values)
Returns a new array with new PropertyValue instances matching the
given values. |
static boolean |
equals(PropertyValue[] values1,
PropertyValue[] values2)
|
static PropertyValue[] |
mergePendingValues(PropertyValue[] existingValues,
PropertyValue[] pendingValues)
Merges existing and pending property values. |
static java.lang.String[] |
mergePropertyFilters(java.lang.String[] filters1,
java.lang.String[] filters2)
Merges two arrays of property filters into one arrays that matches all the items the two arrays would match individually. |
static PropertyValue[] |
selectDirtyPropertyValues(PropertyValue[] propertyValues)
Selects the "dirty" PropertyValues from the given array and
returns only those. |
static PropertyValue |
selectMatching(PropertyValue[] values,
java.lang.String itemPropertyFilter)
Selects the property value that matches the given filter. |
static PropertyValue[] |
selectMatching(PropertyValue[] values,
java.lang.String[] itemPropertyFilters)
Selects the property values that match the given filters. |
static PropertyValue[] |
selectUnique(PropertyValue[] values)
Deprecated. remove this method as soon as the TFS bug gets fixed that returns duplicate property values |
static void |
validatePropertyFilter(java.lang.String propertyNameFilter)
Checks a single property name filter for length and content compliance. |
static void |
validatePropertyFilters(java.lang.String[] propertyNameFilters)
Checks each of the given property name filter strings for length and content compliance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertyUtils()
| Method Detail |
|---|
public static void validatePropertyFilters(java.lang.String[] propertyNameFilters)
propertyNameFilters - the property name filters to check (must not be null)public static void validatePropertyFilter(java.lang.String propertyNameFilter)
propertyNameFilter - the property name filter to check (must not be null)
public static void checkForInvalidCharacters(java.lang.String string,
java.lang.String argumentName)
throws java.lang.IllegalArgumentException
IllegalArgumentException if found.
string - the string to check (must not be null)argumentName - the name of the string to use in error text (must not be
null)
java.lang.IllegalArgumentException - if the string had invalid characterspublic static PropertyValue[] selectDirtyPropertyValues(PropertyValue[] propertyValues)
PropertyValues from the given array and
returns only those.
propertyValues - the property values to select dirty ones from (must not be
null)
public static PropertyValue[] clonePropertyValues(PropertyValue[] values)
PropertyValue instances matching the
given values. The value object inside each PropertyValue item
(byte[], String, Boolean, etc.) is not cloned.
values - the values to clone (may be null or empty)
null if the given
values array was null
public static PropertyValue selectMatching(PropertyValue[] values,
java.lang.String itemPropertyFilter)
values - the properties to select from (if null,
null is returned)itemPropertyFilter - the filter to match (if null, null is
returned)
PropertyValue or null if none
matched or none were supplied
public static PropertyValue[] selectMatching(PropertyValue[] values,
java.lang.String[] itemPropertyFilters)
values - the properties to select from (if null,
null is returned)itemPropertyFilters - the filters to match (if null, null is
returned)
PropertyValues or null if none
matched or none were suppliedpublic static PropertyValue[] selectUnique(PropertyValue[] values)
values - the values to select from (may be null )
null if
the given values were null, or empty if the given
values were emtpy
public static PropertyValue[] mergePendingValues(PropertyValue[] existingValues,
PropertyValue[] pendingValues)
existingValues - the existing (typically WorkspaceLocalItem's) values (may
be null or empty)pendingValues - the pending (typically LocalPendingChange's) values (may
be null or empty)
null if both the given value
arrays were null or the merge result is no property
values
public static java.lang.String[] mergePropertyFilters(java.lang.String[] filters1,
java.lang.String[] filters2)
null when both inputs are null . Order is not
preserved.
filters1 - the first array of filters (may be null)filters2 - the second array of filters (may be null)
null if the specified filters
were null and there are no extra filters
public static boolean equals(PropertyValue[] values1,
PropertyValue[] values2)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||