atg.knowledgebase.adc
Class KnowledgeBaseProcessor

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.adc.pipeline.ADCPipelineProcessor
              extended by atg.adc.pipeline.AppendStringProcessor
                  extended by atg.knowledgebase.adc.KnowledgeBaseProcessor
All Implemented Interfaces:
atg.naming.AbsoluteNameable, atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameContextParentable, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.Configured, atg.nucleus.logging.ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, atg.nucleus.naming.ComponentNameResolver, atg.nucleus.Service, atg.nucleus.ServiceListener, atg.service.pipeline.PipelineProcessor, java.util.EventListener

public class KnowledgeBaseProcessor
extends atg.adc.pipeline.AppendStringProcessor

This class incorporates a dynamic javascript tag to the html page to invoke the Knowledgebase widget.

Version:
//hosting-blueprint/B2CBlueprint/main/KnowledgeBase/src/atg/knowledgebase/adc/KnowledgeBaseProcessor.java#5 $$Change: 805838 $
Author:
Gayathri Sasidharan

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected static java.lang.String ERROR_REPOSITORY
          Repository Exception.
protected  java.lang.String mSiteContextPath
           
protected  StoreSitePropertiesManager mSitePropertiesManager
           
protected static java.lang.String RQL_QUERY_BY_KEY
          RQL Query repository by key
static java.lang.String TEXT_PROPERTY_NAME
          Global constants
 
Fields inherited from class atg.adc.pipeline.ADCPipelineProcessor
MADE_CHANGE, NO_CHANGE
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.service.pipeline.PipelineProcessor
STOP_CHAIN_EXECUTION, STOP_CHAIN_EXECUTION_AND_COMMIT, STOP_CHAIN_EXECUTION_AND_ROLLBACK
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
KnowledgeBaseProcessor()
           
 
Method Summary
 java.util.List<java.lang.String> createOptionalParamsList()
          This method creates a list of optional parameters configured for the knowledge base widget.
 java.lang.String getC()
           
 java.lang.String getContext()
           
 java.lang.String getCorrection()
           
 java.lang.String getDescription()
           
 java.lang.String getDiv_id()
           
 java.lang.String getInstance_id()
           
 java.lang.String getitemDescriptorName()
           
 java.lang.String getLabel_correction()
           
 java.lang.String getLabel_documents()
           
 java.lang.String getLabel_more_results()
           
 java.lang.String getLabel_no_results()
           
 java.lang.String getLabel_related_searches()
           
 java.lang.String getLabel_search_button()
           
 java.lang.String getLocaleUrl()
          This method gets locale specific id url of the knowledge base widget from the SiteRepository
 java.lang.String getmExt_docs()
           
 java.lang.String getmModule()
           
 java.lang.String getNavigation()
           
 java.lang.String getNumber_answers()
           
 java.lang.String getP()
           
 java.lang.String getPayload_size()
           
 java.lang.String getPersist_prodcat()
           
 java.lang.String getPreprocess()
           
 java.lang.String getQ()
           
 java.lang.String getRecommended()
           
 java.lang.String getRelated()
           
 atg.repository.Repository getRepository()
           
 java.lang.String getSearch_box()
           
 java.lang.String getSiteContextPath()
           
 StoreSitePropertiesManager getSitePropertiesManager()
           
 java.lang.String getStoreText(java.lang.String textKey)
          This method gets locale specific knowledge base widget ui labels from the SiteRepository
 java.lang.String getTarget()
           
 java.lang.String getTruncate_size()
           
 java.lang.String getType()
           
 void setC(java.lang.String pC)
           
 void setContext(java.lang.String pContext)
           
 void setCorrection(java.lang.String pCorrection)
           
 void setDescription(java.lang.String pDescription)
           
 void setDiv_id(java.lang.String pDiv_id)
          The div element on your page where you want the Rightnow knowledge base search to appear
 void setExt_docs(java.lang.String pExt_docs)
           
 void setInstance_id(java.lang.String pInstance_id)
          The widget instance id for the Rightnow knowledge base search
 void setitemDescriptorName(java.lang.String pItemDescriptorName)
           
 void setLabel_correction(java.lang.String pLabel_correction)
           
 void setLabel_documents(java.lang.String pLabel_documents)
           
 void setLabel_more_results(java.lang.String pLabel_more_results)
           
 void setLabel_no_results(java.lang.String pLabel_no_results)
           
 void setLabel_related_searches(java.lang.String pLabel_related_searches)
           
 void setLabel_search_button(java.lang.String pLabel_search_button)
           
 void setModule(java.lang.String pModule)
          The widget module name for the Rightnow knowledge base search
 void setNavigation(java.lang.String pNavigation)
           
 void setNumber_answers(java.lang.String pNumber_answers)
           
 void setP(java.lang.String pP)
           
 void setPayload_size(java.lang.String pPayload_size)
           
 void setPersist_prodcat(java.lang.String pPersist_prodcat)
           
 void setPreprocess(java.lang.String pPreprocess)
           
 void setQ(java.lang.String pQ)
           
 void setRecommended(java.lang.String pRecommended)
           
 void setRelated(java.lang.String pRelated)
           
 void setRepository(atg.repository.Repository pRepository)
           
 void setSearch_box(java.lang.String pSearch_box)
           
 void setSiteContextPath(java.lang.String pSiteContextPath)
           
 void setSitePropertiesManager(StoreSitePropertiesManager pSitePropertiesManager)
           
 void setTarget(java.lang.String pTarget)
           
 void setTruncate_size(java.lang.String pTruncate_size)
           
 void setType(java.lang.String pType)
          The widget type id for the Rightnow knowledge base search
 int updateADCData(atg.adc.pipeline.ADCPipelineArgs pArgs)
          This method will append both the mandatory and optional parameters to the response stream.It also appends the locale specific url to the knowledge base widget site and a responseCallBack script to the response stream.
 
