|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.owasp.webscarab.model.FrameworkModel
public class FrameworkModel
Provides a model of the conversations that have been seen
Constructor Summary | |
---|---|
FrameworkModel()
Creates a new ConversationModel |
Method Summary | |
---|---|
void |
addConversation(ConversationID id,
java.util.Date when,
Request request,
Response response,
java.lang.String origin)
adds a request and a response to the model, also specifying which plugin caused it. |
boolean |
addConversationProperty(ConversationID conversation,
java.lang.String property,
java.lang.String value)
adds the value to a list of existing values for the specified property and conversation |
void |
addCookie(Cookie cookie)
adds a cookie to the model |
void |
addModelListener(FrameworkListener listener)
adds a listener to the model |
boolean |
addUrlProperty(HttpUrl url,
java.lang.String property,
java.lang.String value)
adds the value to a list of existing values for the specified property and Url |
protected void |
fireConversationPropertyChanged(ConversationID id,
java.lang.String property)
notifies listeners that a conversation property changed |
protected void |
fireCookieAdded(Cookie cookie)
notifies listeners that a completely new cookie was added |
protected void |
fireCookieRemoved(Cookie cookie)
notifies listeners that all values for cookie have been removed. |
protected void |
fireCookiesChanged()
notifies listeners that all cookies in the model have changed |
protected void |
fireUrlPropertyChanged(HttpUrl url,
java.lang.String property)
notifies listeners that an URL property changed |
void |
flush()
instructs the SiteModel to flush any unwritten data in the underlying store to disk, prior to exit. |
java.util.Date |
getConversationDate(ConversationID id)
|
ConversationModel |
getConversationModel()
|
java.lang.String |
getConversationOrigin(ConversationID id)
|
java.lang.String[] |
getConversationProperties(ConversationID conversation,
java.lang.String property)
returns a String array containing the values that has been set for a particular conversation property |
java.lang.String |
getConversationProperty(ConversationID conversation,
java.lang.String property)
returns a String containing the value that has been identified for a particular conversation property |
java.lang.String |
getCookieAt(int index)
returns a key representing the cookie name at the position specified |
Cookie |
getCookieAt(java.lang.String key,
int index)
returns the actual Cookie corresponding to the key and position specified |
int |
getCookieCount()
returns the number of uniquely named cookies that have been added to the model. |
int |
getCookieCount(java.lang.String key)
returns the number of unique values that have been observed for the specified cookie |
Cookie[] |
getCookiesForUrl(HttpUrl url)
returns an array of cookies that would be applicable to a request sent to the url. |
Cookie |
getCurrentCookie(java.lang.String key)
|
int |
getIndexOfCookie(Cookie cookie)
returns the position of the cookie in its list. |
int |
getIndexOfCookie(java.lang.String key,
Cookie cookie)
returns the position of the cookie in its list. |
Request |
getRequest(ConversationID conversation)
returns the request corresponding to the conversation ID |
java.lang.String |
getRequestMethod(ConversationID id)
|
HttpUrl |
getRequestUrl(ConversationID conversation)
returns the url of the conversation in question |
Response |
getResponse(ConversationID conversation)
returns the response corresponding to the conversation ID |
java.lang.String |
getResponseStatus(ConversationID id)
|
UrlModel |
getUrlModel()
|
java.lang.String[] |
getUrlProperties(HttpUrl url,
java.lang.String property)
returns a String array containing the values that has been set for a particular url property |
java.lang.String |
getUrlProperty(HttpUrl url,
java.lang.String property)
returns a String containing the value that has been identified for a particular url property |
boolean |
isModified()
indicates whether there have been modifications to the site model |
EDU.oswego.cs.dl.util.concurrent.Sync |
readLock()
|
void |
removeCookie(Cookie cookie)
removes a cookie from the model |
void |
removeModelListener(FrameworkListener listener)
removes a listener from the model |
ConversationID |
reserveConversationID()
reserve a conversation ID for later use. |
void |
setConversationProperty(ConversationID conversation,
java.lang.String property,
java.lang.String value)
sets the specified property of the conversation |
void |
setSession(java.lang.String type,
java.lang.Object store,
java.lang.String session)
|
void |
setUrlProperty(HttpUrl url,
java.lang.String property,
java.lang.String value)
sets the specified property of the url |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FrameworkModel()
Method Detail |
---|
public void setSession(java.lang.String type, java.lang.Object store, java.lang.String session) throws StoreException
StoreException
public EDU.oswego.cs.dl.util.concurrent.Sync readLock()
public UrlModel getUrlModel()
public ConversationModel getConversationModel()
public void flush() throws StoreException
StoreException
- if there is any problem writing to the storepublic boolean isModified()
public ConversationID reserveConversationID()
public void addConversation(ConversationID id, java.util.Date when, Request request, Response response, java.lang.String origin)
id
- the previously reserved ConversationID that identifies this conversationrequest
- the requestresponse
- the response from the serverorigin
- the plugin that created this conversationpublic java.lang.String getConversationOrigin(ConversationID id)
public java.util.Date getConversationDate(ConversationID id)
public HttpUrl getRequestUrl(ConversationID conversation)
conversation
- the conversation
public void setConversationProperty(ConversationID conversation, java.lang.String property, java.lang.String value)
conversation
- the conversation IDproperty
- the name of the property to changevalue
- the value to usepublic boolean addConversationProperty(ConversationID conversation, java.lang.String property, java.lang.String value)
conversation
- the conversationproperty
- the name of the propertyvalue
- the value to addpublic java.lang.String getConversationProperty(ConversationID conversation, java.lang.String property)
conversation
- the conversation idproperty
- the name of the property
public java.lang.String getRequestMethod(ConversationID id)
public java.lang.String getResponseStatus(ConversationID id)
public java.lang.String[] getConversationProperties(ConversationID conversation, java.lang.String property)
conversation
- the conversation idproperty
- the name of the property
public void setUrlProperty(HttpUrl url, java.lang.String property, java.lang.String value)
url
- the urlproperty
- the name of the property to changevalue
- the value to usepublic boolean addUrlProperty(HttpUrl url, java.lang.String property, java.lang.String value)
url
- the urlproperty
- the name of the propertyvalue
- the value to addpublic java.lang.String[] getUrlProperties(HttpUrl url, java.lang.String property)
url
- the urlproperty
- the name of the property
public java.lang.String getUrlProperty(HttpUrl url, java.lang.String property)
url
- the urlproperty
- the name of the property
public Request getRequest(ConversationID conversation)
conversation
- the conversation ID
public Response getResponse(ConversationID conversation)
conversation
- the conversation ID
public void addModelListener(FrameworkListener listener)
listener
- the listener to addpublic void removeModelListener(FrameworkListener listener)
listener
- the listener to removepublic int getCookieCount()
public int getCookieCount(java.lang.String key)
key
- a key identifying the cookie
public java.lang.String getCookieAt(int index)
index
- which cookie in the list
public Cookie getCookieAt(java.lang.String key, int index)
key
- the cookie identifierindex
- the position in the list
public int getIndexOfCookie(Cookie cookie)
cookie
- the cookie
public int getIndexOfCookie(java.lang.String key, Cookie cookie)
cookie
- the cookie
public Cookie getCurrentCookie(java.lang.String key)
public void addCookie(Cookie cookie)
cookie
- the cookie to addpublic void removeCookie(Cookie cookie)
cookie
- the cookie to removepublic Cookie[] getCookiesForUrl(HttpUrl url)
url
- the url
protected void fireCookieAdded(Cookie cookie)
cookie
- the cookieprotected void fireCookieRemoved(Cookie cookie)
cookie
- the last cookie that was removedprotected void fireCookiesChanged()
protected void fireConversationPropertyChanged(ConversationID id, java.lang.String property)
cookie
- the cookieprotected void fireUrlPropertyChanged(HttpUrl url, java.lang.String property)
cookie
- the cookie
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |