com.starteam
Class Property.WebCacheProperty

java.lang.Object
  extended by com.starteam.Property.WebCacheProperty
Direct Known Subclasses:
BooleanProperty.WebCacheBooleanProperty, ContentProperty.WebCacheContentProperty, EnumeratedProperty.WebCacheEnumeratedProperty, LinkProperty.WebCacheLinkProperty, ObjectProperty.WebCacheObjectProperty, ScalarProperty.WebCacheScalarProperty, VectorProperty.WebCacheVectorProperty
Enclosing class:
Property

public static class Property.WebCacheProperty
extends java.lang.Object

Base accessor for cached SDK objects encapsulating the statefulness of objects obtained from the artifact cache.


Method Summary
 boolean equals(java.lang.Object o)
          Test this object for equality wiith another
 ArtifactCacheManager.Context getContext()
          Returns the context of this object.
 java.lang.String getDisplayName()
          Returns this property's display name.
 Translations getDisplayNameTranslations()
          Returns a copy of the display name translations for this property.
 java.lang.String getDisplayValue(java.lang.Object value)
          Converts the given property value to a string suitable for display.
 java.lang.Object getGenericDefaultValue()
          Returns the default value for this property.
 int getID()
          Returns the ID of its underlying object.
 java.lang.String getName()
          Returns this property's internal name.
 Type.WebCacheType getType()
          Returns the type of this resource.
 int hashCode()
          Return a hash code for this object
 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 isDirty()
          Return true if this object is dirty
 boolean isDisabled()
          Return true if the property is flagged as disabled.
 boolean isEnabled()
          Return true if the property is flagged as enabled.
 boolean isPrimaryDescriptor()
          Return true if this property is the primary descriptor for this property's owning type.
 boolean isQueryRelationSupported(QueryPart.Relation operator)
          Returns true if this property supports the specified query operator(s)
 boolean isRequired()
          Returns true if a value for this property is required; valid for user-defined properties only.
 boolean isSortByTextValueSupported()
          Returns true if this property supports Sort by TextValue for the specified Query Operator
 boolean isUserCustomized()
          Returns true if this property is a user defined property.
 boolean isUserModifiable()
          Return true if the property is flagged as user modifiable.
 void refresh()
          replace the (possibly out-dated) instance of the contained live object with an appropriate read only instance from the ArtifactCache
 void setDescriptor()
          Assign this property as a (non-primary) Descriptor Several properties on a type can be descriptors for that type This assignment may be made for a new type that has not been saved to the server and the value is used simply to ensure the construction of the type xml
 void setDisplayName(java.lang.String displayName)
          Sets the display name for this property.
 void setDisplayNameTranslations(Translations t)
          Sets a copy of the display name translations for this property.
 void setEnabled(boolean bIsEnabled)
          Enables/disables the property
 void setGenericDefaultValue(java.lang.Object value)
          Sets the Generic Default Value for this property
 void setPrimaryDescriptor()
          Assign this property as the Primary Descriptor Only 1 property on a type can be the primary descriptor for the type If more than 1 property is assigned to be the primary descriptor, the server will throw an exception This assignment may be made for a new type that has not been saved to the server and the value is used simply to ensure the construction of the type xml
 java.lang.String toXml()
          Returns an xml representation of this property The xml representation is used to specify the property definition when creating custom components
 void update()
          Save a property through the connection pool.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getContext

public ArtifactCacheManager.Context getContext()
Returns the context of this object.

Returns:
the context of this object.

isDirty

public boolean isDirty()
Return true if this object is dirty

Returns:
true if this object is dirty

getID

public int getID()
Returns the ID of its underlying object.

Returns:
the ID of the underlying object

getName

public java.lang.String getName()
Returns this property's internal name.

Returns:
this property's internal name.

getDisplayName

public java.lang.String getDisplayName()
Returns this property's display name.

Returns:
this property's display name.

getDisplayValue

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

Parameters:
value - A legal value for this property.
Returns:
A string representation of the value

getGenericDefaultValue

public java.lang.Object getGenericDefaultValue()
Returns the default value for this property.

Returns:
the property's default value.

setGenericDefaultValue

public void setGenericDefaultValue(java.lang.Object value)
Sets the Generic Default Value for this property

Parameters:
value - Object

setPrimaryDescriptor

