public class HarBrowser
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TABLE_NAME
Database table name where the data is stored
|
| Constructor and Description |
|---|
HarBrowser(HarDatabaseConfig config,
long logId)
Creates a new
HarBrowser object from a database. |
HarBrowser(org.codehaus.jackson.JsonParser jp,
java.util.List<HarWarning> warnings)
Creates a new
HarEntries objectfrom a JsonParser already
positioned at the beginning of the element content |
HarBrowser(java.lang.String name,
java.lang.String version)
Creates a new
HarBrowser object |
HarBrowser(java.lang.String name,
java.lang.String version,
java.lang.String comment)
Creates a new
HarBrowser object |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteFromJDBC(HarDatabaseConfig config,
long logId)
Delete objects of this kind in the given database referencing the specified
logId.
|
java.lang.String |
getComment()
Returns the comment value.
|
HarCustomFields |
getCustomFields()
Returns the customFields value.
|
java.lang.String |
getName()
Returns the name value.
|
java.lang.String |
getVersion()
Returns the version value.
|
void |
setComment(java.lang.String comment)
Sets the comment value.
|
void |
setCustomFields(HarCustomFields customFields)
Sets the customFields value.
|
void |
setName(java.lang.String name)
Sets the name value.
|
void |
setVersion(java.lang.String version)
Sets the version value.
|
java.lang.String |
toString() |
void |
writeHar(org.codehaus.jackson.JsonGenerator g)
Write this object on a JsonGenerator stream
|
void |
writeJDBC(long logId,
HarDatabaseConfig config)
Write this object in the given database referencing the specified logId.
|
public static java.lang.String TABLE_NAME
public HarBrowser(java.lang.String name,
java.lang.String version)
HarBrowser objectname - Name of the application/browser used to export the logversion - Version of the application/browser used to export the logpublic HarBrowser(java.lang.String name,
java.lang.String version,
java.lang.String comment)
HarBrowser objectname - Name of the application/browser used to export the logversion - Version of the application/browser used to export the logcomment - An optional comment provided by the user of the applicationpublic HarBrowser(org.codehaus.jackson.JsonParser jp,
java.util.List<HarWarning> warnings)
throws org.codehaus.jackson.JsonParseException,
java.io.IOException
HarEntries objectfrom a JsonParser already
positioned at the beginning of the element contentjp - a JsonParser already positioned at the beginning of the element
contentwarnings - null if parser should fail on first error, pointer to
warning list if warnings can be issued for missing fieldsorg.codehaus.jackson.JsonParseExceptionjava.io.IOExceptionpublic HarBrowser(HarDatabaseConfig config, long logId) throws java.sql.SQLException
HarBrowser object from a database. Retrieves the
HarBrowser object that corresponds to the HarLog object with the specified
id.config - the database configuration to uselogId - the HarLog id to readjava.sql.SQLException - if a database error occurspublic void writeHar(org.codehaus.jackson.JsonGenerator g)
throws org.codehaus.jackson.JsonGenerationException,
java.io.IOException
g - a JsonGeneratorjava.io.IOException - if an IO error occursorg.codehaus.jackson.JsonGenerationException - if the generator failsHarFileWriter.writeHarFile(HarLog, java.io.File)public void writeJDBC(long logId,
HarDatabaseConfig config)
throws java.sql.SQLException
logId - the logId this object refers toconfig - the database configurationjava.sql.SQLException - if a database access error occurspublic void deleteFromJDBC(HarDatabaseConfig config, long logId) throws java.sql.SQLException
logId - the logId objects refer toconfig - the database configurationjava.sql.SQLException - if a database access error occurspublic java.lang.String getName()
public void setName(java.lang.String name)
name - The name to set.public java.lang.String getVersion()
public void setVersion(java.lang.String version)
version - The version to set.public java.lang.String getComment()
public void setComment(java.lang.String comment)
comment - The comment to set.public HarCustomFields getCustomFields()
public void setCustomFields(HarCustomFields customFields)
customFields - The customFields to set.public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()Copyright © 2011 Emmanuel Cecchet - University of Massachusetts - All Rights Reserved.