HistoryReader.java revision b47fa78673770ddd744695a56688a855d35b1757
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* See LICENSE.txt included in this distribution for the specific
* language governing permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at LICENSE.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/**
* Class for reading history entries. The HistoryReader have
* three mutually exclusive usages:
* <ol>
* <li>where you read it as if from a Reader (used by lucene)</li>
* <li>you read each entry as one string ( one line = rev + date + author +
* comment) used for showing matching context in search results. '\n'
* doesn't matter.</li>
* <li>you read it in a structured way. (used by history.jsp)</li>
* </ol>
* Please note that it is the clients responsibility that if one access pattern
* is used, it should not switch access method.
*/
public class HistoryReader extends Reader {
private HistoryEntry current;
HistoryReader() {
}
}
/**
* Read a single line of delta record and sets
*
* @return true if more log records exist
* Eg.
* do {
* r.getRevision();
* } while(r.next())
*
*/
public boolean next() throws IOException {
return true;
}
return false;
}
/**
* @return get the history line in one String of current log record
*/
}
/**
* @return get the revision string of current log record
*/
public String getRevision() {
return current.getRevision();
}
/**
* @return get the date assosiated with current log record
*/
}
/**
* @return get the author of current log record
*/
}
/**
* @return get the comments of current log record
*/
public String getComment() {
return current.getMessage();
}
/**
* @return Does current log record is actually point to a revision
*/
public boolean isActive() {
}
}
}
public void close() throws IOException {
}
}
}
private Reader createInternalReader() {
}
}
public File getRepositoryPath() {
return current.getRepositoryPath();
}
public File getSourceRootPath() {
return current.getSourceRootPath();
}
}