OptimalTrace
5.2

com.compuware.optimaltrace.tools.common.bizobjects
Class CustomPropertySupport

java.lang.Object
  extended by com.compuware.optimaltrace.tools.common.bizobjects.CustomPropertySupport

public class CustomPropertySupport
extends java.lang.Object

Class CustomPropertySupport for creating/deleting/modifying Custom Property Templates & Bound Values. Note : CustomProperty objects can have an empty Bound Value association.


Method Summary
 boolean areCPMapsEquivalent(com.compuware.optimaltrace.tools.common.bizobjects.CustomPropertyTemplatesMapIfc src, com.compuware.optimaltrace.tools.common.bizobjects.CustomPropertyTemplatesMapIfc dest)
          Checks the equivalent of CP maps.
 boolean areTemplateListsEquivalent(CustomPropertyTemplateListIfc src, CustomPropertyTemplateListIfc dest)
          Checks the equivalent of template lists.
 void copyTableHolderList(CustomPropertyTemplatesMapHolderIfc holder, com.compuware.optimaltrace.tools.common.bizobjects.CustomPropertyTemplatesMapIfc oldMap, com.compuware.optimaltrace.tools.common.bizobjects.CustomPropertyTemplatesMapIfc newMap)
          Copies the table holder list.
 void createCustomProperties(CustomPropertyHolderIfc propertyHolder)
          Creates a set of CustomProperty's for the associated templates, based on the property holder's type (found through CustomPropertyTemplatesMap).
 void createCustomProperties(CustomPropertyHolderIfc propertyHolder, CustomPropertyTemplateListIfc templateList)
          Creates the custom properties.
 void createCustomProperties(CustomPropertyHolderIfc propertyHolder, ProjectIfc project)
          Creates the custom properties.
 void createCustomPropertiesForNewTemplate(CustomPropertyTemplateIfc template, CustomPropertyTemplateListIfc templateList)
          Creates the new custom property objects for this customer property template.
 void createCustomPropertiesForTemplate(CustomPropertyTemplateIfc template, CustomPropertyTemplateListIfc templateList)
          Creates the new custom property objects corresponding to a custom propety template for any CPHolders that don't already have a CP for this template.
 CustomPropertyTemplateIfc createCustomPropertyTemplate(CustomPropertyTemplateListIfc templateList)
          Creates the corresponding custom property template.
 CustomPropertyTemplateIfc createCustomPropertyTemplate(java.lang.String name, java.lang.String definition, java.lang.String defaultValue, CustomPropertyTemplateListIfc templateList)
          Creates the corresponding CustomProperty.
 void deleteBoundPropertyValue(com.compuware.optimaltrace.tools.common.bizobjects.BoundPropertyValueIfc boundValue, CustomPropertyTemplateIfc template)
          Deletes the bound value from CustomProperty objects referencing it, removing the templates bound value.
 void deleteCustomProperties(CustomPropertyHolderIfc propertyHolder)
          Removes all custom properties/bucket from a property holder.
 void deleteCustomPropertyTemplate(CustomPropertyTemplateIfc template, CustomPropertyTemplateListIfc templateList)
          Deletes the associated CustomProperty/BoundPropertyValue from the property handlers, removing the default BoundPRopertyValue, BoundPropertyValues, BoundPropertyValueBucket.
 void deleteCustomPropertyTemplateMap(CustomPropertyTemplatesMapHolderIfc mapHolder, com.compuware.optimaltrace.tools.common.bizobjects.CustomPropertyTemplatesMapIfc map)
          Deletes the custom property template.
 void disInheritCustomPropertyTemplatesMap(CustomPropertyTemplatesMapHolderIfc holder)
          Disables the inherit custom property templates map.
 void disInheritCustomPropertyTemplatesMapForPaste(CustomPropertyTemplatesMapHolderIfc holder, UseCasePackageIfc originalPackage)
          Disables the inherit custom property templates map for paste.
 java.util.List findAllBizObjectsForTemplate(com.compuware.optimaltrace.tools.common.bizobjects.CustomPropertyTemplatesMapIfc map, java.lang.String typeId)
          Finds all biz objects for this template.
 java.util.List findAllMapHoldersForMap(com.compuware.optimaltrace.tools.common.bizobjects.CustomPropertyTemplatesMapIfc map)
          Finds all map holders for this map.
 com.compuware.optimaltrace.tools.common.bizobjects.CustomPropertyIfc getCustomProperty(CustomPropertyHolderIfc holder, java.lang.String customPropertyName)
          Gets the custom property.
 CustomPropertyTemplateListIfc getCustomPropertyTemplates(CustomPropertyHolderIfc holder)
          Gets the custom property templates.
 com.compuware.optimaltrace.tools.common.bizobjects.CustomPropertyTemplatesMapIfc getCustomPropertyTemplatesMap(CustomPropertyHolderIfc holder)
          Gets the custom property templates map.
 java.util.List getInheritingPackages(CustomPropertyTemplatesMapHolderIfc mapHolder)
          Gets the inherit packages.
