com.ptc.windchill.enterprise.change2.tableViews.list
Class AbstractListChangeItemTableViews

java.lang.Object
  extended by com.ptc.core.htmlcomp.tableview.AbstractConfigurableTable
      extended by com.ptc.core.htmlcomp.components.JCAConfigurableTable
          extended by com.ptc.windchill.enterprise.change2.tableViews.ChangeTableViews
              extended by com.ptc.windchill.enterprise.change2.tableViews.list.AbstractListChangeItemTableViews
All Implemented Interfaces:
com.ptc.core.htmlcomp.components.JCAMappable, com.ptc.core.htmlcomp.tableview.ConfigurableTable
Direct Known Subclasses:
ListChangeNoticesTableViews, ListChangeRequestsTableViews, ListProblemReportsTableViews

public abstract class AbstractListChangeItemTableViews
extends ChangeTableViews

Abstract class to support the view definitions of the Change tables which appear under the change tab. This class currently supports the Problem Reports, Change Requests and Change Notices tables however could be subclasses to support additional tables. These table view classes would be called by the listChangeItems.xml TAG.

Supported API: true

Extendable: true


Method Summary
abstract  Class[] getClassTypes()
          Method to get an Array of Class types for the table views.
 String getDefaultSortColumn()
          Method to get the default column to sort on table views.
protected abstract  String getDefaultViewDescription(String viewName)
          Provide the description for the default view.
protected  String getGeneratedDefaultViewDescription(String type, String viewName)
          Provide the generated description for a specific view and type.
 String getGeneratedViewName(String type, String viewName)
          Provide the generated name for a specific view and type.
abstract  String getLabel(Locale locale)
          Provide a label that describes the table which these table views belong.
protected  List<String> getLockedColumns()
          Retrieve the locked columns for the table view.
protected  com.ptc.core.htmlcomp.tableview.TableViewCriterion getNonResolvedCriteria()
          Criteria for the non-resolved change objects.
abstract  String getOOTBActiveViewName()
          Provide the out of the box active view name.
 List getOOTBTableViews(String tableId, Locale locale)
          Sets the default table view and returns a list of out of the box table views.
abstract  String getOOTBViewName(String viewName)
          Provide the out of the box view name for the defined view name.
 
Methods inherited from class com.ptc.windchill.enterprise.change2.tableViews.ChangeTableViews
createCommonTableViews, createTableView, getChangeableClasses, isColumnLocked, setDefaultSortColumnOrder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getClassTypes

public abstract Class[] getClassTypes()
Method to get an Array of Class types for the table views.

Supported API: true

Specified by:
getClassTypes in class ChangeTableViews
Returns:
Class[] Returns an Array of Class types for the table views.

getOOTBTableViews

public List getOOTBTableViews(String tableId,
                              Locale locale)
                       throws WTException
Sets the default table view and returns a list of out of the box table views. The following views will be created:
  1. All Open
  2. Created by Me
  3. Last 7 days
  4. Last 30 days
  5. Last 90 days


Supported API: true

Specified by:
getOOTBTableViews in class ChangeTableViews
Parameters:
tableId - Passes in the table id
locale - Passes in the Locale
Returns:
result Return a list of out of the box table views.
Throws:
WTException

getNonResolvedCriteria

protected com.ptc.core.htmlcomp.tableview.TableViewCriterion getNonResolvedCriteria()
                                                                             throws WTException
Criteria for the non-resolved change objects. By default, for Problem Reports, Change Requests and Change Notices the criteria will be to look for the "resolutionDate" as empty. Other objects (or different support) can be implemented by overloading this API.

Supported API: true

Throws:
WTException

getOOTBActiveViewName

public abstract String getOOTBActiveViewName()
Provide the out of the box active view name.

Supported API: true

Overrides:
getOOTBActiveViewName in class ChangeTableViews
Returns:
String The active view name

getOOTBViewName

public abstract String getOOTBViewName(String viewName)
Provide the out of the box view name for the defined view name.

Supported API: true

Parameters:
viewName - The name of the view (for example "ALL_OPEN")
Returns:
the string representing the view
See Also:
getGeneratedViewName(String,String)

getGeneratedViewName

public String getGeneratedViewName(String type,
                                   String viewName)
Provide the generated name for a specific view and type. Will attempt to retrieve the view name from the listResource using the form: <type>_<viewName>_NAME. If this resource does not exist it will look for a resource entry for: <viewName>_NAME. Finally if this is not resolved the view name will be returned as the fully qualified path to the resource bundle listResource plus the viewName and the text _NAME on the end.

Supported API: true

Parameters:
type - The text "type" to check for in the resource bundle. An example might be CHANGE_REQUEST.
viewName - The name of the view to get the generated view name for. For example ALL_OPEN.
Returns:
the Generated view name string.

getDefaultSortColumn

public String getDefaultSortColumn()
Method to get the default column to sort on table views.

Supported API: true

Overrides:
getDefaultSortColumn in class ChangeTableViews
Returns:
String Returns the default column to sort on table views.

getDefaultViewDescription

protected abstract String getDefaultViewDescription(String viewName)
Provide the description for the default view.

Supported API: true

Overrides:
getDefaultViewDescription in class ChangeTableViews
Parameters:
viewName - The locale for the description.
Returns:
String The default description for the view.

getGeneratedDefaultViewDescription

protected String getGeneratedDefaultViewDescription(String type,
                                                    String viewName)
Provide the generated description for a specific view and type. The view name is typically encoded at this point from the output of getGeneratedViewName( ) so several operations are required to be perform on the view in order for the description to be determined correctly. The implemented getDefaultViewDescription() should simply call this method by assigning the type in any subclass.
Will attempt to retrieve the view description from the listResource using the form: <type>_<short_viewName>_DESCRIPTION. If this resource does not exist it will look for a resource entry for: <viewName>_DESCRIPTION. Finally if this is not resolved the view description will be returned as the fully qualified path to the resource bundle listResource plus the viewName and the text _DESCRIPTION on the end.

Supported API: true

Parameters:
type - The text "type" to check for in the resource bundle. An example might be CHANGE_REQUEST.
viewName - The name of the view to get the generated view description for.
Returns:
the Generated view description string.
See Also:
getDefaultViewDescription(String), getGeneratedViewName(String,String)

getLockedColumns

protected List<String> getLockedColumns()
Retrieve the locked columns for the table view.

Supported API: true

Specified by:
getLockedColumns in class ChangeTableViews
Returns:
Map Ordered Map of column Ids and whether it is locked.

getLabel

public abstract String getLabel(Locale locale)
Provide a label that describes the table which these table views belong.

Supported API: true

Specified by:
getLabel in class ChangeTableViews
Parameters:
locale - Passes in the Locale
Returns:
String Returns the label for the table views.