Project

General

Profile

« Previous | Next » 

Revision 425

Added by bojilova over 23 years ago

storing user_owner and user_updated where needed
new function in DocumentImpl checking for "write" perm on UPDATE or DELETE
added delete from xml_index of the old version of docid on UPDATE

View differences:

DBSAXHandler.java
44 44
   private DBSAXNode    rootNode;
45 45
   private String       action = null;
46 46
   private String       docid = null;
47
   private String       user = null;
47 48

  
48 49
   private static final int MAXDATACHARS = 4000;
49 50

  
......
67 68
   /** Construct an instance of the handler class 
68 69
    *
69 70
    * @param conn the JDBC connection to which information is written
71
    * @param action - "INSERT" or "UPDATE"
72
    * @param docid to be inserted or updated into JDBC connection
73
    * @param user the user connected to MetaCat servlet
70 74
    */
71
   public DBSAXHandler(Connection conn, String action, String docid) {
75
   public DBSAXHandler(Connection conn,String action,String docid,String user)
76
   {
72 77
     this(conn);
73 78
     this.action = action;
74 79
     this.docid = docid;
80
     this.user = user;
75 81
   }
76 82

  
77 83
   /** SAX Handler that receives notification of beginning of the document */
......
130 136
       rootNode.writeNodename(docname);
131 137
       try {
132 138
         currentDocument = new DocumentImpl(conn, rootNode.getNodeID(), 
133
                                           docname, doctype, docid, action);
139
                                       docname, doctype, docid, action, user);
134 140
       } catch (AccessionNumberException ane) {
135 141
         throw (new SAXException("Error with " + action, ane));
136 142
       }

Also available in: Unified diff