com.ptc.windchill.index.rware
Class RwareServletHelper

java.lang.Object
  extended bycom.ptc.windchill.index.rware.RwareServletHelper

public class RwareServletHelper
extends Object

This class is a helper class for Rware.

Supported API: false

Extendable: false


Field Summary
private static int cacheNumber
           
private static String DO_MAX_DOCS_PER_LIB_PROPERTY
           
private static String EXPANSION_LEVEL_PROPERTY
           
private static String loginError
           
private static String MAX_DOCS_PROPERTY
           
private static String MAX_REG_EXPR_PROPERTY
           
private static String MAX_SEARCH_TIME_PROPERTY
           
private static String MIN_MAX_HIT_PROPERTY
           
private static int numberOfConnections
           
private static String PERSIST_OID_FIELD
           
private static String QUERY_TYPE
           
private static boolean secure
           
private  ServletConstants servletConstants
          

Supported API: false

Extendable: false
private static com.convera.hl.RWLoginSession[] sessions
           
private static String SET_LANGUAGE_PROPERTY
           
private static Vector supportedRwareDocs
           
 
Constructor Summary
RwareServletHelper(ServletConstants sc)
          Default Constructor.
 
Method Summary
private  Hashtable addHitRankings(com.convera.hl.RWResultDoc result, Hashtable oldResult, String ufid)
           
private  HashMap buildLibraryCache(com.convera.hl.RWLoginSession session)
          This method gets all of the libraries defined in an Rware application based on the session and it returns the display name of the libraries

Supported API: false
private static void checkCartridges(com.convera.hl.RWLoginSession session)
           
private  com.convera.hl.RWQuery executeQuery(com.convera.hl.RWQuery query)
          Execute the query.
 HashMap getLibraryCache()
           
static String getRwareSupportedDocumentTypes(String rwarePath)
           
private  com.convera.hl.RWLoginSession getRWSession()
           
 Vector getSearchableFields()
          This method returns the names of all of the available fields that are searchable

Supported API: false
 boolean indexFile(Hashtable[] index, String library, boolean delete)
          This method creates, updates or deletes an Index in Rware of a Windchill Business Object

Supported API: false
private  void initializeRwareConnection(int connections)
          This method creates the connections and returns the different items that are cached for later use

Supported API: false
private  boolean isValidLibrary(String libraryName)
          This method creates, updates or deletes an Index in Rware of a Windchill Business Object

Supported API: false
private  com.convera.hl.RWLoginSession loginToRware()
           
 Hashtable performSearch(String searchString, String[] contentLibraries, Hashtable queryPrefs, Hashtable searchFields, String[] prefetchFields, ArrayList arrClassList, String strGetHitRankings)
          This method creates, updates or deletes an Index in Rware of a Windchill Business Object

Supported API: false
private static void printLibraryFields(com.convera.hl.RWLibrary[] libraries)
          This method is for informational purposes only and prints out the fields for each library provided

Supported API: false
private  Hashtable processQuery(com.convera.hl.RWQuery query, String[] prefetchFields, ArrayList classList, String getHitRankings)
          Methos signature changed....
 boolean setServletConstants(ServletConstants sc)
           
private  com.convera.hl.RWQuery setUpQuery(String searchString, String[] contentLibraries, Hashtable queryPrefs, Hashtable searchFields, String[] prefetchFields)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

loginError

private static String loginError

sessions

private static com.convera.hl.RWLoginSession[] sessions

cacheNumber

private static int cacheNumber

PERSIST_OID_FIELD

private static final String PERSIST_OID_FIELD
See Also:
Constant Field Values

secure

private static boolean secure

numberOfConnections

private static int numberOfConnections

supportedRwareDocs

private static Vector supportedRwareDocs

MAX_SEARCH_TIME_PROPERTY

private static String MAX_SEARCH_TIME_PROPERTY

QUERY_TYPE

private static String QUERY_TYPE

EXPANSION_LEVEL_PROPERTY

private static String EXPANSION_LEVEL_PROPERTY

MAX_DOCS_PROPERTY

private static String MAX_DOCS_PROPERTY

MIN_MAX_HIT_PROPERTY

private static String MIN_MAX_HIT_PROPERTY

SET_LANGUAGE_PROPERTY

private static String SET_LANGUAGE_PROPERTY

DO_MAX_DOCS_PER_LIB_PROPERTY

private static String DO_MAX_DOCS_PER_LIB_PROPERTY

MAX_REG_EXPR_PROPERTY

private static String MAX_REG_EXPR_PROPERTY

servletConstants

private ServletConstants servletConstants


Supported API: false

Extendable: false

Constructor Detail

RwareServletHelper

public RwareServletHelper(ServletConstants sc)
Default Constructor.

Supported API: false

Method Detail

checkCartridges

private static void checkCartridges(com.convera.hl.RWLoginSession session)
                             throws com.convera.hl.RWException
