public class HarPage
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 |
|---|
HarPage(HarDatabaseConfig config,
long pageId)
Creates a new
HarPage object from a database. |
HarPage(org.codehaus.jackson.JsonParser jp,
java.util.List<HarWarning> warnings)
Creates a new
HarPage object from a JsonParser already
positioned at the beginning of the element content |
HarPage(java.lang.String id,
java.util.Date startedDateTime,
java.lang.String title,
HarPageTimings pageTimings)
Creates a new
HarPage object |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getComment()
Returns the comment value.
|
HarCustomFields |
getCustomFields()
Returns the customFields value.
|
java.lang.String |
getId()
Returns the id value.
|
HarPageTimings |
getPageTimings()
Returns the pageTimings value.
|
java.util.Date |
getStartedDateTime()
Returns the startedDateTime value.
|
java.lang.String |
getTitle()
Returns the title value.
|
void |
setComment(java.lang.String comment)
Sets the comment value.
|
void |
setCustomFields(HarCustomFields customFields)
Sets the customFields value.
|
void |
setId(java.lang.String id)
Sets the id value.
|
void |
setPageTimings(HarPageTimings pageTimings)
Sets the pageTimings value.
|
void |
setStartedDateTime(java.util.Date startedDateTime)
Sets the startedDateTime value.
|
void |
setTitle(java.lang.String title)
Sets the title value.
|
java.lang.String |
toString() |
void |
writeHar(org.codehaus.jackson.JsonGenerator g)
Write this object on a JsonGenerator stream
|
void |
writeJDBC(HarDatabaseConfig config,
long logId,
java.sql.PreparedStatement pagePs,
java.sql.PreparedStatement timingPs)
Write this object in the given database referencing the specified logId.
|
public static java.lang.String TABLE_NAME
public HarPage(java.lang.String id,
java.util.Date startedDateTime,
java.lang.String title,
HarPageTimings pageTimings)
HarPage objectid - Unique identifier of a page within the startedDateTime - Date and timestamp for the beginning of the page
load (ISO 8601 - YYYY-MM-DDThh:mm:ss.SZ, e.g.
2010-05-19T13:50:21.505-04:00)title - Page titlepageTimings - Detailed timing info about page loadpublic HarPage(org.codehaus.jackson.JsonParser jp,
java.util.List<HarWarning> warnings)
throws org.codehaus.jackson.JsonParseException,
java.io.IOException
HarPage object from 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 HarPage(HarDatabaseConfig config, long pageId) throws java.sql.SQLException
HarPage object from a database. Retrieves the
HarPage objects that corresponds to the specified page id.config - the database configuration to usepageId - the page 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(HarDatabaseConfig config, long logId, java.sql.PreparedStatement pagePs, java.sql.PreparedStatement timingPs) throws java.sql.SQLException
logId - the logId this object refers topagePs - PreparedStatement to write page datatimingPs - PreparedStatement to write page timings datajava.sql.SQLException - if a database access error occurspublic java.lang.String getId()
public void setId(java.lang.String id)
id - The id to set.public java.util.Date getStartedDateTime()
public void setStartedDateTime(java.util.Date startedDateTime)
startedDateTime - The startedDateTime to set.public java.lang.String getTitle()
public void setTitle(java.lang.String title)
title - The title to set.public HarPageTimings getPageTimings()
public void setPageTimings(HarPageTimings pageTimings)
pageTimings - The pageTimings 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.