Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.
`String` | `getContentString(String contType, int outFlag)` Returns the string representation of loaded Content.
`URI` | `getCurrentURI()` Get the currently loaded URI or null.
`Document` | `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.
`void` | `goToAnchor(String anchorName, boolean shouldScroll)` Informs the pres shell that the document is now at the anchor with the given name.
`boolean` | `goToIndex(int index)` Tells the object to navigate to the session history item at index.
`void` | `loadStream(InputStream inStream, String uri, String contentType, String charset, int loadFlags, String referURI, Object owner, boolean inheritOwner, String target, InputStream postData, InputStream headers)` Loads a given stream.
`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` - InputStream containing POST data for the request.
    `headers` - InputStream containing POST headers for the request.
  Throws:
    `JRexException`
  See Also:
    `WebNavigationConstants`

### 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` - InputStream containing POST data for the request.
    `headers` - InputStream containing POST headers for the request.
  Throws:
    `JRexException`

### loadStream

    public void loadStream(InputStream inStream,
                           String uri,
                           String contentType,
                           String charset,
                           int loadFlags,
                           String referURI,
                           Object owner,
                           boolean inheritOwner,
                           String target,
                           InputStream postData,
                           InputStream headers)
                    throws JRexException

  Loads a given stream. This will give priority to loading the requested stream in the object implementing this interface. If it can't be loaded here however, the URL dispatched will go through its normal process of content loading.

  Parameters:
    `inStream` - The input stream that provides access to the data to be loaded. This must be a blocking stream.
    `uri` - The URI representing the stream, or `null`
    `contentType` - The type (MIME) of data being loaded, `null` if unknown.
    `charset` - The charset of the data being loaded, `null` if unknown.
    `loadFlags` - Flags to modify load behaviour. Flags are defined in WebNavigationConstants Use loadStream() specific flags.
    `referURI` - The referring URI for the load.
    `owner` - Owner (security principal), for now it is just a place holder, set it to `null`.
    `inheritOwner` - If true owner inherits the owner from the referring document.
    `target` - Target for load, like _content, _blank etc.
    `postData` - InputStream containing POST data for the request.
    `headers` - InputStream containing POST headers 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`
  See Also:
    `WebNavigationConstants`

### 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`

### goToAnchor

    public void goToAnchor(String anchorName,
                           boolean shouldScroll)
                    throws JRexException

  Informs the pres shell that the document is now at the anchor with the given name. If |shouldScroll| is true, scrolls the view of the document so that the anchor with the specified name is displayed at the top of the window. If |anchorName| is empty, then this informs the pres shell that there is no current target, and |shouldScroll| must be false.

  Parameters:
    `anchorName` - the name of the new anchor tag for the current document
    `shouldScroll` - specifies whether or not to scroll the anchor to the top of the window.
  Throws:
    `JRexException`

### getContentString

    public String getContentString(String contType,
                                   int outFlag)
                            throws JRexException

  Returns the string representation of loaded Content.

  Parameters:
    `contType` - The Content type to be used.
    `outFlag` - specifies how the content should be converted to string,
  Throws:
    `JRexException`
  See Also:
    `WebNavigationConstants`

### 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 Document 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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