All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Foundation |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

*** This interface provides Binary Compatibility only, not Source Compatibility ***

## com.sas.services.publish
Interface HTMLFileInterface

All Superinterfaces:
  com.sas.entities.EntityKeyInterface, com.sas.io.InputStreamProviderInterface, java.rmi.Remote

All Known Implementing Classes:
  HTMLFile

    @SASScope(value="ALL")
    @BinaryCompatibilityOnly
    public interface HTMLFileInterface

extends com.sas.io.InputStreamProviderInterface, com.sas.entities.EntityKeyInterface, java.rmi.Remote

The HTMLFileInterface provides a mechanism for setting and getting the attributes of a file contained within an HTML entry.

Files that implement HTMLFileInterface can be inserted into an HTML entry. `HTMLEntryInterface` is a container for various files that implement HTMLFileInterface. Within MVA SAS, the ODS HTML statement generates HTML files. The body file contains the results from the procedure. The contents file is a table of contents that links to the body file. The pages file is a table of pages that links to the body file. The frame file is a frame that displays the table of contents, the table of pages and the body file. The HTML entry provides a way to identify each of these files, and encapsulate them into one entry.

The HTML file is limited to just one role. One file should be designated as the main file for the HTML entry. The main file identifies which file in the HTML entry should be used as the starting point when browsing the HTML entry. The main file will have a role of `MAIN_BODY_FILE` or `MAIN_FRAME_FILE`. If a frame file exists, it should be designated as the main file; otherwise, the body file should be designated as the main file. All other files are considered companion files. The companion files are any files other than the main HTML file. The companion files can include, body, frame, contents and page files, as well as any miscellaneous files (such as HTML, GIF, JPG) needed by the HTML entry. Supported companion roles include `FRAME_COMPANION`, `BODY_COMPANION`, `PAGE_COMPANION`, `CONTENTS_COMPANION`, `MISC_COMPANION`.

Since:
  1.0
See Also:
  `HTMLEntryInterface`

Field Summary
`static int` | `BODY_COMPANION` A companion body file.
`static int` | `CONTENTS_COMPANION` A companion contents file.
`static int` | `FRAME_COMPANION` A companion frame file.
`static int` | `MAIN_BODY_FILE` The main body file.
`static int` | `MAIN_FRAME_FILE` The main frame file.
`static int` | `MISC_COMPANION` A miscellaneous companion file.
`static int` | `PAGE_COMPANION` A companion page file.

Method Summary
`abstract java.lang.String` | `getEncoding()` Returns the encoding of the file.
`abstract java.io.InputStream` | `getInputStream()` Gets the input stream for this HTML or companion file.
`abstract java.io.InputStream` | `getInputStream(java.lang.Object streamID)` Deprecated. Use `getInputStream()` which now supports remote input streams.
`abstract java.lang.String` | `getMIMEType()` Returns the MIME type associated with this file.
`abstract java.lang.String` | `getName()` Returns the name of the file.
`abstract com.sas.io.RemoteInputStreamInterface` | `getRemoteInputStream(java.lang.Object streamID)` Deprecated. Use `getInputStream()` which now supports remote input streams.
`abstract int` | `getRole()` Returns the role of this file.
`abstract java.lang.String` | `getURL()` Returns the URL of the file.
`abstract java.lang.Object` | `hasInputStream()` Deprecated. this method no longer needed as getInputStream() will return an input stream that can be used in a remote environment
`abstract void` | `setEncoding(java.lang.String encoding)` Sets the file encoding.
`abstract void` | `setMIMEType(java.lang.String mimeType)` Sets the MIME type associated with this file.
`abstract void` | `setURL(java.lang.String url)` Sets the URL of the file.

Methods inherited from interface com.sas.entities.EntityKeyInterface
`getEntityKey, sameEntity, setEntityKey`

Field Detail

### MAIN_BODY_FILE

    static final int MAIN_BODY_FILE

  The main body file.

  See Also:
    Constant Field Values