Methods inherited from class atg.adc.pipeline.AppendStringProcessor
getValue, setValue
 
Methods inherited from class atg.adc.pipeline.ADCPipelineProcessor
getRetCodes, isEnabled, runProcess, setEnabled
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


RQL_QUERY_BY_KEY

protected static final java.lang.String RQL_QUERY_BY_KEY
RQL Query repository by key

See Also:
Constant Field Values

ERROR_REPOSITORY

protected static final java.lang.String ERROR_REPOSITORY
Repository Exception.

See Also:
Constant Field Values

TEXT_PROPERTY_NAME

public static final java.lang.String TEXT_PROPERTY_NAME
Global constants

See Also:
Constant Field Values

mSitePropertiesManager

protected StoreSitePropertiesManager mSitePropertiesManager

mSiteContextPath

protected java.lang.String mSiteContextPath
Constructor Detail

KnowledgeBaseProcessor

public KnowledgeBaseProcessor()
Method Detail

getNumber_answers

public java.lang.String getNumber_answers()
Returns:
Number of answers to be displayed in the search result

setNumber_answers

public void setNumber_answers(java.lang.String pNumber_answers)
Parameters:
pNumber_answers - Number of answers to be displayed in the search result

getCorrection

public java.lang.String getCorrection()
Returns:
the flag to enable or disable spelling corrections

setCorrection

public void setCorrection(java.lang.String pCorrection)
Parameters:
pCorrection - flag to enable or disable spelling corrections

getDescription

public java.lang.String getDescription()
Returns:
the flag to enable or disable answer description

setDescription

public void setDescription(java.lang.String pDescription)
Parameters:
pDescription - flag to enable or disable answer description

getmExt_docs

public java.lang.String getmExt_docs()
Returns:
Flag to perform searches against the external document index

setExt_docs

public void setExt_docs(java.lang.String pExt_docs)
Parameters:
pExt_docs - Flag to perform searches against the external document index

getLabel_correction

public java.lang.String getLabel_correction()
Returns:
Displays spelling suggestions

setLabel_correction

