/*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * (the "License"); you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
 * 
 * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
 * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
 * language governing rights and limitations under the License.
 * 
 * The Original Code is the Venice Web Communities System.
 * 
 * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
 * for Silverwrist Design Studios.  Portions created by Eric J. Bowersox are
 * Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios.  All Rights Reserved.
 * 
 * Contributor(s): 
 */
package com.silverwrist.dynamo.security;

import com.silverwrist.dynamo.iface.*;

public class LibraryAudit
{
  /*--------------------------------------------------------------------------------
   * Attributes
   *--------------------------------------------------------------------------------
   */

  private AuditRecordFactory m_audit;

  /*--------------------------------------------------------------------------------
   * Constructor
   *--------------------------------------------------------------------------------
   */

  LibraryAudit(AuditRecordFactory audit)
  {
    m_audit = audit;

  } // end constructor

  /*--------------------------------------------------------------------------------
   * External operations
   *--------------------------------------------------------------------------------
   */

  public void write(Request r, DynamoUser user, String namespace, String name)
  {
    AuditRecordCompose rec = m_audit.createAuditRecord(r,user,namespace,name);
    rec.write();

  } // end write

  public void write(Request r, DynamoUser user, String namespace, String name, Object p0)
  {
    AuditRecordCompose rec = m_audit.createAuditRecord(r,user,namespace,name);
    rec.setProperty(0,p0);
    rec.write();

  } // end write

  public void write(Request r, DynamoUser user, String namespace, String name, Object p0, Object p1)
  {
    AuditRecordCompose rec = m_audit.createAuditRecord(r,user,namespace,name);
    rec.setProperty(0,p0);
    rec.setProperty(1,p1);
    rec.write();

  } // end write

  public void write(Request r, DynamoUser user, String namespace, String name, Object p0, Object p1, Object p2)
  {
    AuditRecordCompose rec = m_audit.createAuditRecord(r,user,namespace,name);
    rec.setProperty(0,p0);
    rec.setProperty(1,p1);
    rec.setProperty(2,p2);
    rec.write();

  } // end write

  public void write(Request r, DynamoUser user, String namespace, String name, Object p0, Object p1,
		    Object p2, Object p3)
  {
    AuditRecordCompose rec = m_audit.createAuditRecord(r,user,namespace,name);
    rec.setProperty(0,p0);
    rec.setProperty(1,p1);
    rec.setProperty(2,p2);
    rec.setProperty(3,p3);
    rec.write();

  } // end write

  public void write(Request r, DynamoUser user, String namespace, String name, Object p0, Object p1,
		    Object p2, Object p3, Object p4)
  {
    AuditRecordCompose rec = m_audit.createAuditRecord(r,user,namespace,name);
    rec.setProperty(0,p0);
    rec.setProperty(1,p1);
    rec.setProperty(2,p2);
    rec.setProperty(3,p3);
    rec.setProperty(4,p4);
    rec.write();

  } // end write

  public void write(Request r, DynamoUser user, String namespace, String name, Object p0, Object p1,
		    Object p2, Object p3, Object p4, Object p5)
  {
    AuditRecordCompose rec = m_audit.createAuditRecord(r,user,namespace,name);
    rec.setProperty(0,p0);
    rec.setProperty(1,p1);
    rec.setProperty(2,p2);
    rec.setProperty(3,p3);
    rec.setProperty(4,p4);
    rec.setProperty(5,p5);
    rec.write();

  } // end write

  public void write(Request r, DynamoUser user, String namespace, String name, Object p0, Object p1,
		    Object p2, Object p3, Object p4, Object p5, Object p6)
  {
    AuditRecordCompose rec = m_audit.createAuditRecord(r,user,namespace,name);
    rec.setProperty(0,p0);
    rec.setProperty(1,p1);
    rec.setProperty(2,p2);
    rec.setProperty(3,p3);
    rec.setProperty(4,p4);
    rec.setProperty(5,p5);
    rec.setProperty(6,p6);
    rec.write();

  } // end write