static CustomPropertySupport getInstance()
          Gets the instance of this custom property support.
 CustomPropertyTemplatesMapHolderIfc getMapHolder(BizObjectIfc cpHolder)
          Gets the map holder.
 void inheritCustomPropertyTemplatesMap(CustomPropertyTemplatesMapHolderIfc holder)
          Inherits the custom property templates map.
 void inheritCustomPropertyTemplatesMapForPaste(CustomPropertyTemplatesMapHolderIfc holder, UseCasePackageIfc destPackage)
          Inherits the custom property templates map for paste.
 void initalizeCustomPropertiesWithDefaultValue(ProjectIfc project)
          Sets the default template value on all custom properties in a project whose template has been marked as needing to apply the default to all properties.
 void initialiseTableHolderCPs(com.compuware.optimaltrace.tools.common.bizobjects.CustomPropertyTemplatesMapIfc tempMap, com.compuware.optimaltrace.framework.ui.table.TableHolderListIfc newTableHolderList)
          Initializes the table holder CPs.
 void setCustomPropertyTemplatesMap(com.compuware.optimaltrace.tools.common.bizobjects.CustomPropertyTemplatesMapIfc newMap, BizObjectIfc bizObject)
          Sets the custom property templates map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static CustomPropertySupport getInstance()
Gets the instance of this custom property support.

Returns:
CustomPropertySupport

createCustomPropertyTemplate

public CustomPropertyTemplateIfc createCustomPropertyTemplate(CustomPropertyTemplateListIfc templateList)
Creates the corresponding custom property template.

Parameters:
templateList -
Returns:
CustomPropertyTemplateIfc

createCustomPropertyTemplate

public CustomPropertyTemplateIfc createCustomPropertyTemplate(java.lang.String name,
                                                              java.lang.String definition,
                                                              java.lang.String defaultValue,
                                                              CustomPropertyTemplateListIfc templateList)
Creates the corresponding CustomProperty.

Parameters:
name -
definition -
defaultValue -
templateList -
Returns:
CustomPropertyTemplateIfc

createCustomPropertiesForNewTemplate

public void createCustomPropertiesForNewTemplate(CustomPropertyTemplateIfc template,
                                                 CustomPropertyTemplateListIfc templateList)
Creates the new custom property objects for this customer property template.

Parameters:
template -
templateList -

createCustomPropertiesForTemplate

public void createCustomPropertiesForTemplate(CustomPropertyTemplateIfc template,
                                              CustomPropertyTemplateListIfc templateList)
Creates the new custom property objects corresponding to a custom propety template for any CPHolders that don't already have a CP for this template.

Parameters:
template -
templateList -

deleteCustomPropertyTemplateMap

public void deleteCustomPropertyTemplateMap(CustomPropertyTemplatesMapHolderIfc mapHolder,
                                            com.compuware.optimaltrace.tools.common.bizobjects.CustomPropertyTemplatesMapIfc map)
Deletes the custom property template.

Parameters:
mapHolder -
map -

deleteCustomPropertyTemplate

public void deleteCustomPropertyTemplate(CustomPropertyTemplateIfc template,
                                         CustomPropertyTemplateListIfc templateList)
Deletes the associated CustomProperty/BoundPropertyValue from the property handlers, removing the default BoundPRopertyValue, BoundPropertyValues, BoundPropertyValueBucket.

Parameters:
template -
templateList -

deleteBoundPropertyValue

public void deleteBoundPropertyValue(com.compuware.optimaltrace.tools.common.bizobjects.BoundPropertyValueIfc boundValue,
                                     CustomPropertyTemplateIfc template)
Deletes the bound value from CustomProperty objects referencing it, removing the templates bound value.

Parameters:
boundValue -
template -

createCustomProperties

public void createCustomProperties(CustomPropertyHolderIfc propertyHolder)
Creates a set of CustomProperty's for the associated templates, based on the property holder's type (found through CustomPropertyTemplatesMap). This is a Factory helper method used to complete creation of a biz object that's a PropertyHolderIfc.

Parameters:
propertyHolder -

createCustomProperties

public void createCustomProperties(CustomPropertyHolderIfc propertyHolder,
                                   CustomPropertyTemplateListIfc templateList)
Creates the custom properties.

Parameters:
propertyHolder -
templateList -

createCustomProperties

public void createCustomProperties(CustomPropertyHolderIfc propertyHolder,
                                   ProjectIfc project)
Creates the custom properties.

Parameters:
propertyHolder -
project -

deleteCustomProperties

public void deleteCustomProperties(CustomPropertyHolderIfc propertyHolder)
Removes all custom properties/bucket from a property holder.

Parameters:
propertyHolder -

initalizeCustomPropertiesWithDefaultValue

public void initalizeCustomPropertiesWithDefaultValue(ProjectIfc project)
Sets the default template value on all custom properties in a project whose template has been marked as needing to apply the default to all properties.

Parameters:
project -

getCustomProperty

public com.compuware.optimaltrace.tools.common.bizobjects.CustomPropertyIfc getCustomProperty(CustomPropertyHolderIfc holder,
                                                                                              java.lang.String customPropertyName)
Gets the custom property.