public void setLabel_correction(java.lang.String pLabel_correction)
Parameters:
pLabel_correction - Displays spelling suggestions

getLabel_documents

public java.lang.String getLabel_documents()
Returns:
Label for recommended documents

setLabel_documents

public void setLabel_documents(java.lang.String pLabel_documents)
Parameters:
pLabel_documents - Label for recommended documents

getLabel_more_results

public java.lang.String getLabel_more_results()
Returns:
Label for more results

setLabel_more_results

public void setLabel_more_results(java.lang.String pLabel_more_results)
Parameters:
pLabel_more_results - Label for more results

getLabel_no_results

public java.lang.String getLabel_no_results()
Returns:
Displays when no results are found

setLabel_no_results

public void setLabel_no_results(java.lang.String pLabel_no_results)
Parameters:
pLabel_no_results - Displays when no results are found

getLabel_related_searches

public java.lang.String getLabel_related_searches()
Returns:
Displays the message when suggested searches are found

setLabel_related_searches

public void setLabel_related_searches(java.lang.String pLabel_related_searches)
Parameters:
pLabel_related_searches - Displays the message when suggested searches are found

getLabel_search_button

public java.lang.String getLabel_search_button()
Returns:
Label for search button

setLabel_search_button

public void setLabel_search_button(java.lang.String pLabel_search_button)
Parameters:
pLabel_search_button - Label for search button

getNavigation

public java.lang.String getNavigation()
Returns:
The flag to enable or disable more results link

setNavigation

public void setNavigation(java.lang.String pNavigation)
Parameters:
pNavigation - The flag to enable or disable more results link

getPayload_size

public java.lang.String getPayload_size()
Returns:
Maximum content size for Content-Sensing functionality

setPayload_size

public void setPayload_size(java.lang.String pPayload_size)
Parameters:
pPayload_size - Maximum content size for Content-Sensing functionality

getPersist_prodcat

public java.lang.String getPersist_prodcat()
Returns:
Persist the product and category specified through to subsequent searches

setPersist_prodcat

public void setPersist_prodcat(java.lang.String pPersist_prodcat)
Parameters:
pPersist_prodcat - Persist the product and category specified through to subsequent searches

getPreprocess

public java.lang.String getPreprocess()
Returns:
The handler for page preprocessing

setPreprocess

public void setPreprocess(java.lang.String pPreprocess)
Parameters:
pPreprocess - The handler for page preprocessing

getQ

public java.lang.String getQ()
Returns:
Keyword for search query

setQ

public void setQ(java.lang.String pQ)
Parameters:
pQ - Keyword for search query

getRecommended

public java.lang.String getRecommended()
Returns:
A flag to enable or disable recommended documents

setRecommended

public void setRecommended(java.lang.String pRecommended)
Parameters:
pRecommended - A flag to enable or disable recommended documents

getRelated

public java.lang.String getRelated()
Returns:
A flag to enable or disable suggested searches

setRelated

public void setRelated(java.lang.String pRelated)
Parameters:
pRelated - A flag to enable or disable suggested searches

getSearch_box

public java.lang.String getSearch_box()
Returns:
A flag to enable or disable the keyword search box

setSearch_box

public void setSearch_box(java.lang.String pSearch_box)
Parameters:
pSearch_box - A flag to enable or disable the keyword search box

getTarget

public java.lang.String getTarget()
Returns:
Defines the target where the linked document will be opened. It should be a valid target value of the HTML anchor tag

setTarget

public void setTarget(java.lang.String pTarget)
Parameters:
pTarget - Defines the target where the linked document will be opened. It should be a valid target value of the HTML anchor tag

getTruncate_size

public java.lang.String getTruncate_size()
Returns:
Number of characters to truncate to if the column is answers.solution or answers.description

setTruncate_size

public void setTruncate_size(java.lang.String pTruncate_size)
Parameters:
pTruncate_size - Number of characters to truncate to if the column is answers.solution or answers.description

getC

public java.lang.String getC()
Returns:
Category hierarchy in a comma separated chain. Multiple categories may be specified with a semicolon

