com.bea.content.indexer
Class IndexerRunner

java.lang.Object
  extended by com.bea.content.indexer.IndexerRunner

public class IndexerRunner
extends Object

The IndexRunner provides client side access to the indexing methods of the ISearchManager. Content nodes can be indexed starting with a path or all nodes of a given type can be indexed. This class can also be used programatically within other client-side code.

IndexRunner can be run from the command line. Portal ships with a command/shell script to facilitate this: see "index_cm_data.cmd" or "index_cm_data.sh". For usage, type: index_cm_data -help

The following configuration parameters may be specified either on the command line, or in a cm_indexer.properties file. Here is an example that uses clear text for the user/password combination (more secure configuration parameters are noted below):

 verbose=true
 user=weblogic
 password=weblogic
 url=t3://localhost:7001
 repository=BEA_ExtendedRepository
 application=myApplication
 type=book
 

Example usages of the index_cm_data script:

Configuration parameters:

Communication with the WebLogic server must be done in a secure manner, so either the user/password must be supplied, or the userconfigfile/keyconfigfile must be specified. The user must be in the role of either66 Admin or PortalSystemAdministrator. NOTE: Using a clear text user/password as either a command line argument or in the cm_indexer.properties is not secure. For more security, you could use the userconfigfile and userkeyfile options instead. More information on specifying user credentials via these files is here .


Field Summary
static String JNDI_FACTORY
          Defines the JNDI context factory used when loading the Indexer EJB.
protected static com.bea.content.repo.i18n.IndexerExceptionTextFormatter textFormatter
           
 
Constructor Summary
IndexerRunner()
           
 
Method Summary
 String getApplication()
          Gets the name of the enterprise application.
 String getJndiName()
          Gets the JNDI name used to look up the Indexer EJB.
 String getPassword()
          Gets the password that is used when looking up the Indexer EJB.
 String getPath()
          Gets the node path.
 String getRepository()
          Gets the repository name.
 String getType()
          Gets the type name.
 String getUrl()
          URL used to lookup the Indexer EJB.
 String getUser()
          Gets the user name that is used when looking up the Indexer EJB.
 void index()
          Performs indexing based on the parameters set on this IndexerRunner.
 void info(String mesg)
          Output an info message.
static void main(String[] args)
           
 void setApplication(String application)
          Sets the name of the enterprise application.
 void setPassword(String password)
          Sets the password that is used when looking up the Indexer EJB.
 void setPath(String path)
          Sets the node path.
 void setPingTimeout(int timeout)
          This one is from command line
 void setRepository(String repository)
          Sets the repository name.
 void setType(String type)
          Sets the type name.
 void setUrl(String url)
          URL used to lookup the Indexer EJB.
 void setUser(String user)
          Sets the user name that is used when looking up the Indexer EJB.
 void setVerbose(boolean verbose)
           
 void usage()
          Print the usage of the application.
 void usage(PrintWriter out)
          Print the usage of the application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

textFormatter

protected static final com.bea.content.repo.i18n.IndexerExceptionTextFormatter textFormatter

JNDI_FACTORY

public static final String JNDI_FACTORY
Defines the JNDI context factory used when loading the Indexer EJB.

See Also
Constants Summary
Constructor Detail

IndexerRunner

public IndexerRunner()
Method Detail

setPingTimeout

public void setPingTimeout(int timeout)
This one is from command line


setVerbose

public void setVerbose(boolean verbose)

getUser

public String getUser()
Gets the user name that is used when looking up the Indexer EJB.

Returns
the user name

setUser

public void setUser(String user)
Sets the user name that is used when looking up the Indexer EJB.

Parameters
user - the user name

getPassword

public String getPassword()
Gets the password that is used when looking up the Indexer EJB.

Returns
the password.

setPassword

public void setPassword(String password)
Sets the password that is used when looking up the Indexer EJB.

Parameters
password -

getUrl

public String getUrl()
URL used to lookup the Indexer EJB.

Returns
the URL

setUrl

public void setUrl(String url)
URL used to lookup the Indexer EJB.

Parameters
url - the URL

getApplication

public String getApplication()
Gets the name of the enterprise application.

Returns
the enterprise application name

setApplication

public void setApplication(String application)
Sets the name of the enterprise application.

Parameters
application - the enterprise application name

getJndiName

public String getJndiName()
Gets the JNDI name used to look up the Indexer EJB.

Returns
the JNDI name

getRepository

public String getRepository()
Gets the repository name.

Returns
the repository name.

setRepository

public void setRepository(String repository)
Sets the repository name.

Parameters
repository - the repository name.

getType

public String getType()
Gets the type name.

Returns
the type name.

setType

public void setType(String type)
Sets the type name.

Parameters
type - the type name.

getPath

public String getPath()
Gets the node path.

Returns
the node path.

setPath

public void setPath(String path)
Sets the node path.

Parameters
path - the node path.

index

public void index()
           throws IndexerRunnerException
Performs indexing based on the parameters set on this IndexerRunner.

Throws
IndexerRunnerException

usage

public void usage()
Print the usage of the application.


usage

public void usage(PrintWriter out)
Print the usage of the application.


info

public void info(String mesg)
Output an info message.


main

public static void main(String[] args)


Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.