Project

General

Profile

« Previous | Next » 

Revision 2608

Added by Jing Tao over 18 years ago

Add code to handle deleted document replication.

View differences:

Eml210SAXHandler.java
449 449
                    //create documentImpl object by the constructor which can
450 450
                    // specify
451 451
                    //the revision
452
                    currentDocument = new DocumentImpl(connection, rootNode
452
                    if (!super.getIsRevisionDoc())
453
                    {
454
                       currentDocument = new DocumentImpl(connection, rootNode
453 455
                            .getNodeID(), docname, doctype, docid, revision,
454 456
                            action, user, this.pub, catalogid, this.serverCode);
457
                    }
458
                    else
459
                    {
460
                        currentDocument = new DeletedDocumentImpl(connection, rootNode
461
                                .getNodeID(), docname, doctype, docid, revision,
462
                                action, user, this.pub, catalogid, this.serverCode);
463
                    }
455 464

  
456 465
                } catch (Exception ane) {
457 466
                    throw (new SAXException(
......
1409 1418
                    40);
1410 1419
            throw new SAXException(PERMISSIONERROR);
1411 1420
        }
1412

  
1413
        // write access rule to db
1414
        writeAccessRuleToDB();
1415

  
1416
        //delete relation table
1417
        deleteRelations();
1418
        //write relations
1419
        for (int i = 0; i < onlineDataFileIdInRelationVector.size(); i++) {
1420
            String id = (String) onlineDataFileIdInRelationVector.elementAt(i);
1421
            writeOnlineDataFileIdIntoRelationTable(id);
1421
        if (!super.getIsRevisionDoc())
1422
        {
1423
            // write access rule to db
1424
            writeAccessRuleToDB();
1425
            //delete relation table
1426
            deleteRelations();
1427
            //write relations
1428
            for (int i = 0; i < onlineDataFileIdInRelationVector.size(); i++) {
1429
                String id = (String) onlineDataFileIdInRelationVector.elementAt(i);
1430
                writeOnlineDataFileIdIntoRelationTable(id);
1431
            }
1422 1432
        }
1433
       
1423 1434

  
1424 1435
    }
1425 1436

  

Also available in: Unified diff