com.mindtree.techworks.insight.pagination
Class PageSet

java.lang.Object
  extended by com.mindtree.techworks.insight.pagination.PageSet
All Implemented Interfaces:
IMutatorListener

public class PageSet
extends java.lang.Object
implements IMutatorListener

The PageSet class holds the information of a collection of pages and has the methods for navigating through the collection

Version:
1.0, Feb 01, 2005
Author:
Antony Pulicken

Constructor Summary
PageSet()
          Constructor
 
Method Summary
 void clear()
          Deletes all the files/directories associated with this PageSet
static void clearAll()
          Clears all the Directories and Files created under the root cache directory
 void endMutating(int infoFlag)
          Call back method using which the controller will be notifed by any LogEventModelMutators ends mutating the LogEventModel
 IPage getCurrentPage()
          Returns the current page
 long getCurrentPageCnt()
          Returns the current page number
 IPage getLastPage()
           
 int getMutatorType()
          Gets the type of th mutator that is using this PageSet
protected  java.lang.String getNamespace()
           
protected  long getPageCnt()
           
 com.mindtree.techworks.insight.pagination.PageSet.PageSetIterator getPageSetIterator()
          Returns the current page number
 long getTotalPageCnt()
          Returns the total number of pages
 void loadPageByNumber(long pageNumber)
           
 IPage navigate(java.lang.String direction)
          Loads the page based on the direction
 void setMutatorType(int mutatorType)
          Sets the mutator type for this PageSet
protected  void setNamespace(java.lang.String namespace)
           
 void startMutating(int mutatorType)
          Call back method using which the controller will be notifed by any LogEventModelMutators starts mutating the LogEventModel
protected  void thresholdReached()
          Call back method to know whether the threshold is reached
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageSet

public PageSet()
Constructor

Method Detail

thresholdReached

protected void thresholdReached()
Call back method to know whether the threshold is reached


getPageCnt

protected long getPageCnt()
Returns:
pageCnt The Page Count

getCurrentPage

public IPage getCurrentPage()
Returns the current page

Returns:
currentPage

navigate

public IPage navigate(java.lang.String direction)
Loads the page based on the direction

Parameters:
direction -
Returns:
currentPage

getNamespace

protected java.lang.String getNamespace()
Returns:
Returns the namespace.

setNamespace

protected void setNamespace(java.lang.String namespace)
Parameters:
namespace - The namespace to set.

loadPageByNumber

public void loadPageByNumber(long pageNumber)
Parameters:
pageNumber -

clear

public void clear()
Deletes all the files/directories associated with this PageSet


clearAll

public static void clearAll()
Clears all the Directories and Files created under the root cache directory


getLastPage

public IPage getLastPage()
Returns:
Returns the lastPage.

getCurrentPageCnt

public long getCurrentPageCnt()
Returns the current page number

Returns:
currentPageCnt The current pagenumber

getTotalPageCnt

public long getTotalPageCnt()
Returns the total number of pages

Returns:
pageCnt Total number of pages

startMutating

public void startMutating(int mutatorType)
Call back method using which the controller will be notifed by any LogEventModelMutators starts mutating the LogEventModel

Specified by:
startMutating in interface IMutatorListener
Parameters:
mutatorType - specifies if the mutator this listener is registered with is tailing
See Also:
IMutatorListener#startMutating()

endMutating

public void endMutating(int infoFlag)
Call back method using which the controller will be notifed by any LogEventModelMutators ends mutating the LogEventModel

Specified by:
endMutating in interface IMutatorListener
Parameters:
infoFlag - flag identifier that denotes the status of the mutate operation
See Also:
IMutatorListener.endMutating(int)

getMutatorType

public int getMutatorType()
Gets the type of th mutator that is using this PageSet

Returns:
Returns the mutatorType.

setMutatorType

public void setMutatorType(int mutatorType)
Sets the mutator type for this PageSet

Parameters:
mutatorType - The mutatorType to set.

getPageSetIterator

public com.mindtree.techworks.insight.pagination.PageSet.PageSetIterator getPageSetIterator()
Returns the current page number

Returns:
currentPageCnt The current pagenumber


Copyright © 2003-2008 MindTree Consulting Ltd.. All Rights Reserved.