|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.primix.tapestry.engine.AbstractEngine | +--com.primix.tapestry.engine.SimpleEngine | +--com.primix.vlib.VirtualLibraryEngine
The engine for the Primix Virtual Library.
This exists to implement the external
service, which allows the ViewBook
and PersonPage
pages to be bookmarked, and to provide
a way for shutting down the application when the user logs out.
Inner Class Summary | |
class |
VirtualLibraryEngine.ExternalService
The external service is used to make the ViewBook and
PersonPage pages bookmarkable. |
Field Summary | |
static Category |
CAT
|
static java.lang.String |
EXTERNAL_SERVICE
The name ("external") of a service that exposes books or persons in such as way that they are bookmarkable. |
Fields inherited from class com.primix.tapestry.engine.AbstractEngine |
HELPER_BEAN_POOL_NAME, PAGE_SOURCE_NAME, pageSource, SCRIPT_SOURCE_NAME, specification, SPECIFICATION_SOURCE_NAME, specificationSource, TEMPLATE_SOURCE_NAME, templateSource, VISIT_CLASS_PROPERTY_NAME |
Fields inherited from interface com.primix.tapestry.IEngine |
EXCEPTION_PAGE, HOME_PAGE, STALE_LINK_PAGE, STALE_SESSION_PAGE |
Constructor Summary | |
VirtualLibraryEngine()
|
Method Summary | |
protected void |
cleanupAfterRequest(IRequestCycle cycle)
Removes the operations bean instance, if accessed this request cycle. |
void |
clearCache()
Invoked from Visit.clearCache() (and at the end of the request
cycle) to clear the publisher and person
IPropertySelectionModel models. |
protected IEngineService |
constructService(java.lang.String name)
Supports construction of the external service. |
IBookQuery |
createNewQuery()
Creates a new IBookQuery EJB instance. |
java.lang.Object |
createVisit(IRequestCycle cycle)
Creates an instance of Visit . |
java.lang.Object |
findNamedObject(java.lang.String name,
java.lang.Class expectedClass)
|
IBookQueryHome |
getBookQueryHome()
|
IOperations |
getOperations()
Returns an instance of the Vlib Operations beans, which is a stateless session bean for performing certain operations. |
IOperationsHome |
getOperationsHome()
|
IPropertySelectionModel |
getPersonModel()
Returns a model that contains all the known Person's, sorted by last name, then first. |
IPropertySelectionModel |
getPublisherModel()
Builds a model for entering in a publisher name, including an intial blank option. |
Context |
getRootNamingContext()
|
boolean |
isDebugEnabled()
|
void |
logout()
Sets the visit property to null, and sets a flag that invalidates the HttpSession at the end of the request cycle. |
void |
namingFailure(java.lang.String message,
NamingException ex,
boolean throwException)
As with #rmiFailure(RemoteException) , but for
NamingException . |
void |
presentError(java.lang.String error,
IRequestCycle cycle)
Invoked in various places to present an error message to the user. |
void |
rmiFailure(java.lang.String message,
java.rmi.RemoteException ex,
boolean throwException)
Invoked after an operation on a home or remote interface throws a RemoteException; this clears any cache of home and remote interfaces. |
protected void |
serviceExternal(IRequestCycle cycle,
java.lang.String[] parameters,
ResponseOutputStream output)
Performs the actual servicing of the external service. |
Methods inherited from class com.primix.tapestry.engine.SimpleEngine |
createPageRecorder, forgetPage, getActivePageNames, getPageRecorder, readExternal, writeExternal |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final Category CAT
public static final java.lang.String EXTERNAL_SERVICE
Constructor Detail |
public VirtualLibraryEngine()
Method Detail |
public java.lang.Object createVisit(IRequestCycle cycle)
Visit
.createVisit
in class AbstractEngine
protected void cleanupAfterRequest(IRequestCycle cycle)
May invalidate the HttpSession
(see logout()
).
cleanupAfterRequest
in class SimpleEngine
protected IEngineService constructService(java.lang.String name)
constructService
in class AbstractEngine
protected void serviceExternal(IRequestCycle cycle, java.lang.String[] parameters, ResponseOutputStream output) throws RequestCycleException, ServletException, java.io.IOException
public void logout()
HttpSession
at the end of the request cycle.public boolean isDebugEnabled()
public IBookQueryHome getBookQueryHome()
public IOperationsHome getOperationsHome()
public IOperations getOperations()
The bean is automatically removed at the end of the request cycle.
public java.lang.Object findNamedObject(java.lang.String name, java.lang.Class expectedClass)
public Context getRootNamingContext()
public IPropertySelectionModel getPublisherModel()
public void clearCache()
Visit.clearCache()
(and at the end of the request
cycle) to clear the publisher and person
IPropertySelectionModel
models.public IPropertySelectionModel getPersonModel()
public IBookQuery createNewQuery()
IBookQuery
EJB instance.public void presentError(java.lang.String error, IRequestCycle cycle)
Home
or
MyLibrary
page (the latter only if the user is logged in),
and sets the selected page for rendering the response.public void rmiFailure(java.lang.String message, java.rmi.RemoteException ex, boolean throwException)
message
- the message for the exception, or for the log messageex
- the exception thrownthrowException
- if true, an ApplicationRuntimeException
is thrown after the message is logged.public void namingFailure(java.lang.String message, NamingException ex, boolean throwException)
#rmiFailure(RemoteException)
, but for
NamingException
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |