Package org.opencms.ui.apps.search
Class CmsSearchReplaceThread
- java.lang.Object
-
- java.lang.Thread
-
- org.opencms.report.A_CmsReportThread
-
- org.opencms.ui.apps.search.CmsSearchReplaceThread
-
- All Implemented Interfaces:
java.lang.Runnable
,I_CmsReportThread
public class CmsSearchReplaceThread extends A_CmsReportThread
Searches in sources.- Since:
- 7.5.3
-
-
Field Summary
Fields Modifier and Type Field Description static long
ABANDON_TIMEOUT
Time after which the search operation is cancelled if no report update is requested.-
Fields inherited from class org.opencms.report.A_CmsReportThread
m_report
-
-
Constructor Summary
Constructors Constructor Description CmsSearchReplaceThread(javax.servlet.http.HttpSession session, CmsObject cms, CmsSearchReplaceSettings settings)
Creates a replace html tag Thread.CmsSearchReplaceThread(javax.servlet.http.HttpSession session, CmsObject cms, CmsSearchReplaceSettings settings, I_CmsReport report)
Creates a replace html tag Thread.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<CmsResource>
getMatchedResources()
Returns the matched resources.java.lang.String
getReportUpdate()
Returns the part of the report that is ready for output.java.lang.String
getReportUpdate(I_CmsReportUpdateFormatter formatter)
Gets the report update content using the specified report update formatter.boolean
isAbandoned()
Returns true if the last report update is too far back in time, so the user has probably closed the window/tab.void
run()
protected void
searchAndReplace(java.util.List<CmsResource> resources)
Search the resources.-
Methods inherited from class org.opencms.report.A_CmsReportThread
addError, getCms, getError, getErrors, getLastEntryTime, getLogChannel, getReport, getRuntime, getUUID, hasError, initHtmlReport, initOldHtmlReport, isDoomed
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.opencms.report.I_CmsReportThread
start
-
-
-
-
Field Detail
-
ABANDON_TIMEOUT
public static final long ABANDON_TIMEOUT
Time after which the search operation is cancelled if no report update is requested.
-
-
Constructor Detail
-
CmsSearchReplaceThread
public CmsSearchReplaceThread(javax.servlet.http.HttpSession session, CmsObject cms, CmsSearchReplaceSettings settings)
Creates a replace html tag Thread.- Parameters:
session
- the current sessioncms
- the current cms objectsettings
- the settings needed to perform the operation.
-
CmsSearchReplaceThread
public CmsSearchReplaceThread(javax.servlet.http.HttpSession session, CmsObject cms, CmsSearchReplaceSettings settings, I_CmsReport report)
Creates a replace html tag Thread.- Parameters:
session
- the current sessioncms
- the current cms objectsettings
- the settings needed to perform the operation.
-
-
Method Detail
-
getMatchedResources
public java.util.List<CmsResource> getMatchedResources()
Returns the matched resources.- Returns:
- the matched resources
-
getReportUpdate
public java.lang.String getReportUpdate()
Description copied from class:A_CmsReportThread
Returns the part of the report that is ready for output.- Specified by:
getReportUpdate
in classA_CmsReportThread
- Returns:
- the part of the report that is ready for output
- See Also:
A_CmsReportThread.getReportUpdate()
-
getReportUpdate
public java.lang.String getReportUpdate(I_CmsReportUpdateFormatter formatter)
Description copied from class:A_CmsReportThread
Gets the report update content using the specified report update formatter.- Overrides:
getReportUpdate
in classA_CmsReportThread
- Parameters:
formatter
- the report update formatter- Returns:
- the report output
- See Also:
A_CmsReportThread.getReportUpdate(org.opencms.report.I_CmsReportUpdateFormatter)
-
isAbandoned
public boolean isAbandoned()
Returns true if the last report update is too far back in time, so the user has probably closed the window/tab.- Returns:
- true if the last report update is too far back
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
- Overrides:
run
in classjava.lang.Thread
- See Also:
Runnable.run()
-
searchAndReplace
protected void searchAndReplace(java.util.List<CmsResource> resources)
Search the resources.- Parameters:
resources
- the relevant resources
-
-