Project

General

Profile

« Previous | Next » 

Revision 7099

upgrade to latest RC in libclient and common jars -- includes updated getLogRecords and new mn.generateIdentifier method

View differences:

test/edu/ucsb/nceas/metacat/dataone/MNodeServiceTest.java
816 816
	    int count = 1;
817 817
    
818 818
      log = MNodeService.getInstance(request).getLogRecords(session, fromDate, toDate, 
819
        event, start, count);
819
        event, start, count, null);
820 820
      
821 821
      assertNotNull(log);      
822 822
      assertTrue(log.getCount() == count);
test/edu/ucsb/nceas/metacat/dataone/CNodeServiceTest.java
166 166
		    int count = 1;
167 167
	    
168 168
		    Log log = CNodeService.getInstance(request).getLogRecords(session, fromDate, toDate, 
169
		    	event, start, count);
169
		    	event, start, count, null);
170 170
		    assertNotNull(log);
171 171
		    assertTrue(log.getCount() == count);
172 172
		    assertTrue(log.getStart() == start);
src/edu/ucsb/nceas/metacat/restservice/MNResourceHandler.java
797 797
        Event event = null;
798 798
        Integer start = null;
799 799
        Integer count = null;
800
        String pidFilter = null;
800 801
        
801 802
        try {
802 803
        	String fromDateS = params.get("fromDate")[0];
......
831 832
			logMetacat.warn("Could not parse count: " + e.getMessage());
832 833
		}
833 834
        
835
        try {
836
            pidFilter = params.get("pidFilter")[0];
837
        } catch (Exception e) {
838
            logMetacat.warn("Could not parse pidFilter: " + e.getMessage());
839
        }
840
        
834 841
        logMetacat.debug("calling getLogRecords");
835
        Log log = MNodeService.getInstance(request).getLogRecords(session, fromDate, toDate, event, start, count);
842
        Log log = MNodeService.getInstance(request).getLogRecords(session, fromDate, toDate, event, start, count, pidFilter);
836 843
        
837 844
        OutputStream out = response.getOutputStream();
838 845
        response.setStatus(200);
src/edu/ucsb/nceas/metacat/restservice/CNResourceHandler.java
453 453
        Event event = null;
454 454
        Integer start = null;
455 455
        Integer count = null;
456
        String pidFilter = null;
456 457

  
457 458
        try {
458 459
            String fromDateS = params.get("fromDate")[0];
......
487 488
            logMetacat.warn("Could not parse count: " + e.getMessage());
488 489
        }
489 490

  
491
        try {
492
            pidFilter = params.get("pidFilter")[0];
493
        } catch (Exception e) {
494
            logMetacat.warn("Could not parse pidFilter: " + e.getMessage());
495
        }
496
        
490 497
        logMetacat.debug("calling getLogRecords");
491 498
        Log log = CNodeService.getInstance(request).getLogRecords(session,
492
                fromDate, toDate, event, start, count);
499
                fromDate, toDate, event, start, count, pidFilter);
493 500

  
494 501
        OutputStream out = response.getOutputStream();
495 502
        response.setStatus(200);
src/edu/ucsb/nceas/metacat/dataone/MNodeService.java
870 870
        try {
871 871

  
872 872
            // get log records first
873
            Log logs = getLogRecords(session, startTime, endTime, event, 0, null);
873
            Log logs = getLogRecords(session, startTime, endTime, event, 0, null, null);
874 874

  
875 875
            // TODO: aggregate by day or hour -- needs clarification
876 876
            int count = 1;
......
1186 1186

  
1187 1187

  
1188 1188
    }
1189

  
1190
	@Override
1191
	public Identifier generateIdentifier(Session arg0, String arg1, String arg2)
1192
			throws InvalidToken, ServiceFailure, NotAuthorized, NotImplemented,
1193
			InvalidRequest {
1194
		throw new NotImplemented("2194", "Member Node does not implement generateIdentifier method");
1195
	}
1189 1196
    
1190 1197
}
src/edu/ucsb/nceas/metacat/dataone/D1NodeService.java
448 448
   * @throws NotImplemented
449 449
   */
450 450
  public Log getLogRecords(Session session, Date fromDate, Date toDate, 
451
      Event event, Integer start, Integer count) throws InvalidToken, ServiceFailure,
451
      Event event, Integer start, Integer count, String pidFilter) throws InvalidToken, ServiceFailure,
452 452
      NotAuthorized, InvalidRequest, NotImplemented {
453 453

  
454 454

  

Also available in: Unified diff