public void setPrimaryDescriptor()
Assign this property as the Primary Descriptor Only 1 property on a type can be the primary descriptor for the type If more than 1 property is assigned to be the primary descriptor, the server will throw an exception This assignment may be made for a new type that has not been saved to the server and the value is used simply to ensure the construction of the type xml


setDescriptor

public void setDescriptor()
Assign this property as a (non-primary) Descriptor Several properties on a type can be descriptors for that type This assignment may be made for a new type that has not been saved to the server and the value is used simply to ensure the construction of the type xml


setDisplayName

public void setDisplayName(java.lang.String displayName)
Sets the display name for this property.

Parameters:
displayName - this property's display name.

getDisplayNameTranslations

public Translations getDisplayNameTranslations()
Returns a copy of the display name translations for this property. Will return null for client calculated properties. When working against servers that do not support display name translations the returned Translations object will only have the default value set.

Returns:
a copy of the Display Name Translations

setDisplayNameTranslations

public void setDisplayNameTranslations(Translations t)
Sets a copy of the display name translations for this property.

Parameters:
t - the translation to copy

isDisabled

public boolean isDisabled()
Return true if the property is flagged as disabled. Generally disabled properties should not be displayed nor edited by end users.

Returns:
true is the property is flagged as disabled.

isEnabled

public boolean isEnabled()
Return true if the property is flagged as enabled.

Returns:
true is the property is flagged as enabled.

isUserCustomized

public boolean isUserCustomized()
Returns true if this property is a user defined property.

Returns:
true if this property is a user defined property.

isRequired

public boolean isRequired()
Returns true if a value for this property is required; valid for user-defined properties only.

Returns:
true if a value for this property is required; valid for user-defined properties only.

isPrimaryDescriptor

public boolean isPrimaryDescriptor()
Return true if this property is the primary descriptor for this property's owning type. Each Type can have only one primary descriptor.

Returns:
true if the property if the primary descriptor.

isUserModifiable

public boolean isUserModifiable()
Return true if the property is flagged as user modifiable. This is not enforced so some properties that are marked as non-modifiable can actually be modified. This is more of a clue for the StarTeam GUI whether or not to allow the user to edit the property.

Returns:
true is the property is flagged as user modifiable.

isDescriptor

public boolean isDescriptor()
Returns true if the property is considered a descriptor. A Type may have multiple descriptors.

Returns:
true is this property is a descriptor.

isCalculated

public boolean isCalculated()
Returns true if the property is calculated on-the-fly by the server as opposed to being stored on the server.

Returns:
true if this property is caclulated by the server rather than stored in the db

isClientCalculated

public boolean isClientCalculated()
Return true is the property is calculated in the fly by the client.

Returns:
true if the property is client calculated.

setEnabled

public void setEnabled(boolean bIsEnabled)
Enables/disables the property

Parameters:
bIsEnabled - true to enable this property

refresh

public void refresh()
replace the (possibly out-dated) instance of the contained live object with an appropriate read only instance from the ArtifactCache


update

public void update()
Save a property through the connection pool. The property may be new or an existing one that has been modified. The caller is responsible for manipulating properties. New properties are accessed from the underlying Type. Existing properties should be copies of properties from the underling type, primarily to prevent multiple threads from reading dirty data. Properties do not follow the existing CRUD life cycle of other SDK objects such as Items, Projects or Views. This is because properties are stored in the system catalog, cannot be deleted, and can support very minor changes such as display name, enabled/disabled hints, etc. The semantic structure of a property can never change once the property has been created.


getType

public Type.WebCacheType getType()
Returns the type of this resource.

Returns:
the type of this resource.

equals

public boolean equals(java.lang.Object o)
Test this object for equality wiith another

Overrides:
equals in class java.lang.Object
Parameters:
o - the object to test against

hashCode

public int hashCode()
Return a hash code for this object

Overrides:
hashCode in class java.lang.Object
Returns:
a hashcode for this object

toXml

public java.lang.String toXml()
Returns an xml representation of this property The xml representation is used to specify the property definition when creating custom components

Returns:
an xml representation of this property

isSortByTextValueSupported

public boolean isSortByTextValueSupported()
Returns true if this property supports Sort by TextValue for the specified Query Operator

Returns:
boolean

isQueryRelationSupported

public boolean isQueryRelationSupported(QueryPart.Relation operator)
Returns true if this property supports the specified query operator(s)

Parameters:
operator - Query Relation
Returns:
true if the query relation is supported by this property


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