org.mozilla.jrex.navigation
Interface WebNavigation

All Known Implementing Classes:
WebNavigationImpl

public interface WebNavigation

WebNavigation interface defines navigation related operations.

Version:
1.0
Author:
C.N.Medappa

Method Summary
 boolean canGoBack()
          Indicates if the object can go back.
 boolean canGoForward()
          Indicates if the object can go forward.
 URI getCurrentURI()
          Get the currently loaded URI or null.
 Object getDocument()
          Retrieves the current DOM document for the frame, or lazily creates a blank document if there is none.
 URI getReferringURI()
          Get the referring URI for the current open page.
 History getSessionHistory()
          Get the session history object used to store the session history for the session.
 boolean goBack()
          Tells the object to navigate to the previous session history item.
 boolean goForward()
          Tells the object to navigate to the next Forward session history item.
 boolean goToIndex(int index)
          Tells the object to navigate to the session history item at index.
 void loadURI(String uri, int loadFlags, String referURI, InputStream postData, InputStream headers)
          Loads a given URI.
 void loadURI(URI uri, int loadFlags, URI referURI, InputStream postData, InputStream headers)
          Loads a given URI.
 void openWindow(short type, String uri, String referrer, String windowName, String features)
          Open a new window.
 void reload(int reloadFlags)
          Tells the Object to reload the current page.
 void setJRexPeer(int jrexPeer)
          The peer JREX Window on which to navigate
 void setSessionHistory(History his)
          Set the session history object used to store the session history for the session.
 void stop(int stopFlags)
          Stops a load of a URI.
 

Method Detail

setJRexPeer

public void setJRexPeer(int jrexPeer)
The peer JREX Window on which to navigate

Parameters:
jrexPeer - jrex peer window associated with browser component

canGoBack

public boolean canGoBack()
                  throws JRexException
Indicates if the object can go back. If true this indicates that there is back session history available for navigation.

Throws:
JRexException

canGoForward

public boolean canGoForward()
                     throws JRexException
Indicates if the object can go forward. If true this indicates that there is forward session history available for navigation

Throws:
JRexException

goBack

public boolean goBack()
               throws JRexException
Tells the object to navigate to the previous session history item. When a page is loaded from session history, all content is loaded from the cache (if available) and page state (such as form values, scroll position) is restored.

Returns:
true - Backward navigation was successful. false - This call was unexpected at this time. Most likely you can't go back right now.
Throws:
JRexException

goForward

public boolean goForward()
                  throws JRexException
Tells the object to navigate to the next Forward session history item. When a page is loaded from session history, all content is loaded from the cache (if available) and page state (such as form values, scroll position) is restored.

Returns:
true - Forward was successful. false - This call was unexpected at this time. Most likely you can't go forward right now.
Throws:
JRexException

goToIndex

public boolean goToIndex(int index)
                  throws JRexException
Tells the object to navigate to the session history item at index.

Returns:
true - GotoIndex was successful. false - This call was unexpected at this time. Most likely you can't goto that index
Throws:
JRexException

loadURI

public void loadURI(URI uri,
                    int loadFlags,
                    URI referURI,
                    InputStream postData,
                    InputStream headers)
             throws JRexException
Loads a given URI. This will give priority to loading the requested URI in the object implementing this interface. If it can't be loaded here however, the URL dispatcher will go through its normal process of content loading.

Parameters:
uri - - The URI string to load.
loadFlags - - Flags modifying load behaviour. Generally you will pass LOAD_FLAGS_NONE for this parameter.
referURI - - The referring URI. If this argument is NULL, the referring URI will be inferred internally.
postData - - nsIInputStream containing POST data for the request.
headers - - nsIInputStream containing POST data for the request.
Throws:
JRexException

loadURI

public void loadURI(String uri,
                    int loadFlags,
                    String referURI,
                    InputStream postData,
                    InputStream headers)
             throws JRexException
Loads a given URI. This will give priority to loading the requested URI in the object implementing this interface. If it can't be loaded here however, the URL dispatcher will go through its normal process of content loading.

Parameters:
uri - - The URI string to load.
loadFlags - - Flags modifying load behaviour. Generally you will pass LOAD_FLAGS_NONE for this parameter.
referURI - - The referring URI. If this argument is NULL, the referring URI will be inferred internally.
postData - - nsIInputStream containing POST data for the request.
headers - - nsIInputStream containing POST data for the request.
Throws:
JRexException

openWindow

public void openWindow(short type,
                       String uri,
                       String referrer,
                       String windowName,
                       String features)
                throws JRexException
Open a new window.

Parameters:
type - the type of window
uri - to which to open the new window. Must already be escaped if applicable. can be null.
referrer - the refence uri to be used.
windowName - window name from JS window.open. can be null.
features - window features from JS window.open. can be null. Note:- The window attached to this navigator will be parent.
Throws:
JRexException

reload

public void reload(int reloadFlags)
            throws JRexException
Tells the Object to reload the current page.

Parameters:
reloadFlags - - Flags modifying reload behaviour. Generally you will pass LOAD_FLAGS_NONE for this parameter.
Throws:
JRexException

stop

public void stop(int stopFlags)
          throws JRexException
Stops a load of a URI.

Parameters:
stopFlags - - Flags indicating the stop behavior.
Throws:
JRexException

getDocument

public Object getDocument()
                   throws JRexException
Retrieves the current DOM document for the frame, or lazily creates a blank document if there is none. This attribute never returns null except for unexpected error situations.

Throws:
JRexException

getCurrentURI

public URI getCurrentURI()
                  throws JRexException
Get the currently loaded URI or null.

Throws:
JRexException

getReferringURI

public URI getReferringURI()
                    throws JRexException
Get the referring URI for the current open page.

Throws:
JRexException

getSessionHistory

public History getSessionHistory()
                          throws JRexException
Get the session history object used to store the session history for the session.

Returns:
The Session history object.
Throws:
JRexException

setSessionHistory

public void setSessionHistory(History his)
                       throws JRexException
Set the session history object used to store the session history for the session.

Parameters:
his - - The Session history object.
Throws:
JRexException


Copyright © 2004 C.N.Medappa. All Rights Reserved.