setC

public void setC(java.lang.String pC)
Parameters:
pC - Category hierarchy in a comma separated chain. Multiple categories may be specified with a semicolon

getContext

public java.lang.String getContext()
Returns:
Comma-separated context HTML elements for preprocessor. The content of the elements will be used for content-sensing

setContext

public void setContext(java.lang.String pContext)
Parameters:
pContext - Comma-separated context HTML elements for preprocessor. The content of the elements will be used for content-sensing

getP

public java.lang.String getP()
Returns:
Product hierarchy in a comma separated chain.

setP

public void setP(java.lang.String pP)
Parameters:
pP - Product hierarchy in a comma separated chain.

getDiv_id

public java.lang.String getDiv_id()
Returns:
The div element on your page where you want the Rightnow knowledge base search to appear

setDiv_id

public void setDiv_id(java.lang.String pDiv_id)
The div element on your page where you want the Rightnow knowledge base search to appear

Parameters:
pDiv_id -

getInstance_id

public java.lang.String getInstance_id()
Returns:
mInstance_id The widget instance id for the Rightnow knowledge base search

setInstance_id

public void setInstance_id(java.lang.String pInstance_id)
The widget instance id for the Rightnow knowledge base search

Parameters:
pInstance_id -

getmModule

public java.lang.String getmModule()
Returns:
mModule The widget module name for the Rightnow knowledge base search

setModule

public void setModule(java.lang.String pModule)
The widget module name for the Rightnow knowledge base search

Parameters:
pModule -

getType

public java.lang.String getType()
Returns:
mType The widget type id for the Rightnow knowledge base search

setType

public void setType(java.lang.String pType)
The widget type id for the Rightnow knowledge base search

Parameters:
pType -

getSitePropertiesManager

public StoreSitePropertiesManager getSitePropertiesManager()
Returns:
the sitePropertiesManager

setSitePropertiesManager

public void setSitePropertiesManager(StoreSitePropertiesManager pSitePropertiesManager)
Parameters:
pSitePropertiesManager - the sitePropertiesManager to set

getSiteContextPath

public java.lang.String getSiteContextPath()
Returns:
the siteContextPath

setSiteContextPath

public void setSiteContextPath(java.lang.String pSiteContextPath)
Parameters:
pSiteContextPath - the siteContextPath to set

setRepository

public void setRepository(atg.repository.Repository pRepository)
Parameters:
pRepository - the repository to set

getRepository

public atg.repository.Repository getRepository()
Returns:
the mRepository

setitemDescriptorName

public void setitemDescriptorName(java.lang.String pItemDescriptorName)
Parameters:
pItemDescriptorName - the itemDescriptorName to set

getitemDescriptorName

public java.lang.String getitemDescriptorName()
Returns:
the mItemDescriptorName

createOptionalParamsList

public java.util.List<java.lang.String> createOptionalParamsList()
This method creates a list of optional parameters configured for the knowledge base widget. It also fetches the locale specific labels from the store text repository to be displayed in the widget.

Returns:
optionalParamsList The list of optional parameters to configure the widget

updateADCData

public int updateADCData(atg.adc.pipeline.ADCPipelineArgs pArgs)
This method will append both the mandatory and optional parameters to the response stream.It also appends the locale specific url to the knowledge base widget site and a responseCallBack script to the response stream.

Overrides:
updateADCData in class atg.adc.pipeline.AppendStringProcessor
Parameters:
pArgs - the current ADC pipeline arguments
Returns:
an ADC processor status code

getLocaleUrl

public java.lang.String getLocaleUrl()
This method gets locale specific id url of the knowledge base widget from the SiteRepository

Returns:
locale specific url

getStoreText

public java.lang.String getStoreText(java.lang.String textKey)
This method gets locale specific knowledge base widget ui labels from the SiteRepository

Parameters:
textKey - the store text key of the label
Returns:
locale specific label
Throws:
atg.repository.RepositoryException - if error occurs