Project

General

Profile

« Previous | Next » 

Revision 559

Added by berkley almost 24 years ago

fixed compatibility problem by overloading the write method. Jivka's new parameter (Reader acl) is now defaulted to null if it is not explicitly declared.

View differences:

src/edu/ucsb/nceas/metacat/DocumentImpl.java
676 676
    return write(conn, xml, acl, action, docid, user, group, 1);
677 677
  }
678 678
  
679
  public static String write( Connection conn, Reader xml,
680
                              String action, String docid, String user,
681
                              String group, int serverCode )
682
                              throws Exception
683
  {
684
    return write(conn, xml, null,
685
                              action, docid, user,
686
                              group, serverCode);
687
  }
688
  
679 689
  /**
680 690
   * Write an XML file to the database, given a Reader
681 691
   *
......
684 694
   * @param action the action to be performed (INSERT OR UPDATE)
685 695
   * @param docid the docid to use for the INSERT OR UPDATE
686 696
   */
697

  
687 698
  public static String write( Connection conn, Reader xml, Reader acl,
688 699
                              String action, String docid, String user,
689 700
                              String group, int serverCode )
690 701
                throws Exception {
691

  
702
/*
703
    if(serverCode != 1)
704
    { //if this document being written is not a resident of this server then
705
      //we need to try to get a lock from it's resident server.  If the
706
      //resident server will not give a lock then we send the user a message
707
      //saying that he/she needs to download a new copy of the file and
708
      //merge the differences manually.
709
      
710
      
711
    }
712
*/    
692 713
    // Determine if the docid is OK for INSERT or UPDATE
693 714
    AccessionNumber ac = new AccessionNumber(conn);
694 715
    String newdocid = ac.generate(docid, action);

Also available in: Unified diff