Class ExtensionHistory
- java.lang.Object
-
- org.parosproxy.paros.extension.ExtensionAdaptor
-
- org.parosproxy.paros.extension.history.ExtensionHistory
-
- All Implemented Interfaces:
Extension
,SessionChangedListener
public class ExtensionHistory extends ExtensionAdaptor implements SessionChangedListener
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NAME
-
Constructor Summary
Constructors Constructor Description ExtensionHistory()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addHistory(HistoryReference historyRef)
void
addHistory(HttpMessage msg, int type)
void
delete(HistoryReference href)
void
destroy()
Performs final cleanups, free resources.java.lang.String
getAuthor()
Gets the author of the extension.HistoryReference
getHistoryReference(int historyId)
HistoryReferencesTable
getHistoryReferencesTable()
int
getLastHistoryId()
ManualRequestEditorDialog
getResendDialog()
Deprecated.(2.12.0) Replaced by Requester add-on.HistoryReference
getSelectedHistoryReference()
java.util.List<HistoryReference>
getSelectedHistoryReferences()
java.lang.String
getUIName()
By default returns the name returned bygetName()
.void
hideNotesAddDialog()
Deprecated.(2.7.0) No longer used/needed.void
hook(ExtensionHook extensionHook)
Called during extension's initialisation to allow to add new functionality to core components.void
init()
Initialize plugin during startup.boolean
isShowJustInScope()
void
notifyHistoryItemChanged(HistoryReference href)
void
purge(SiteMap map, SiteNode node)
void
purgeHistory(java.util.List<HistoryReference> hrefs)
Deletes the given history references from theHistory tab
and the session (database), along with the correspondingSiteNode
s andAlert
s.void
registerProxy(ProxyServer ps)
Deprecated.(2.12.0) No longer used/needed.void
removeFromHistoryList(HistoryReference href)
void
sessionAboutToChange(Session session)
Called just prior to the session changing.void
sessionChanged(Session session)
Called just after the session has changed.void
sessionModeChanged(Control.Mode mode)
Called when the user changes the mode.void
sessionScopeChanged(Session session)
Called when the user has changes the session scope.void
setShowJustInScope(boolean showJustInScope)
void
showAlertAddDialog(Alert alert)
Deprecated.(2.7.0) UseExtensionAlert.showAlertEditDialog(Alert)
instead.void
showAlertAddDialog(HistoryReference ref)
Deprecated.(2.7.0) UseExtensionAlert.showAlertAddDialog(HistoryReference)
instead.void
showAlertAddDialog(HttpMessage httpMessage, int historyType)
Deprecated.(2.7.0) UseExtensionAlert.showAlertAddDialog(HttpMessage, int)
instead.protected int
showFilterPlusDialog()
void
showInHistory(HistoryReference href)
void
showManageTagsDialog(HistoryReference ref, java.util.List<java.lang.String> tags)
void
showNotesAddDialog(HistoryReference ref, java.lang.String note)
boolean
supportsDb(java.lang.String type)
Part of the core set of features that should be supported by all db typesboolean
supportsLowMemory()
Return true it the extension can run with the 'low memory' option.void
unregisterProxy(ProxyServer ps)
Deprecated.(2.12.0) No longer used/needed.-
Methods inherited from class org.parosproxy.paros.extension.ExtensionAdaptor
canUnload, databaseOpen, getActiveActions, getAddOn, getDependencies, getDescription, getExtensionMenu, getExtensionView, getI18nPrefix, getMessages, getModel, getName, getOrder, getUnsavedResources, getView, hasView, initModel, initView, initXML, isCore, isDepreciated, isEnabled, optionsLoaded, postInit, postInstall, setAddOn, setDescription, setEnabled, setI18nPrefix, setMessages, setName, setOrder, start, stop, unload
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.parosproxy.paros.extension.Extension
getURL, getVersion
-
Methods inherited from interface org.parosproxy.paros.extension.SessionChangedListener
sessionPropertiesChanged
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUIName
public java.lang.String getUIName()
Description copied from class:ExtensionAdaptor
By default returns the name returned bygetName()
.- Specified by:
getUIName
in interfaceExtension
- Overrides:
getUIName
in classExtensionAdaptor
- Returns:
- the UI name of the extension, never
null
- See Also:
ExtensionAdaptor.getName()
-
getSelectedHistoryReference
public HistoryReference getSelectedHistoryReference()
-
getSelectedHistoryReferences
public java.util.List<HistoryReference> getSelectedHistoryReferences()
-
init
public void init()
Description copied from interface:Extension
Initialize plugin during startup. This phase is carried out before all others.- Specified by:
init
in interfaceExtension
- Overrides:
init
in classExtensionAdaptor
-
hook
public void hook(ExtensionHook extensionHook)
Description copied from interface:Extension
Called during extension's initialisation to allow to add new functionality to core components.- Specified by:
hook
in interfaceExtension
- Overrides:
hook
in classExtensionAdaptor
- Parameters:
extensionHook
- the hook to add the components.
-
sessionChanged
public void sessionChanged(Session session)
Description copied from interface:SessionChangedListener
Called just after the session has changed. sessionChanged may be called by non-event thread. Should handle with care in all the listener. Use EventThread for each GUI event.- Specified by:
sessionChanged
in interfaceSessionChangedListener
- Parameters:
session
- the new session
-
registerProxy
@Deprecated public void registerProxy(ProxyServer ps)
Deprecated.(2.12.0) No longer used/needed. It will be removed in a future release.
-
unregisterProxy
@Deprecated public void unregisterProxy(ProxyServer ps)
Deprecated.(2.12.0) No longer used/needed. It will be removed in a future release.
-
removeFromHistoryList
public void removeFromHistoryList(HistoryReference href)
-
notifyHistoryItemChanged
public void notifyHistoryItemChanged(HistoryReference href)
-
delete
public void delete(HistoryReference href)
-
getHistoryReference
public HistoryReference getHistoryReference(int historyId)
-
getLastHistoryId
public int getLastHistoryId()
-
addHistory
public void addHistory(HttpMessage msg, int type)
-
addHistory
public void addHistory(HistoryReference historyRef)
-
showFilterPlusDialog
protected int showFilterPlusDialog()
-
getResendDialog
@Deprecated public ManualRequestEditorDialog getResendDialog()
Deprecated.(2.12.0) Replaced by Requester add-on.This method initializes resendDialog- Returns:
- org.parosproxy.paros.extension.history.ResendDialog
-
showNotesAddDialog
public void showNotesAddDialog(HistoryReference ref, java.lang.String note)
-
hideNotesAddDialog
@Deprecated public void hideNotesAddDialog()
Deprecated.(2.7.0) No longer used/needed.
-
showAlertAddDialog
@Deprecated public void showAlertAddDialog(HistoryReference ref)
Deprecated.(2.7.0) UseExtensionAlert.showAlertAddDialog(HistoryReference)
instead.- Parameters:
ref
- theHistoryReference
that will have the new alert, if created.
-
showAlertAddDialog
@Deprecated public void showAlertAddDialog(HttpMessage httpMessage, int historyType)
Deprecated.(2.7.0) UseExtensionAlert.showAlertAddDialog(HttpMessage, int)
instead.Sets theHttpMessage
and the history type of theHistoryReference
that will be created if the user creates the alert. The current session will be used to create theHistoryReference
. The alert created will be added to the newly createdHistoryReference
.Should be used when the alert is added to a temporary
HistoryReference
as the temporaryHistoryReference
s are deleted when the session is closed.- Parameters:
httpMessage
- theHttpMessage
that will be used to create theHistoryReference
, must not benull
historyType
- the type of the history reference that will be used to create theHistoryReference
- See Also:
Model.getSession()
,HistoryReference(org.parosproxy.paros.model.Session, int, HttpMessage)
-
showAlertAddDialog
@Deprecated public void showAlertAddDialog(Alert alert)
Deprecated.(2.7.0) UseExtensionAlert.showAlertEditDialog(Alert)
instead.- Parameters:
alert
- the alert to edit
-
showManageTagsDialog
public void showManageTagsDialog(HistoryReference ref, java.util.List<java.lang.String> tags)
-
showInHistory
public void showInHistory(HistoryReference href)
-
sessionAboutToChange
public void sessionAboutToChange(Session session)
Description copied from interface:SessionChangedListener
Called just prior to the session changing. Listeners should close down any resources associated with this session. sessionAboutToChange may be called by non-event thread. Should handle with care in all the listener. Use EventThread for each GUI event.- Specified by:
sessionAboutToChange
in interfaceSessionChangedListener
- Parameters:
session
- the session about to be closed
-
getAuthor
public java.lang.String getAuthor()
Description copied from interface:Extension
Gets the author of the extension.Since 2.9.0 defaults to the author of the add-on, if set, otherwise an empty string.
-
isShowJustInScope
public boolean isShowJustInScope()
-
setShowJustInScope
public void setShowJustInScope(boolean showJustInScope)
-
sessionScopeChanged
public void sessionScopeChanged(Session session)
Description copied from interface:SessionChangedListener
Called when the user has changes the session scope. sessionScopeChanged may be called by non-event thread. Should handle with care in all the listener. Use EventThread for each GUI event.- Specified by:
sessionScopeChanged
in interfaceSessionChangedListener
- Parameters:
session
- the current session
-
sessionModeChanged
public void sessionModeChanged(Control.Mode mode)
Description copied from interface:SessionChangedListener
Called when the user changes the mode. sessionModeChanged may be called by non-event thread. Should handle with care in all the listener. Use EventThread for each GUI event.- Specified by:
sessionModeChanged
in interfaceSessionChangedListener
- Parameters:
mode
- the new mode
-
supportsLowMemory
public boolean supportsLowMemory()
Description copied from interface:Extension
Return true it the extension can run with the 'low memory' option. If the low memory option is set (and the extension supports it) then code should minimize the data stored in memory, using the db for all significant data. Extensions that do not support the low memory option will not be run if the option is set.- Specified by:
supportsLowMemory
in interfaceExtension
- Overrides:
supportsLowMemory
in classExtensionAdaptor
- Returns:
true
if the extension support the 'low memory' option,false
otherwise
-
supportsDb
public boolean supportsDb(java.lang.String type)
Part of the core set of features that should be supported by all db types- Specified by:
supportsDb
in interfaceExtension
- Overrides:
supportsDb
in classExtensionAdaptor
- Parameters:
type
- the db type- Returns:
- true if the specified db type is supported by the extension (or if it doesn't use any db)
- See Also:
Database.getType()
-
getHistoryReferencesTable
public HistoryReferencesTable getHistoryReferencesTable()
- Since:
- 2.8.0
-
purgeHistory
public void purgeHistory(java.util.List<HistoryReference> hrefs)
Deletes the given history references from theHistory tab
and the session (database), along with the correspondingSiteNode
s andAlert
s.- Parameters:
hrefs
- the history entries to delete.- Since:
- 2.7.0
- See Also:
View.getDefaultDeleteKeyStroke()
-
destroy
public void destroy()
Description copied from interface:Extension
Performs final cleanups, free resources.Called when the extension is removed (i.e. corresponding add-on is uninstalled) and when ZAP shuts down.
Called after
stopping
the extension.Should be called only by core functionality.
- Specified by:
destroy
in interfaceExtension
- Overrides:
destroy
in classExtensionAdaptor
-
-