|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.starbase.starteam.CacheRef
|
+--com.starbase.starteam.Property
Each different Type supported by a StarTeam Server (e.g. File, Change Request, Topic...) has an associated set of properties. The Property class provides information about a Type's property.
| Nested Class Summary | |
static interface |
Property.Types
Constants identifying the value type of a property. |
| Method Summary | |
static boolean |
areValuesEqual(java.lang.Object v1,
java.lang.Object v2)
Compares two property values for equality. |
java.lang.Object |
coerce(java.lang.Object value)
Converts property values to the appropriate type when possible. |
Property |
copy()
Creates a copy of this property object. |
boolean |
equals(java.lang.Object source)
returns true if this object instance is equal to the source |
int |
getClassIDOfValue()
Returns the class ID for values of this property. |
java.lang.Object |
getDefaultValue()
Returns the default value for this property. |
Property[] |
getDependentProperties()
Returns the set of properties that the computation of this property's value depends upon. |
java.lang.String |
getDisplayName()
Returns this property's display name. |
java.lang.String |
getDisplayValue(java.lang.Object value)
Converts the given property value to a string suitable for display. |
boolean |
getEnumDisabled(int code)
Returns true if the given enumerated value has been marked disabled. |
java.lang.String |
getEnumDisplayName(int code)
Return the display name for the enumerated value with the specified code. |
EnumeratedValue[] |
getEnumeratedValues()
Returns an array of all the enumerated values for this property. |
Translations |
getEnumTranslations(int code)
Returns a copy of the Translations for the specified enumerated value. |
int[] |
getEnumValues()
Returns an array of all the enumerated values for this property. |
int |
getID()
Returns this property's internal ID. |
int |
getMaxLength()
For text-valued properties, returns the maximum number of characters permitted. |
java.lang.String |
getName()
Returns this property's internal name. |
Translations |
getTranslations()
Returns a copy of the display name translations for this property. |
Type |
getType()
Returns the Type object than has this property as one of its properties. |
int |
getTypeCode()
Returns the type code (e.g. |
int |
hashCode()
returns a unique hash for all instances of this type |
boolean |
isAdvanced()
Return true is the property is considered "advanced". |
boolean |
isCalculated()
Returns true if the property is calculated on-the-fly by the server as opposed to being stored on the server. |
boolean |
isClientCalculated()
Return true is the property is calculated in the fly by the client. |
boolean |
isDescriptor()
Returns true if the property is considered a descriptor. |
boolean |
isDisabled()
Return true if the property is flagged as disabled. |
boolean |
isEqualTo(Property property)
Compares two Property objects. |
boolean |
isGenericCalculated()
Returns true if the property is calculated on the server by the component. |
boolean |
isHeader()
Returns true if this property is stored in the repository database and if the database field is a header field. |
boolean |
isInstance(java.lang.Object object)
Returns true if the specified object is a legal value for this property. |
boolean |
isPrimaryDescriptor()
Return true if this property is the primary descriptor for this property's owning type. |
boolean |
isRequired()
Returns true if a value for this property is required; valid for user-defined properties only. |
boolean |
isRestricted()
Return true if this is a restricted property. |
boolean |
isRevisionIndependent()
Returns true if this property is revision-independent (for example, "FlagUserList", "ReadStatusUserList"). |
boolean |
isServerCalculated()
Return true if the property if caclulated on the fly by the server. |
boolean |
isStored()
Returns true if the property is stored in the server's database. |
boolean |
isSysDefined()
Returns true if the property is a built-in StarTeam property (as opposed to a custom property). |
boolean |
isTimeTruncated()
Returns true if the time part of this property should be truncated during display; valid for time-valued properties only. |
boolean |
isUserCustomized()
Returns true if this property is a user defined property. |
boolean |
isUserDefined()
Returns true is the property was user defined through the repository customization feature. |
boolean |
isUserModifiable()
Return true if the property is flagged as user modifiable. |
boolean |
isViewSpecific()
Returns true if this property is view-specific (for example, "ExclusiveLocker", "BranchOnChange"). |
static Property[] |
resolveAllDependencies(Property[] props)
This will return the full set of dependent properties based on the specified set. |
java.lang.String |
toDebugString()
Returns a String represetation of this property that may be useful for debugging purposes. |
java.lang.String |
toString()
Returns the name of the property. |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
public Type getType()
public java.lang.String getEnumDisplayName(int code)
code - the enumerated value code
Property.getEnumValues(),
Property.getEnumDisabled(int)public Translations getEnumTranslations(int code)
public boolean getEnumDisabled(int code)
code - the enumerated value code
Property.getEnumValues(),
Property.getEnumDisplayName(int)public int[] getEnumValues()
java.lang.RuntimeException - if this Property Type is not an EnumeratedProperty instanceProperty.getEnumDisplayName(int),
Property.getEnumDisabled(int)public EnumeratedValue[] getEnumeratedValues()
public int getID()
public java.lang.String getName()
public java.lang.String getDisplayName()
public Translations getTranslations()
public int getTypeCode()
Property.Typespublic int getClassIDOfValue()
Property.Types.OBJECT_IDpublic int getMaxLength()
Property.Types.TEXTpublic java.lang.Object getDefaultValue()
public boolean isStored()
public boolean isCalculated()
public boolean isHeader()
public boolean isSysDefined()
public boolean isUserDefined()
public boolean isClientCalculated()
public boolean isServerCalculated()
public boolean isGenericCalculated()
public boolean isPrimaryDescriptor()
public boolean isDescriptor()
public boolean isUserModifiable()
public boolean isAdvanced()
public boolean isDisabled()
public boolean isRestricted()
public boolean isUserCustomized()
public boolean isRequired()
public boolean isTimeTruncated()
public boolean isViewSpecific()
public boolean isRevisionIndependent()
public boolean isInstance(java.lang.Object object)
object - the object being checked as a legal value for this property.
public Property[] getDependentProperties()
Property.resolveAllDependencies(com.starbase.starteam.Property[]),
Property.isClientCalculated()public static Property[] resolveAllDependencies(Property[] props)
Property.getDependentProperties()
public java.lang.Object coerce(java.lang.Object value)
throws java.lang.ClassCastException
Integer
one may pass in a Byte or Short
without precision loss. This method will return the approrpate value
when possible or throw a ClassCastException when not.
The supported conversions are as follows:
Integer: values will accept Integer,
Short, or Byte
Double: values will accept Number
(and consequently Double, Long, Float, Integer, Short, Byte)
OLEDate: values will accept OLEDate
and java.util.Date
value - the property value to be coerced to the proper type. This
cannot be null.
java.lang.ClassCastException - if the type coercion can not be performedpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toDebugString()
public Property copy()
The copied property will have the same parent Type as the original property. The Type object is not copied.
For enumerated properties, the enumerated values are copied.
For client-calculated properties, the individual property objects that are included in the list of dependent properties are not copied.
Property.isEqualTo(com.starbase.starteam.Property)public boolean isEqualTo(Property property)
The parent Types are compared by ClassID.
For enumerated properties, the enumerated values are compared using a deep comparison.
For client-calculated properties, the two Property objects must have the same dependents. Dependent properties are compared by property ID.
Property.copy()
public static boolean areValuesEqual(java.lang.Object v1,
java.lang.Object v2)
v1 - Property value.v2 - Another property value.
public java.lang.String getDisplayValue(java.lang.Object value)
value - A legal value for this property.
public boolean equals(java.lang.Object source)
equals in class java.lang.Objectsource - Object the source to comapre with
public int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||