  public void write(Request r, DynamoUser user, String namespace, String name, Object p0, Object p1,
		    Object p2, Object p3, Object p4, Object p5, Object p6, Object p7)
  {
    AuditRecordCompose rec = m_audit.createAuditRecord(r,user,namespace,name);
    rec.setProperty(0,p0);
    rec.setProperty(1,p1);
    rec.setProperty(2,p2);
    rec.setProperty(3,p3);
    rec.setProperty(4,p4);
    rec.setProperty(5,p5);
    rec.setProperty(6,p6);
    rec.setProperty(7,p7);
    rec.write();

  } // end write

  public void writeS(Request r, DynamoUser user, int subid, String namespace, String name)
  {
    AuditRecordCompose rec = m_audit.createAuditRecord(r,user,subid,namespace,name);
    rec.write();

  } // end writeS

  public void writeS(Request r, DynamoUser user, int subid, String namespace, String name, Object p0)
  {
    AuditRecordCompose rec = m_audit.createAuditRecord(r,user,subid,namespace,name);
    rec.setProperty(0,p0);
    rec.write();

  } // end writeS

  public void writeS(Request r, DynamoUser user, int subid, String namespace, String name, Object p0,
		     Object p1)
  {
    AuditRecordCompose rec = m_audit.createAuditRecord(r,user,subid,namespace,name);
    rec.setProperty(0,p0);
    rec.setProperty(1,p1);
    rec.write();

  } // end writeS

  public void writeS(Request r, DynamoUser user, int subid, String namespace, String name, Object p0,
		     Object p1, Object p2)
  {
    AuditRecordCompose rec = m_audit.createAuditRecord(r,user,subid,namespace,name);
    rec.setProperty(0,p0);
    rec.setProperty(1,p1);
    rec.setProperty(2,p2);
    rec.write();

  } // end writeS

  public void writeS(Request r, DynamoUser user, int subid, String namespace, String name, Object p0,
		     Object p1, Object p2, Object p3)
  {
    AuditRecordCompose rec = m_audit.createAuditRecord(r,user,subid,namespace,name);
    rec.setProperty(0,p0);
    rec.setProperty(1,p1);
    rec.setProperty(2,p2);
    rec.setProperty(3,p3);
    rec.write();

  } // end writeS

  public void writeS(Request r, DynamoUser user, int subid, String namespace, String name, Object p0,
		     Object p1, Object p2, Object p3, Object p4)
  {
    AuditRecordCompose rec = m_audit.createAuditRecord(r,user,subid,namespace,name);
    rec.setProperty(0,p0);
    rec.setProperty(1,p1);
    rec.setProperty(2,p2);
    rec.setProperty(3,p3);
    rec.setProperty(4,p4);
    rec.write();

  } // end writeS

  public void writeS(Request r, DynamoUser user, int subid, String namespace, String name, Object p0,
		     Object p1, Object p2, Object p3, Object p4, Object p5)
  {
    AuditRecordCompose rec = m_audit.createAuditRecord(r,user,subid,namespace,name);
    rec.setProperty(0,p0);
    rec.setProperty(1,p1);
    rec.setProperty(2,p2);
    rec.setProperty(3,p3);
    rec.setProperty(4,p4);
    rec.setProperty(5,p5);
    rec.write();

  } // end writeS

  public void writeS(Request r, DynamoUser user, int subid, String namespace, String name, Object p0,
		     Object p1, Object p2, Object p3, Object p4, Object p5, Object p6)
  {
    AuditRecordCompose rec = m_audit.createAuditRecord(r,user,subid,namespace,name);
    rec.setProperty(0,p0);
    rec.setProperty(1,p1);
    rec.setProperty(2,p2);
    rec.setProperty(3,p3);
    rec.setProperty(4,p4);
    rec.setProperty(5,p5);
    rec.setProperty(6,p6);
    rec.write();

  } // end writeS

  public void writeS(Request r, DynamoUser user, int subid, String namespace, String name, Object p0,
		     Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7)
  {
    AuditRecordCompose rec = m_audit.createAuditRecord(r,user,subid,namespace,name);
    rec.setProperty(0,p0);
    rec.setProperty(1,p1);
    rec.setProperty(2,p2);
    rec.setProperty(3,p3);
    rec.setProperty(4,p4);
    rec.setProperty(5,p5);
    rec.setProperty(6,p6);
    rec.setProperty(7,p7);
    rec.write();

  } // end writeS

} // end class LibraryAudit
