public final class WindowSession extends Object
| Constructor and Description |
|---|
WindowSession(AppSession session) |
| Modifier and Type | Method and Description |
|---|---|
void |
acceptNewConversation(ConversationContext cc) |
void |
addShelveEntry(int depth,
IShelvedEntry entry)
Add or insert a page to the shelve stack.
|
void |
clearGoto()
Clear all goto stuff at request start time.
|
ConversationContext |
createConversation(Class<? extends ConversationContext> clz) |
protected void |
destroyConversation(ConversationContext cc) |
void |
dump()
Dump all conversations and their resident pages.
|
ConversationContext |
findConversation(String cid)
Locate a conversation by ID.
|
DomApplication |
getApplication() |
Object |
getAttribute(String name)
Get a window attribute.
|
long |
getLastUsed() |
List<IShelvedEntry> |
getShelvedPageStack()
Get the current contents of the shelved page stack.
|
ConversationContext |
getTargetConversation() |
Class<? extends ConversationContext> |
getTargetConversationClass() |
MoveMode |
getTargetMode() |
Class<? extends UrlPage> |
getTargetPageClass() |
IPageParameters |
getTargetPageParameters() |
String |
getWindowID() |
boolean |
handleExceptionGoto(RequestContextImpl ctx,
Page currentpg,
boolean ajax)
Goto handling in EXCEPTION handling mode: only Redirect is allowed here.
|
boolean |
handleGoto(RequestContextImpl ctx,
Page currentpg,
boolean ajax)
This checks whether a new page is to be made resident, instead of the
current page.
|
boolean |
insertShelveEntry(int depth,
Class<? extends UrlPage> clz,
IPageParameters parameters)
This inserts a (possibly new) entry in the page stack.
|
void |
internalAttachConversations()
Call the "attach" method for all conversations, indicating that a new request
is going to be handled.
|
String |
internalAttemptReload(javax.servlet.http.HttpSession hs,
Class<? extends UrlPage> clz2,
PageParameters pageParameters,
String oldWindowId)
This will try to resurrect a set of windows from a previously stored stack.
|
void |
internalDetachConversations()
Detach all conversations, called just before the request is done.
|
void |
internalSetLastPage(Page page) |
void |
internalSetNextPage(MoveMode m,
Class<? extends UrlPage> clz,
ConversationContext cc,
Class<? extends ConversationContext> ccclz,
IPageParameters pp) |
void |
internalSetRedirect(String targeturl) |
boolean |
isConversationDestroyed(String ccid)
Quickly check if a conversation is (recently) destroyed, this should prevent "event reordering problems" like in etc.to bugzilla bug#3138.
|
boolean |
isPageOnStack(Class<? extends UrlPage> clz,
IPageParameters papa) |
void |
setAttribute(String name,
Object val)
Set a window attribute.
|
String |
toString() |
Page |
tryToMakeOrGetPage(IRequestContext rctx,
Class<? extends UrlPage> clz,
PageParameters papa,
String action)
Get a valid Page, either from the shelve stack or some other location.
|
public WindowSession(@Nonnull AppSession session)
@Nonnull public final DomApplication getApplication()
@Nullable public ConversationContext findConversation(@Nonnull String cid) throws Exception
cid - Exceptionpublic void internalAttachConversations()
throws Exception
Exceptionpublic void internalDetachConversations()
public void dump()
protected void destroyConversation(@Nonnull ConversationContext cc)
public boolean isConversationDestroyed(@Nonnull String ccid)
ccid - public ConversationContext createConversation(@Nonnull Class<? extends ConversationContext> clz) throws Exception
Exceptionpublic void acceptNewConversation(@Nonnull ConversationContext cc) throws Exception
Exception@Nonnull public List<IShelvedEntry> getShelvedPageStack()
public boolean handleExceptionGoto(@Nonnull RequestContextImpl ctx, @Nonnull Page currentpg, boolean ajax) throws Exception
ctx - currentpg - ajax - Exceptionpublic boolean handleGoto(@Nonnull RequestContextImpl ctx, @Nonnull Page currentpg, boolean ajax) throws Exception
ctx - currentpg - The page that is current (the one that issued the MOVE command).Exceptionpublic void clearGoto()
public void internalSetNextPage(@Nonnull MoveMode m, @Nullable Class<? extends UrlPage> clz, @Nullable ConversationContext cc, @Nullable Class<? extends ConversationContext> ccclz, @Nullable IPageParameters pp)
@Nullable public IPageParameters getTargetPageParameters()
@Nullable public Class<? extends ConversationContext> getTargetConversationClass()
@Nullable public ConversationContext getTargetConversation()
public Page tryToMakeOrGetPage(@Nonnull IRequestContext rctx, @Nonnull Class<? extends UrlPage> clz, @Nullable PageParameters papa, @Nullable String action) throws Exception
rctx - clz - papa - action - AJAX actionExceptionpublic boolean isPageOnStack(@Nonnull Class<? extends UrlPage> clz, @Nonnull IPageParameters papa) throws Exception
Exceptionpublic long getLastUsed()
public void setAttribute(@Nonnull String name, @Nullable Object val)
name - val - @Nullable public Object getAttribute(@Nonnull String name)
name - public void addShelveEntry(int depth,
@Nonnull
IShelvedEntry entry)
depth - entry - public boolean insertShelveEntry(int depth,
@Nonnull
Class<? extends UrlPage> clz,
@Nonnull
IPageParameters parameters)
throws Exception
depth - clz - parameters - Exception@Nullable public String internalAttemptReload(@Nonnull javax.servlet.http.HttpSession hs, @Nonnull Class<? extends UrlPage> clz2, @Nonnull PageParameters pageParameters, @Nonnull String oldWindowId)
string - sw - pageParameters - clz2 - Copyright © 2017 etc.to. All rights reserved.