Throws:
com.convera.hl.RWException

isValidLibrary

private boolean isValidLibrary(String libraryName)
                        throws RwareInterfaceException
This method creates, updates or deletes an Index in Rware of a Windchill Business Object

Supported API: false

Parameters:
libraryName - - String - The library name to check to ensure this exists in session
Throws:
com.convera.hl.RWException - - This is thrown for the following reasons. 1.
RwareInterfaceException

buildLibraryCache

private HashMap buildLibraryCache(com.convera.hl.RWLoginSession session)
                           throws com.convera.hl.RWException
This method gets all of the libraries defined in an Rware application based on the session and it returns the display name of the libraries

Supported API: false

Parameters:
session - - RWLoginSession - The session for which the libraries exist within
Throws:
com.convera.hl.RWException - - This is thrown for the following reasons. 1.

printLibraryFields

private static void printLibraryFields(com.convera.hl.RWLibrary[] libraries)
This method is for informational purposes only and prints out the fields for each library provided

Supported API: false

Parameters:
libraries - - RWLibrary [] - The set of libraries to print the fields from

getSearchableFields

public Vector getSearchableFields()
                           throws RwareInterfaceException
This method returns the names of all of the available fields that are searchable

Supported API: false

Throws:
RwareInterfaceException

getLibraryCache

public HashMap getLibraryCache()
                        throws RwareInterfaceException
Throws:
RwareInterfaceException

loginToRware

private com.convera.hl.RWLoginSession loginToRware()
                                            throws com.convera.hl.RWBadFileException,
                                                   com.convera.hl.RWNotFoundException,
                                                   com.convera.hl.RWLoginFailedException
Throws:
com.convera.hl.RWBadFileException
com.convera.hl.RWNotFoundException
com.convera.hl.RWLoginFailedException

getRWSession

private com.convera.hl.RWLoginSession getRWSession()
                                            throws com.convera.hl.RWException
Throws:
com.convera.hl.RWException

initializeRwareConnection

private void initializeRwareConnection(int connections)
                                throws com.convera.hl.RWException
This method creates the connections and returns the different items that are cached for later use

Supported API: false

Parameters:
connections - - A value that determine the number of active connections to create to Rware
Throws:
com.convera.hl.RWException - - This is thrown for the following reasons. 1. Invalid login to Rware

indexFile

public boolean indexFile(Hashtable[] index,
                         String library,
                         boolean delete)
                  throws RwareInterfaceException
This method creates, updates or deletes an Index in Rware of a Windchill Business Object

Supported API: false

Parameters:
index - - Hashtable[] - An array of Hashtables of values to be indexed against a certain Rware application
delete - - boolean - A value that indicates whehter or not the index is to be deleted
Throws:
com.convera.hl.RWException - - This is thrown for the following reasons. 1. Invalid library defined 2. Error during the submitting of the index batch 3. The connections might have returned an error
RwareInterfaceException

performSearch

public Hashtable performSearch(String searchString,
                               String[] contentLibraries,
                               Hashtable queryPrefs,
                               Hashtable searchFields,
                               String[] prefetchFields,
                               ArrayList arrClassList,
                               String strGetHitRankings)
                        throws RwareInterfaceException
This method creates, updates or deletes an Index in Rware of a Windchill Business Object

Supported API: false

Throws:
com.convera.hl.RWException - - This is thrown for the following reasons. 1. Invalid library defined 2. Error during the submitting of the index batch 3. The connections might have returned an error
RwareInterfaceException

setUpQuery

private com.convera.hl.RWQuery setUpQuery(String searchString,
                                          String[] contentLibraries,
                                          Hashtable queryPrefs,
                                          Hashtable searchFields,
                                          String[] prefetchFields)
                                   throws com.convera.hl.RWException
Throws:
com.convera.hl.RWException

executeQuery

private com.convera.hl.RWQuery executeQuery(com.convera.hl.RWQuery query)
                                     throws com.convera.hl.RWException
Execute the query.

Throws:
RwareInterfaceException - If an error occurred executing the query.
com.convera.hl.RWException

processQuery

private Hashtable processQuery(com.convera.hl.RWQuery query,
                               String[] prefetchFields,
                               ArrayList classList,
                               String getHitRankings)
                        throws com.convera.hl.RWException
Methos signature changed.... added ClassList...

Parameters:
query -
prefetchFields -
classList -
Returns:
Throws:
com.convera.hl.RWException

getRwareSupportedDocumentTypes

public static String getRwareSupportedDocumentTypes(String rwarePath)
                                             throws IOException
Throws:
IOException

setServletConstants

public boolean setServletConstants(ServletConstants sc)

addHitRankings

private Hashtable addHitRankings(com.convera.hl.RWResultDoc result,
                                 Hashtable oldResult,
                                 String ufid)