### BODY_COMPANION

    static final int BODY_COMPANION

  A companion body file.

  See Also:
    Constant Field Values

### FRAME_COMPANION

    static final int FRAME_COMPANION

  A companion frame file.

  See Also:
    Constant Field Values

### CONTENTS_COMPANION

    static final int CONTENTS_COMPANION

  A companion contents file.

  See Also:
    Constant Field Values

### PAGE_COMPANION

    static final int PAGE_COMPANION

  A companion page file.

  See Also:
    Constant Field Values

### MISC_COMPANION

    static final int MISC_COMPANION

  A miscellaneous companion file.

  See Also:
    Constant Field Values

### MAIN_FRAME_FILE

    static final int MAIN_FRAME_FILE

  The main frame file.

  See Also:
    Constant Field Values

Method Detail

### getEncoding

    java.lang.String getEncoding()
                                 throws java.rmi.RemoteException,
                                        java.lang.IllegalStateException

  Returns the encoding of the file.

  Returns:
    `String` The file encoding.
  Throws:
    `java.rmi.RemoteException` - If a network anomaly is encountered.
    `java.lang.IllegalStateException` - If the package containing this entry is already closed.

### setEncoding

    void setEncoding(java.lang.String encoding)
                     throws java.lang.IllegalStateException,
                            java.rmi.RemoteException

  Sets the file encoding. When an HTML entry is published, the encoding of the HTML is published as metadata along with the HTML entry. When published, the HTML file is parsed. If the charset= attribute is specified in the META tag, this encoding value will be used. If not found, the value specified on this method will be used. Otherwise, a default encoding of ISO-8859-1 will set set.

  Parameters:
    `encoding` - The encoding of the file.
  Throws:
    `java.lang.IllegalStateException` - If the entry is read only or if the package containing this entry has already been closed.
    `java.rmi.RemoteException` - If a network anomaly is encountered.

### getURL

    java.lang.String getURL()
                            throws java.rmi.RemoteException,
                                   java.lang.IllegalStateException

  Returns the URL of the file.

  Returns:
    `String` The URL for the file.
  Throws:
    `java.rmi.RemoteException` - If a network anomaly is encountered.
    `java.lang.IllegalStateException` - If the package containing this entry is already closed.

### setURL

    void setURL(java.lang.String url)
                throws java.lang.IllegalStateException,
                       java.rmi.RemoteException

  Sets the URL of the file.

  Parameters:
    `url` - The URL for the file.
  Throws:
    `java.lang.IllegalStateException` - If the entry is read only or if the package containing this entry has already been closed.
    `java.rmi.RemoteException` - If a network anomaly is encountered.

### getName

    java.lang.String getName()
                             throws java.rmi.RemoteException,
                                    java.lang.IllegalStateException

  Returns the name of the file.

  Returns:
    `String` The name of the file.
  Throws:
    `java.rmi.RemoteException` - If a network anomaly is encountered.
    `java.lang.IllegalStateException` - If the package containing this entry is already closed.

### getRole

    int getRole()
                throws java.rmi.RemoteException,
                       java.lang.IllegalStateException

  Returns the role of this file.

  Returns:
    `int` The role of this file. Supported roles include `BODY_COMPANION`, `MAIN_BODY_FILE`, `MAIN_FRAME_FILE`, `FRAME_COMPANION`, `CONTENTS_COMPANION`, `PAGE_COMPANION` and `MISC_COMPANION`.
  Throws:
    `java.rmi.RemoteException` - If a network anomaly is encountered.
    `java.lang.IllegalStateException` - If the package containing this entry is already closed.

### getMIMEType

    java.lang.String getMIMEType()
                                 throws java.rmi.RemoteException,
                                        java.lang.IllegalStateException

  Returns the MIME type associated with this file. The user-specified MIME type is assigned when the file is published.

  Returns:
    `String` The MIME type associated with this file; can be `null`.
  Throws:
    `java.rmi.RemoteException` - If a network anomaly is encountered.
    `java.lang.IllegalStateException` - If the package containing this entry is already closed.

### setMIMEType

    void setMIMEType(java.lang.String mimeType)
                     throws java.lang.IllegalStateException,
                            java.rmi.RemoteException

  Sets the MIME type associated with this file.

  Parameters:
    `mimeType` - The MIME type associated with this file.
  Throws:
    `java.lang.IllegalStateException` - If the entry is read only or if the package containing this entry has already been closed.
    `java.rmi.RemoteException` - If a network anomaly is encountered.

### getInputStream

    java.io.InputStream getInputStream(java.lang.Object streamID)
                                       throws java.rmi.UnmarshalException,
                                              java.io.IOException,
                                              java.rmi.RemoteException,
                                              java.lang.IllegalStateException

  Deprecated. Use `getInputStream()` which now supports remote input streams.

  Gets the input stream for this HTML or companion file. Because input streams are not remotable, this method will throw a RemoteException if it is invoked on a remote object. Distributed applications should utilize `getRemoteInputStream(java.lang.Object)` in order to obtain the input stream.

  Specified by:
    `getInputStream` in interface `com.sas.io.InputStreamProviderInterface`
  Parameters:
    `streamID` - The stream description should be `null`; it will be ignored.
  Returns:
    The input stream that can be used for reading the contents of this file.
  Throws:
    `java.rmi.UnmarshalException` - If invoked on a remote object.
    `java.io.IOException` - If an error occurs constructing the input stream.
    `java.rmi.RemoteException` - If a network anomaly is encountered.
    `java.lang.IllegalStateException` - If the package containing this entry is already closed.

### getRemoteInputStream

    com.sas.io.RemoteInputStreamInterface getRemoteInputStream(java.lang.Object streamID)
                                                               throws java.io.IOException,
                                                                      java.rmi.RemoteException,
                                                                      java.lang.IllegalStateException

  Deprecated. Use `getInputStream()` which now supports remote input streams.

  Get the remote input stream for the HTML or companion file. Because input streams are not remotable, distributed applications should use remote input streams.

  Specified by:
    `getRemoteInputStream` in interface `com.sas.io.InputStreamProviderInterface`
  Parameters:
    `streamID` - The stream description should be `null`; it will be ignored.
  Returns:
    `RemoteInputStream` The remote input stream that can be used for reading the contents of this file.
  Throws:
    `java.io.IOException` - If an error occurs constructing the remote input stream.
    `java.rmi.RemoteException` - If a network anomaly is encountered.
    `java.lang.IllegalStateException` - If the package containing this entry is already closed.

### hasInputStream

    java.lang.Object hasInputStream()
                                    throws java.rmi.UnmarshalException,
                                           java.rmi.RemoteException

  Deprecated. this method no longer needed as getInputStream() will return an input stream that can be used in a remote environment

  Check if `getInputStream(java.lang.Object)` will succeed. See `getInputStream(java.lang.Object)` to determine whether this method should be used.

  Specified by:
    `hasInputStream` in interface `com.sas.io.InputStreamProviderInterface`
  Returns:
    `Object` non-null if getInputStream(java.lang.Object) would succeed; throws UnmarshalException if it would fail
  Throws:
    `java.rmi.UnmarshalException` - if invoked on a remote obejct
    `java.rmi.RemoteException` - if a network anomaly is encountered.
    `java.lang.IllegalStateException` - if this result package has already been closed.

### getInputStream

    java.io.InputStream getInputStream()
                                       throws java.io.IOException,
                                              java.rmi.RemoteException,
                                              java.lang.IllegalStateException

  Gets the input stream for this HTML or companion file.

  Returns:
    The input stream that can be used for reading the contents of this file.
  Throws:
    `java.io.IOException` - If an error occurs constructing the input stream.
    `java.rmi.RemoteException` - If a network anomaly is encountered.
    `java.lang.IllegalStateException` - If the package containing this entry is already closed.

*** This interface provides Binary Compatibility only, not Source Compatibility ***

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Foundation |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.