|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.eng.spago.dispatching.service.DefaultRequestContext
it.eng.spago.paginator.smart.AbstractPageProvider
La classe AbstractPageProvider
fornisce i metodi per la gestione
di una pagina.
Field Summary |
Fields inherited from interface it.eng.spago.paginator.smart.IFacePageProvider |
LAST |
Constructor Summary | |
AbstractPageProvider()
Costruisce un AbstractPageProvider . |
Method Summary | |
SourceBean |
getConfig()
|
int |
getCurrentPage()
|
abstract java.util.Collection |
getPage(int page)
Ritorna un vettore con tutte le righe che formano la pagina di indice page richiesto. |
int |
getPageSize()
Ritorna il numero di righe per pagina. |
IFaceRowProvider |
getRowProvider()
Restituisce il row provider associato. |
boolean |
hasToBeReloaded()
|
void |
init(SourceBean config)
Questo metodo viene chiamato dal framework per inizializzare il componente. |
int |
pages()
Ritorna il numero di pagine previste in ragione del numero di righe fornite dal row provider. |
void |
reload()
Questo metodo serve per notificare al componente di ricaricare i dati relativi alla pagina. |
void |
setCurrentPage(int currentPage)
|
void |
setPages()
|
void |
setPageSize(int size)
Imposta il numero di righe per pagina. |
void |
setRequestContext(RequestContextIFace requestContext)
Imposta lo stato della classe partendo da un 'istanza di RequestContextIFace |
void |
setRowProvider(IFaceRowProvider rowProvider)
Imposta il row provider associato. |
void |
toBeReloaded(boolean toReload)
|
Methods inherited from class it.eng.spago.dispatching.service.DefaultRequestContext |
getErrorHandler, getRequestContainer, getResponseContainer, getServiceRequest, getServiceResponse |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractPageProvider()
AbstractPageProvider
. Ogni azione di
inizializzazione è demandata al metodo init(SourceBean
config)
.
init(SourceBean)
Method Detail |
public void setRequestContext(RequestContextIFace requestContext)
DefaultRequestContext
RequestContextIFace
setRequestContext
in interface RequestContextIFace
setRequestContext
in class DefaultRequestContext
requestContext
- l'istanza da cui impostare lo stato.RequestContainer
,
ResponseContainer
public void init(SourceBean config)
SourceBean
costruito a partire dal XML contenuto nell'eventuale sezione
config relativa allo specifico page provider nel file
/WEB-INF/conf/page_providers.xml. La sezione config è
accessibile anche via
ConfigSingleton configure = ConfigSingleton.getInstance(); SourceBean config = (SourceBean) configure.getAttribute("PAGE_PROVIDERS.PAGE_PROVIDER.CONFIG");
init
in interface InitializerIFace
config
- SourceBean
la configurazione del componente.public SourceBean getConfig()
getConfig
in interface InitializerIFace
public void reload()
reload()
del row provider
associato. Un page provider che svolga attività di
cacheing dovrebbe fare l'override di questo metodo per aggiornare in
questo metodo la propria cache.
reload
in interface IFacePageProvider
init(SourceBean)
public void toBeReloaded(boolean toReload)
public boolean hasToBeReloaded()
public IFaceRowProvider getRowProvider()
getRowProvider
in interface IFacePageProvider
IFaceRowProvider
IFaceRowProvider
public void setRowProvider(IFaceRowProvider rowProvider)
setRowProvider
in interface IFacePageProvider
rowProvider
- IFaceRowProvider
IFaceRowProvider
public int getPageSize()
getPageSize
in interface IFacePageProvider
int
public void setPageSize(int size)
setPageSize
in interface IFacePageProvider
size
- int
public int pages()
pages
in interface IFacePageProvider
int
public void setPages()
public abstract java.util.Collection getPage(int page)
getPage
in interface IFacePageProvider
page
- int
Collection
public int getCurrentPage()
getCurrentPage
in interface IFacePageProvider
public void setCurrentPage(int currentPage)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |