|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.droplet.EmptyFormHandler
atg.droplet.GenericFormHandler
atg.droplet.TransactionalFormHandler
atg.web.formhandlers.ApplicationFormHandler
atg.svc.ui.formhandlers.ServiceFormHandler
atg.svc.ui.formhandlers.FrameworkBaseFormHandler
atg.svc.ui.formhandlers.ViewDocumentFormHandler
public class ViewDocumentFormHandler
Allows viewing document that was found earlier. First usage is to pass serialized
com.primus.searchstudio.Response
response object in the same property, call
handleViewDocument(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse)
and
use getResult()
. This performs saving "document viewed" event.
Second usage is to set getContextId()
, maybe
getURL()
and #getQuestion()
, call
handleRetrieveAnswer(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse)
and
use #getAnswer()
as a document with highlight info.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
static java.lang.String |
CURRENT_SOLUTION_ID_WINDOW_STATE_KEY
|
static java.lang.String |
DOCUMENT_RESULT_WINDOW_STATE_KEY
Keys for window state |
protected java.lang.String |
mContextId
|
protected java.lang.String |
mDocTitle
|
protected java.lang.String |
mDocType
|
protected boolean |
mIsRecordAnswerViewed
whether the viewed answer is to be record or not |
protected boolean |
mIsViewInContext
|
protected java.lang.String |
mKnowledgeContextName
|
int |
mMaxContextIdLength
|
protected java.lang.String |
mURL
|
static java.lang.String |
SOLUTION_ID_WINDOW_STATE_KEY
|
static java.lang.String |
SOLUTION_RESULT_WINDOW_STATE_KEY
|
Fields inherited from class atg.svc.ui.formhandlers.ServiceFormHandler |
---|
PERFMON_OP_FORM_HANDLER |
Fields inherited from class atg.web.formhandlers.ApplicationFormHandler |
---|
EQUALS, PARAM_DELIMITER, QUERY_DELIMITER, STATUS_ERROR_REDIRECT, STATUS_ERROR_STAY, STATUS_SUCCESS |
Fields inherited from class atg.droplet.GenericFormHandler |
---|
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
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 | |
---|---|
ViewDocumentFormHandler()
|
Method Summary | |
---|---|
java.lang.String |
getContextId()
|
java.lang.String |
getDocTitle()
|
java.lang.String |
getDocType()
|
atg.search.routing.command.search.Document |
getDocumentForPreview()
Converts answer info (context ID, group ID, maybe URL, Title and docType) into result document with highlighting. |
boolean |
getIsRecordAnswerViewed()
|
boolean |
getIsViewInContext()
|
java.lang.String |
getKnowledgeContextName()
|
protected atg.svc.search.KnowledgeQueryContext |
getKnowledgeQueryContextForWindow()
|
int |
getMaxContextIdLength()
|
java.lang.String |
getQueryId()
|
atg.search.routing.command.search.Document |
getResult()
|
java.lang.String |
getResultAsString()
|
java.lang.String |
getSearchContextAsString()
|
atg.svc.search.SearchService |
getSearchService()
|
SessionService |
getSessionService()
|
protected atg.svc.repository.beans.Solution |
getSolution()
Gets the solution using the formhandler properties. |
java.lang.String |
getSolutionId()
|
SolutionService |
getSolutionService()
|
java.lang.String |
getSolutionVersion()
|
int |
getTotalResultCount()
|
protected java.lang.String |
getTruncatedContextId(java.lang.String contextId)
|
java.lang.String |
getURL()
|
java.lang.String |
getVersionId()
|
boolean |
handleCreateSolutionFromDocument(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
This handle method is called when the 'Create Solution from this Document' is selected on the Research Tab. |
boolean |
handleCreateSolutionFromDocumentRecent(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
This handle method is called when the 'Create Solution from this Document' is selected on the Research Tab. |
boolean |
handleResearchViewSolutionByDisplayId(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
|
boolean |
handleRetrieveAnswer(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Converts answer info (context ID, group ID, maybe URL and question) into result document with highlighting as "answer" string property. |
boolean |
handleViewDocument(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Unpacks serializedResult to use and serializedSearchContext; records "doc viewed" event unless getIsRecordAnswerViewed() property is set to "false". |
boolean |
handleViewedRecordDocument(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
|
boolean |
handleViewedRecordSolution(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
|
boolean |
handleViewSolution(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Unpacks serializedResult to use and serializedSearchContext; records "doc viewed - Solution" event unless getIsRecordAnswerViewed() property is set to "false". |
boolean |
handleViewSolutionByDisplayId(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
|
void |
processRetrieveAnswer(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Converts answer info (context ID, group ID, maybe URL and question) into result document with highlighting as "answer" string property. |
void |
processViewDocument(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Unpacks serializedResult to use and serializedSearchContext; records "doc viewed" event unless getIsRecordAnswerViewed() property is set to "false". |
void |
processViewedRecordDocument(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
|
void |
processViewedRecordSolution(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
|
void |
processViewSolution(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Unpacks serializedResult to use and serializedSearchContext; records "doc viewed - Solution" event unless getIsRecordAnswerViewed() property is set to "false". |
void |
setContextId(java.lang.String pContextId)
Answer context -- document ID and it's fragments that are answers to passed question. |
void |
setDocTitle(java.lang.String pDocTitle)
|
void |
setDocType(java.lang.String pDocType)
|
void |
setIsRecordAnswerViewed(boolean pIsRecordAnswerViewed)
Set to false if this is a previously viewed answer we're viewing again. |
void |
setIsViewInContext(boolean pIsViewInContext)
Set to true to retrieve a document or solution with the answer highlighted, set to false if you want to retrieve a solution without highlighting |
void |
setKnowledgeContextName(java.lang.String pKnowledgeContextName)
|
void |
setMaxContextIdLength(int length)
|
void |
setQueryId(java.lang.String pQueryId)
|
void |
setResult(atg.search.routing.command.search.Document pResult)
|
void |
setResultAsString(java.lang.String pSerializedResult)
|
void |
setSearchContextAsString(java.lang.String pSerializedSearchContext)
|
void |
setSearchService(atg.svc.search.SearchService pSearchService)
|
void |
setSessionService(SessionService pSessionService)
|
void |
setSolutionId(java.lang.String pSolutionId)
|
void |
setSolutionService(SolutionService pSolutionService)
|
void |
setSolutionVersion(java.lang.String pSolutionVersion)
|
void |
setTotalResultCount(int pTotalResultCount)
|
void |
setURL(java.lang.String pURL)
|
void |
setVersionId(java.lang.String pVersionId)
|
Methods inherited from class atg.svc.ui.formhandlers.ServiceFormHandler |
---|
handleUncheckedFormException, isLoggingUncheckedException, isRollbackTransactionOnFormError, isTransactionMarkedAsRollback, processException, processException, setLoggingUncheckedException, setRollbackTransactionOnFormError |
Methods inherited from class atg.web.formhandlers.ApplicationFormHandler |
---|
addParameterToURLString, beforeGet, beforeSet, checkFormError, checkFormRedirect, checkFormSuccess, formHandlerBeforeGet, formHandlerBeforeSet, getRedirectDelayMS, getString, getString, getString, getSuccessURL, getUserMessagesResourceBundle, handleCancel, processException, processException, processExceptionAndLog, processExceptionAndLog, redirect, setRedirectDelayMS, setSuccessURL, setUserMessagesResourceBundle |
Methods inherited from class atg.droplet.TransactionalFormHandler |
---|
afterSet, commitTransaction, getTransactionDemarcation, getTransactionStatus, isEnsureTransaction, isRollbackTransaction, isRollbackTransactionOnUnhandledException, setEnsureTransaction, setRollbackTransaction, setRollbackTransactionOnUnhandledException, setTransactionDemarcation |
Methods inherited from class atg.droplet.GenericFormHandler |
---|
addFormException, addUncheckedFormException, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCancelURL, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwards |
Methods inherited from class atg.droplet.EmptyFormHandler |
---|
afterGet |
Methods inherited from class atg.nucleus.GenericService |
---|
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, 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 |
---|
public static java.lang.String CLASS_VERSION
public static final java.lang.String DOCUMENT_RESULT_WINDOW_STATE_KEY
public static final java.lang.String SOLUTION_ID_WINDOW_STATE_KEY
public static final java.lang.String SOLUTION_RESULT_WINDOW_STATE_KEY
public static final java.lang.String CURRENT_SOLUTION_ID_WINDOW_STATE_KEY
public int mMaxContextIdLength
protected boolean mIsViewInContext
protected boolean mIsRecordAnswerViewed
protected java.lang.String mContextId
protected java.lang.String mURL
protected java.lang.String mDocType
protected java.lang.String mDocTitle
protected java.lang.String mKnowledgeContextName
Constructor Detail |
---|
public ViewDocumentFormHandler()
Method Detail |
---|
public SessionService getSessionService()
public void setSessionService(SessionService pSessionService)
public SolutionService getSolutionService()
public void setSolutionService(SolutionService pSolutionService)
public atg.svc.search.SearchService getSearchService()
public void setSearchService(atg.svc.search.SearchService pSearchService)
public int getMaxContextIdLength()
public void setMaxContextIdLength(int length)
public void setTotalResultCount(int pTotalResultCount)
pTotalResultCount
- How much results were found at the latest search.public int getTotalResultCount()
public void setResult(atg.search.routing.command.search.Document pResult)
pResult
- Answer (document + highlighing) to view.public atg.search.routing.command.search.Document getResult()
public void setQueryId(java.lang.String pQueryId)
pQueryId
- ID of the latest search event.public java.lang.String getQueryId()
public void setSolutionId(java.lang.String pSolutionId)
pSolutionId
- ID of the solution to show.public java.lang.String getSolutionId()
public void setSolutionVersion(java.lang.String pSolutionVersion)
pSolutionId
- version of the solution to show.public java.lang.String getSolutionVersion()
public void setVersionId(java.lang.String pVersionId)
pVersionId
- required to store info for displaying the Version document in GUIpublic java.lang.String getVersionId()
public void setSearchContextAsString(java.lang.String pSerializedSearchContext)
pSerializedSearchContext
- serialized search context object as base64-encoded stringpublic java.lang.String getSearchContextAsString()
public void setResultAsString(java.lang.String pSerializedResult)
pSerializedResult
- serialized view-in-context result object as base64-encoded stringpublic java.lang.String getResultAsString()
public boolean getIsViewInContext()
public void setIsViewInContext(boolean pIsViewInContext)
public boolean getIsRecordAnswerViewed()
public void setIsRecordAnswerViewed(boolean pIsRecordAnswerViewed)
public java.lang.String getContextId()
public void setContextId(java.lang.String pContextId)
public java.lang.String getURL()
public void setURL(java.lang.String pURL)
public java.lang.String getDocType()
public void setDocType(java.lang.String pDocType)
public java.lang.String getDocTitle()
public void setDocTitle(java.lang.String pDocTitle)
public java.lang.String getKnowledgeContextName()
public void setKnowledgeContextName(java.lang.String pKnowledgeContextName)
public boolean handleViewDocument(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws java.lang.Exception
getIsRecordAnswerViewed()
property is set to "false".
java.lang.Exception
public void processViewDocument(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws java.lang.Exception
getIsRecordAnswerViewed()
property is set to "false".
java.lang.Exception
public boolean handleViewSolution(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws java.lang.Exception
getIsRecordAnswerViewed()
property is set to "false".
This is similar to handleViewDocument , but in addition it tries to record the Solution even if it is searched
without context based on solution ID
java.lang.Exception
public void processViewSolution(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws java.lang.Exception
getIsRecordAnswerViewed()
property is set to "false".
This is similar to processViewDocument , but in addition it tries to record the Solution even if it is searched
without context based on solution ID
java.lang.Exception
public boolean handleCreateSolutionFromDocument(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws java.lang.Exception
java.lang.Exception
public boolean handleCreateSolutionFromDocumentRecent(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws java.lang.Exception
java.lang.Exception
public boolean handleViewSolutionByDisplayId(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws java.lang.Exception
java.lang.Exception
public boolean handleResearchViewSolutionByDisplayId(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws java.lang.Exception
java.lang.Exception
public boolean handleRetrieveAnswer(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws java.lang.Exception
java.lang.Exception
public void processRetrieveAnswer(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws java.lang.Exception
java.lang.Exception
public boolean handleViewedRecordSolution(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws java.lang.Exception
java.lang.Exception
public void processViewedRecordSolution(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws java.lang.Exception
java.lang.Exception
public boolean handleViewedRecordDocument(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws java.lang.Exception
java.lang.Exception
public void processViewedRecordDocument(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws java.lang.Exception
java.lang.Exception
public atg.search.routing.command.search.Document getDocumentForPreview()
protected java.lang.String getTruncatedContextId(java.lang.String contextId)
contextId
- Highlighting info as returned from AE server, format is: doc#.offset1:len1,offset2:len2...
protected atg.svc.repository.beans.Solution getSolution() throws ObjectNotFoundException
ObjectNotFoundException
- If the Solution object was not found.protected atg.svc.search.KnowledgeQueryContext getKnowledgeQueryContextForWindow()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |