com.ptc.windchill.enterprise.search
Class MigrateSavedSearchCriteria.Server

java.lang.Object
  extended bycom.ptc.windchill.enterprise.search.MigrateSavedSearchCriteria.Server
All Implemented Interfaces:
RemoteAccess
Enclosing class:
MigrateSavedSearchCriteria

public static class MigrateSavedSearchCriteria.Server
extends Object
implements RemoteAccess


Field Summary
 
Fields inherited from interface wt.method.RemoteAccess
versionID
 
Constructor Summary
MigrateSavedSearchCriteria.Server()
           
 
Method Summary
private static Map buildCriteriaForSimpleSearch(Map criteria, Map migratedCriteria)
          Builds criteriaMap for simple search page.
private static Element buildElementForQueryBuilder(HashMap criteriaMap, Class attType, String attName, String attQueryName, String pickerType, String ufidAtt, String displayKey, String searchTermProducer, String searchClass, String displayName)
          Builds an IE element for the given attribute
private static Element buildSoftTypeElementForQueryBuilder(String attName, String attValue, Class attType, String searchClass)
          Builds an IE element from the given soft attribute name and value
private static ArrayList checkForSoftAttributes(ArrayList criteriaElements, String objectType, String whereClause, Locale locale)
          Checks the where clause for any soft attributes that weren't in the criteria map.
private static ArrayList getListOfSimpleSearchAttributes()
          Returns list of attributes available on the simple search page.
static Boolean migrateData()
          Querys for all SavedQuery objects and sends each object through updateSearchCriteria(SavedQuery query)
private static void updateSearchCriteria(SavedQuery query)
          Takes a SavedQuery object as an input and manipulates the criteria attribute to make it executable on the 8.0 query builder search page
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MigrateSavedSearchCriteria.Server

public MigrateSavedSearchCriteria.Server()
Method Detail

migrateData

public static Boolean migrateData()
                           throws WTException,
                                  WTPropertyVetoException
Querys for all SavedQuery objects and sends each object through updateSearchCriteria(SavedQuery query)

Throws:
WTException
WTPropertyVetoException

updateSearchCriteria

private static void updateSearchCriteria(SavedQuery query)
                                  throws WTException,
                                         WTPropertyVetoException
Takes a SavedQuery object as an input and manipulates the criteria attribute to make it executable on the 8.0 query builder search page

Throws:
WTException
WTPropertyVetoException

checkForSoftAttributes

private static ArrayList checkForSoftAttributes(ArrayList criteriaElements,
                                                String objectType,
                                                String whereClause,
                                                Locale locale)
                                         throws WTException
Checks the where clause for any soft attributes that weren't in the criteria map.

Throws:
WTException

buildSoftTypeElementForQueryBuilder

private static Element buildSoftTypeElementForQueryBuilder(String attName,
                                                           String attValue,
                                                           Class attType,
                                                           String searchClass)
                                                    throws WTException
Builds an IE element from the given soft attribute name and value

Throws:
WTException

buildElementForQueryBuilder

private static Element buildElementForQueryBuilder(HashMap criteriaMap,
                                                   Class attType,
                                                   String attName,
                                                   String attQueryName,
                                                   String pickerType,
                                                   String ufidAtt,
                                                   String displayKey,
                                                   String searchTermProducer,
                                                   String searchClass,
                                                   String displayName)
                                            throws WTException
Builds an IE element for the given attribute

Throws:
WTException

buildCriteriaForSimpleSearch

private static Map buildCriteriaForSimpleSearch(Map criteria,
                                                Map migratedCriteria)
                                         throws WTException
Builds criteriaMap for simple search page. This is needed for a 7.0 search that is of type Persistable.

Throws:
WTException

getListOfSimpleSearchAttributes

private static ArrayList getListOfSimpleSearchAttributes()
                                                  throws WTException
Returns list of attributes available on the simple search page. Not all 7.0 attributes on the 'All Search' page are available on the simple search page in 8.0 (i.e. created by, modified by, owned by)

Throws:
WTException