public class HarLog
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String | TABLE_NAMEDatabase table name where the data is stored | 
| Constructor and Description | 
|---|
| HarLog(HarCreator creator)Creates a new  HarLogversion 1.2 | 
| HarLog(HarDatabaseConfig config)Creates a new  HarLogobject from a database. | 
| HarLog(HarDatabaseConfig config,
      long logId)Creates a new  HarLogobject from a database. | 
| HarLog(org.codehaus.jackson.JsonParser jp,
      java.util.List<HarWarning> warnings)Creates a new  HarLogobject from a JsonParser stream | 
| HarLog(java.lang.String version,
      HarCreator creator,
      HarBrowser browser,
      java.lang.String comment)Creates a new  HarLogobject | 
| Modifier and Type | Method and Description | 
|---|---|
| void | deleteFromJDBC()If this object was read from a database, it will be deleted from it using
 this method. | 
| HarBrowser | getBrowser()Returns the browser value. | 
| java.lang.String | getComment()Returns the comment value. | 
| HarCreator | getCreator()Returns the creator value. | 
| HarCustomFields | getCustomFields()Returns the customFields value. | 
| HarEntries | getEntries()Returns the entries value. | 
| HarPages | getPages()Returns the pages value. | 
| java.lang.String | getVersion()Returns the version value. | 
| void | setBrowser(HarBrowser browser)Sets the browser value. | 
| void | setComment(java.lang.String comment)Sets the comment value. | 
| void | setCreator(HarCreator creator)Sets the creator value. | 
| void | setCustomFields(HarCustomFields customFields)Sets the customFields value. | 
| void | setEntries(HarEntries entries)Sets the entries value. | 
| void | setPages(HarPages pages)Sets the pages 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 | 
| long | writeJDBC(HarDatabaseConfig config)Write this object to a database according to the given configuration | 
public static java.lang.String TABLE_NAME
public HarLog(java.lang.String version,
      HarCreator creator,
      HarBrowser browser,
      java.lang.String comment)
HarLog objectversion - Version number of the format (by default 1.2)creator - Name and version info of the log creator applicationbrowser - Name and version info of used browser (optional)comment - A comment provided by the user or the application (optional)public HarLog(HarCreator creator)
HarLog version 1.2creator - Name and version info of the log creator applicationpublic HarLog(org.codehaus.jackson.JsonParser jp,
      java.util.List<HarWarning> warnings)
       throws org.codehaus.jackson.JsonParseException,
              java.io.IOException
HarLog object from a JsonParser streamjp - the JsonParson which first token must point to the log elementwarnings - null if parser should fail on first error, pointer to
          warning list if warnings can be issued for missing fieldsjava.io.IOExceptionorg.codehaus.jackson.JsonParseExceptionpublic HarLog(HarDatabaseConfig config) throws java.sql.SQLException
HarLog object from a database. If the database
 contains multiple HarLog object, only the first one is retrievedconfig - the database configuration to usejava.sql.SQLException - if a database error occurspublic HarLog(HarDatabaseConfig config, long logId) throws java.sql.SQLException
HarLog object from a database. Retrieves 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 deleteFromJDBC()
                    throws java.sql.SQLException
java.sql.SQLException - if the object was not retrieved from the database or
           an error occurs while deleting itpublic long writeJDBC(HarDatabaseConfig config) throws java.sql.SQLException
config - the database configuration to usejava.sql.SQLException - if a database error occurspublic java.lang.String getVersion()
public void setVersion(java.lang.String version)
version - The version to set.public HarCreator getCreator()
public void setCreator(HarCreator creator)
creator - The creator to set.public HarBrowser getBrowser()
public void setBrowser(HarBrowser browser)
browser - The browser to set.public HarPages getPages()
public void setPages(HarPages pages)
pages - The pages to set.public HarEntries getEntries()
public void setEntries(HarEntries entries)
entries - The entries 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.