com.ibm.workplace.wcm.api
Interface HistoryLogIterator

All Superinterfaces:
java.util.Iterator<HistoryLogEntry>

public interface HistoryLogIterator
extends java.util.Iterator<HistoryLogEntry>

HistoryLogIterator iterates over HistoryLogEntry objects.

All objects returned by the next() method are of type HistoryLogEntry.


Method Summary
 boolean hasNext()
          Returns true if the iteration has more elements.
 HistoryLogEntry next()
          Returns the next element in the iteration.
 HistoryLogEntry nextLogEntry()
          Deprecated. use next() instead
 void remove()
          Removes the last HistoryLogEntry returned by next() from the history log.
 

Method Detail

hasNext

boolean hasNext()
Returns true if the iteration has more elements. (In other words, returns true if next() would return an element rather than throwing an exception.)

Specified by:
hasNext in interface java.util.Iterator<HistoryLogEntry>
Returns:
true if the iterator has more elements; false otherwise

next

HistoryLogEntry next()
Returns the next element in the iteration. All objects returned from this iterator will be instances of HistoryLogEntry.

The common practice is to cast the object returned by next() to a HistoryLogEntry.

The hasNext() method should be called first to ensure there is a next element in the iteration, otherwise an exception may be thrown.

Specified by:
next in interface java.util.Iterator<HistoryLogEntry>
Returns:
the next element in the iteration.
Throws:
java.util.NoSuchElementException - if the iteration has no more elements.

nextLogEntry

@Deprecated
HistoryLogEntry nextLogEntry()
Deprecated. use next() instead

Returns the next HistoryLogEntry in the interation.

The hasNext() method should be called first to ensure there is a next element in the iteration, otherwise an exception may be thrown.

Returns:
the next HistoryLogEntry in the iteration.
Throws:
java.util.NoSuchElementException - if the iteration has no more elements.

remove

void remove()
Removes the last HistoryLogEntry returned by next() from the history log.

The system workspace cannot be used. The workspace user must also be a valid user with administrator access to the library of the current item, otherwise an UnsupportedOperationException will be thrown when the remove() method is called.

Specified by:
remove in interface java.util.Iterator<HistoryLogEntry>
Throws:
java.lang.IllegalStateException - when next has not been called, or remove has already been called after the last call to next
java.lang.UnsupportedOperationException - each time the method is called if the system workspace is being used, or if the workspace user is not an administrator to the library of the current item