|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.owasp.webscarab.model.FileSystemStore
public class FileSystemStore
| Constructor Summary | |
|---|---|
FileSystemStore(java.io.File dir)
Creates a new instance of FileSystemStore |
|
| Method Summary | |
|---|---|
int |
addConversation(ConversationID id,
java.util.Date when,
Request request,
Response response)
adds a new conversation |
boolean |
addConversationProperty(ConversationID id,
java.lang.String property,
java.lang.String value)
adds a new value to the list of values for the specified property and conversation |
boolean |
addCookie(Cookie cookie)
adds a new cookie to the store |
void |
addUrl(HttpUrl url)
adds an entry for the specified URL, so that subsequent calls to isKnownUrl will return true. |
boolean |
addUrlProperty(HttpUrl url,
java.lang.String property,
java.lang.String value)
adds a new value to the list of values for the specified property and url |
void |
flush()
forces the store implementation to ensure that all external representations are in a consistent state |
HttpUrl |
getChildAt(HttpUrl url,
int index)
returns the specified child of the URL passed. |
int |
getChildCount(HttpUrl url)
returns the number of URL's that are children of the URL passed. |
ConversationID |
getConversationAt(HttpUrl url,
int index)
returns the ID of the conversation at position index in the list of conversations related to the supplied url. |
int |
getConversationCount(HttpUrl url)
returns the number of conversations related to the url supplied |
java.lang.String[] |
getConversationProperties(ConversationID id,
java.lang.String property)
returns an array of strings containing the values that have been set for the specified conversation property |
java.lang.String |
getCookieAt(int index)
returns a key which represents a cookie in the jar, basically "domain/path name" |
Cookie |
getCookieAt(java.lang.String key,
int index)
returns the cookie containing the value indicated by the key and index parameters |
int |
getCookieCount()
returns the number of unique cookie names in the jar |
int |
getCookieCount(java.lang.String key)
returns the number of different cookie values that have been observed for the particular cookie key |
Cookie |
getCurrentCookie(java.lang.String key)
returns the most recent cookie indicated by the key parameters |
int |
getIndexOf(HttpUrl url)
|
int |
getIndexOfConversation(HttpUrl url,
ConversationID id)
Conversations are sorted according to the natural ordering of their conversationID. |
int |
getIndexOfCookie(Cookie cookie)
returns the index of the provided cookie in the list of values |
int |
getIndexOfCookie(java.lang.String key,
Cookie cookie)
returns the index of the provided cookie in the list of values |
Request |
getRequest(ConversationID id)
Reads the requested Request class from long-term storage. |
Response |
getResponse(ConversationID id)
Reads the desired Response class from long-term storage. |
java.lang.String[] |
getUrlProperties(HttpUrl url,
java.lang.String property)
returns an array of strings containing the values that have been set for the specified url property |
static boolean |
isExistingSession(java.io.File dir)
|
boolean |
isKnownUrl(HttpUrl url)
returns true if the url is already existing in the store, false otherwise |
boolean |
removeCookie(Cookie cookie)
removes a cookie from the store |
void |
setConversationProperty(ConversationID id,
java.lang.String property,
java.lang.String value)
sets a value for a property, for a specific conversation |
void |
setRequest(ConversationID id,
Request request)
associates the specified request with the provided conversation id |
void |
setResponse(ConversationID id,
Response response)
associates the response with the specified conversation id |
void |
setUrlProperty(HttpUrl url,
java.lang.String property,
java.lang.String value)
sets a value for a property, for a specific URL |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileSystemStore(java.io.File dir)
throws StoreException
StoreException| Method Detail |
|---|
public static boolean isExistingSession(java.io.File dir)
public int addConversation(ConversationID id,
java.util.Date when,
Request request,
Response response)
addConversation in interface SiteModelStoreid - the id of the new conversationwhen - the date the conversation was createdrequest - the request to addresponse - the response to add
public void setConversationProperty(ConversationID id,
java.lang.String property,
java.lang.String value)
setConversationProperty in interface SiteModelStoreid - the conversation IDproperty - the name of the propertyvalue - the value to set
public boolean addConversationProperty(ConversationID id,
java.lang.String property,
java.lang.String value)
addConversationProperty in interface SiteModelStoreid - the conversation idproperty - the name of the propertyvalue - the value to add
public java.lang.String[] getConversationProperties(ConversationID id,
java.lang.String property)
getConversationProperties in interface SiteModelStoreid - the conversation idproperty - the name of the property
public void addUrl(HttpUrl url)
addUrl in interface SiteModelStoreurl - the url to addpublic boolean isKnownUrl(HttpUrl url)
isKnownUrl in interface SiteModelStoreurl - the url to test
public void setUrlProperty(HttpUrl url,
java.lang.String property,
java.lang.String value)
setUrlProperty in interface SiteModelStoreurl - the urlproperty - the name of the propertyvalue - the value to set
public boolean addUrlProperty(HttpUrl url,
java.lang.String property,
java.lang.String value)
addUrlProperty in interface SiteModelStoreurl - the urlproperty - the name of the propertyvalue - the value to add
public java.lang.String[] getUrlProperties(HttpUrl url,
java.lang.String property)
getUrlProperties in interface SiteModelStoreurl - the urlproperty - the name of the property
public int getChildCount(HttpUrl url)
getChildCount in interface SiteModelStoreurl - the url
public HttpUrl getChildAt(HttpUrl url,
int index)
getChildAt in interface SiteModelStoreurl - the urlindex - the index
public int getIndexOf(HttpUrl url)
getIndexOf in interface SiteModelStorepublic int getConversationCount(HttpUrl url)
getConversationCount in interface SiteModelStoreurl - the url in question, or null for all conversations
public ConversationID getConversationAt(HttpUrl url,
int index)
getConversationAt in interface SiteModelStoreurl - the url to use as a filter, or null for noneindex - the position in the list
public int getIndexOfConversation(HttpUrl url,
ConversationID id)
getIndexOfConversation in interface SiteModelStoreurl - acts as a filter on the overall list of conversationsid - the conversation
public void setRequest(ConversationID id,
Request request)
setRequest in interface SiteModelStoreid - the conversation idrequest - the requestpublic Request getRequest(ConversationID id)
SiteModelStore
getRequest in interface SiteModelStoreid - The id of the specific Request
public void setResponse(ConversationID id,
Response response)
setResponse in interface SiteModelStoreid - the conversation idresponse - the responsepublic Response getResponse(ConversationID id)
SiteModelStore
getResponse in interface SiteModelStoreid - the id of the desired Response
public void flush()
throws StoreException
SiteModelStore
flush in interface SiteModelStoreStoreException - if there is any error writing the datapublic int getCookieCount()
SiteModelStore
getCookieCount in interface SiteModelStorepublic int getCookieCount(java.lang.String key)
SiteModelStore
getCookieCount in interface SiteModelStorekey - the cookie key
public java.lang.String getCookieAt(int index)
SiteModelStore
getCookieAt in interface SiteModelStoreindex - the number of the cookie in the jar
public Cookie getCookieAt(java.lang.String key,
int index)
SiteModelStore
getCookieAt in interface SiteModelStorekey - the cookie keyindex - the index. The higher the number, the more recent the cookie.
public Cookie getCurrentCookie(java.lang.String key)
SiteModelStore
getCurrentCookie in interface SiteModelStorekey - the cookie key
public int getIndexOfCookie(Cookie cookie)
SiteModelStore
getIndexOfCookie in interface SiteModelStorecookie - the cookie
public int getIndexOfCookie(java.lang.String key,
Cookie cookie)
SiteModelStore
getIndexOfCookie in interface SiteModelStorekey - the keycookie - the cookie
public boolean addCookie(Cookie cookie)
addCookie in interface SiteModelStorecookie - the cookie to add
public boolean removeCookie(Cookie cookie)
removeCookie in interface SiteModelStorecookie - the cookie to remove
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||