Parameters:
holder -
customPropertyName -
Returns:
CustomPropertyIfc

getCustomPropertyTemplates

public CustomPropertyTemplateListIfc getCustomPropertyTemplates(CustomPropertyHolderIfc holder)
Gets the custom property templates.

Parameters:
holder -
Returns:
CustomPropertyIfc

getCustomPropertyTemplatesMap

public com.compuware.optimaltrace.tools.common.bizobjects.CustomPropertyTemplatesMapIfc getCustomPropertyTemplatesMap(CustomPropertyHolderIfc holder)
Gets the custom property templates map.

Parameters:
holder -
Returns:
CustomPropertyTemplatesMapIfc

setCustomPropertyTemplatesMap

public void setCustomPropertyTemplatesMap(com.compuware.optimaltrace.tools.common.bizobjects.CustomPropertyTemplatesMapIfc newMap,
                                          BizObjectIfc bizObject)
Sets the custom property templates map. This method takes a bizObject and re-defines its custom properties in accordance with the CustomPropertyTemplateMap passed in as a parameter. It then recurses than through all children of the bizObject and does the same. Any children that have their own CustomPropertyTemplateMap are not considered.

Parameters:
newMap -
bizObject -

findAllMapHoldersForMap

public java.util.List findAllMapHoldersForMap(com.compuware.optimaltrace.tools.common.bizobjects.CustomPropertyTemplatesMapIfc map)
Finds all map holders for this map.

Parameters:
map -
Returns:
List

findAllBizObjectsForTemplate

public java.util.List findAllBizObjectsForTemplate(com.compuware.optimaltrace.tools.common.bizobjects.CustomPropertyTemplatesMapIfc map,
                                                   java.lang.String typeId)
Finds all biz objects for this template.

Parameters:
map -
typeId -
Returns:
List

areTemplateListsEquivalent

public boolean areTemplateListsEquivalent(CustomPropertyTemplateListIfc src,
                                          CustomPropertyTemplateListIfc dest)
Checks the equivalent of template lists.

Parameters:
src -
dest -
Returns:
boolean

areCPMapsEquivalent

public boolean areCPMapsEquivalent(com.compuware.optimaltrace.tools.common.bizobjects.CustomPropertyTemplatesMapIfc src,
                                   com.compuware.optimaltrace.tools.common.bizobjects.CustomPropertyTemplatesMapIfc dest)
Checks the equivalent of CP maps.

Parameters:
src -
dest -
Returns:
boolean

inheritCustomPropertyTemplatesMap

public void inheritCustomPropertyTemplatesMap(CustomPropertyTemplatesMapHolderIfc holder)
Inherits the custom property templates map.

Parameters:
holder -

getMapHolder

public CustomPropertyTemplatesMapHolderIfc getMapHolder(BizObjectIfc cpHolder)
Gets the map holder.

Parameters:
cpHolder -
Returns:
CustomPropertyTemplatesMapHolderIfc

disInheritCustomPropertyTemplatesMapForPaste

public void disInheritCustomPropertyTemplatesMapForPaste(CustomPropertyTemplatesMapHolderIfc holder,
                                                         UseCasePackageIfc originalPackage)
Disables the inherit custom property templates map for paste.

Parameters:
holder -
originalPackage -

inheritCustomPropertyTemplatesMapForPaste

public void inheritCustomPropertyTemplatesMapForPaste(CustomPropertyTemplatesMapHolderIfc holder,
                                                      UseCasePackageIfc destPackage)
Inherits the custom property templates map for paste.

Parameters:
holder -
destPackage -

disInheritCustomPropertyTemplatesMap

public void disInheritCustomPropertyTemplatesMap(CustomPropertyTemplatesMapHolderIfc holder)
Disables the inherit custom property templates map.

Parameters:
holder -

copyTableHolderList

public void copyTableHolderList(CustomPropertyTemplatesMapHolderIfc holder,
                                com.compuware.optimaltrace.tools.common.bizobjects.CustomPropertyTemplatesMapIfc oldMap,
                                com.compuware.optimaltrace.tools.common.bizobjects.CustomPropertyTemplatesMapIfc newMap)
Copies the table holder list.

Parameters:
holder -
oldMap -
newMap -

initialiseTableHolderCPs

public void initialiseTableHolderCPs(com.compuware.optimaltrace.tools.common.bizobjects.CustomPropertyTemplatesMapIfc tempMap,
                                     com.compuware.optimaltrace.framework.ui.table.TableHolderListIfc newTableHolderList)
Initializes the table holder CPs.

Parameters:
tempMap -
newTableHolderList -

getInheritingPackages

public java.util.List getInheritingPackages(CustomPropertyTemplatesMapHolderIfc mapHolder)
Gets the inherit packages.

Parameters:
mapHolder -
Returns:
List

OptimalTrace
5.2

Compuware Corporation

OptimalTrace is a trademark or registered trademark of Compuware Corporation in the US and other countries.
Copyright 2008-2009 Compuware Corporation. One Campus Martius,
Detroit, Michigan, 48226, U.S.A. All Rights Reserved.