com.starteam
Class ContentProperty

java.lang.Object
  extended by com.starteam.Property
      extended by com.starteam.ContentProperty
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
Concept.Type.ContentProperty, TreeItem.Type.RichDescriptionProperty, User.Type.UserImageProperty

public class ContentProperty
extends Property

This class represents a property whose value is arbitrary content.


Nested Class Summary
static class ContentProperty.WebCacheContentProperty
          Base accessor for cached SDK objects encapsulating the statefulness of objects obtained from the artifact cache.
 
Nested classes/interfaces inherited from class com.starteam.Property
Property.MetaData, Property.WebCacheProperty
 
Method Summary
 Property copy()
          Creates a copy of this property object.
 Content getDefaultValue()
          Returns the default Content value for this Property.
 java.lang.String getDisplayValue(java.lang.Object value)
          Converts the given property value to a string suitable for display.
 boolean hasDisplayValue()
          Returns true if this property has meaningful display values that may be included, for example, in an item table.
 boolean isEqualTo(Property property)
          Compares two ContentProperty objects.
 boolean isQueryRelationSupported(QueryPart.Relation operator)
          Determines whether or not the given query operator is supported by this property.
 void setDefaultValue(Content value)
          Sets the default Content value for this Property.
 Content toContent(java.lang.Object value)
          Converts a property value to the type that is exposed by default to client applications.
 
Methods inherited from class com.starteam.Property
areValuesEqual, equals, getDebugString, getDependentProperties, getDisplayName, getDisplayNameTranslations, getGenericDefaultValue, getID, getName, getServer, getType, hashCode, isAdvanced, isCalculated, isClientCalculated, isDescriptor, isDirty, isDisabled, isEnabled, isGenericCalculated, isHeader, isItemProperty, isLegalValue, isNew, isPrimaryDescriptor, isRequired, isRestricted, isRevisionIndependent, isServerCalculated, isSortByTextValueSupported, isStored, isSysDefined, isUserCustomized, isUserDefined, isUserModifiable, isViewSpecific, resolveAllDependencies, setDescriptor, setDisplayName, setDisplayNameTranslations, setEnabled, setGenericDefaultValue, setPrimaryDescriptor, setRequired, toString, toXml, update
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getDefaultValue

public Content getDefaultValue()
Returns the default Content value for this Property. If no default value is specified, Content.VALUE_NOT_SET is assumed.

Returns:
Content

setDefaultValue

public void setDefaultValue(Content value)
Sets the default Content value for this Property. If no default value is specified, Content.VALUE_NOT_SET is assumed.

Parameters:
value - the default Content value

copy

public Property copy()
Creates a copy of this property object. Useful to applications that want to save a snapshot of the Property in a given state, for example, before calling Server.refreshTypes().

The copied property will have the same parent Type as the original property. The Type object is not copied.

Overrides:
copy in class Property
Returns:
A copy of this property object.
See Also:
ContentProperty.isEqualTo(com.starteam.Property)

isEqualTo

public boolean isEqualTo(Property property)
Compares two ContentProperty objects.

The parent Types are compared by ClassID.

Overrides:
isEqualTo in class Property
Parameters:
property - ContentProperty the property object to be compared again this one.
Returns:
true if no differences were found.
See Also:
ContentProperty.copy()

getDisplayValue

public java.lang.String getDisplayValue(java.lang.Object value)
Converts the given property value to a string suitable for display.

Specified by:
getDisplayValue in class Property
Parameters:
value - A legal value for this property.
Returns:
A string representation of the value

toContent

public Content toContent(java.lang.Object value)
Converts a property value to the type that is exposed by default to client applications.

Note that if the return type is something that is not natively supported by Variant, then you will have to override toVariant() and fromVariant(), too.

Parameters:
value - Object the object to be converted to a Content.
Returns:
The content equivalent of the Object.

hasDisplayValue

public boolean hasDisplayValue()
Returns true if this property has meaningful display values that may be included, for example, in an item table.

Returns:
boolean true if this property has meaningful display values

isQueryRelationSupported

public boolean isQueryRelationSupported(QueryPart.Relation operator)
Determines whether or not the given query operator is supported by this property.

Overrides:
isQueryRelationSupported in class Property
Parameters:
operator - A query operator.
Returns:
false. Content properties are not supported in a query.


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.