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

Interface HTMLFileInterface

All Superinterfaces:
com.sas.entities.EntityKeyInterface, com.sas.io.InputStreamProviderInterface, Remote
All Known Implementing Classes:
HTMLFile

@SASScope("ALL") @BinaryCompatibilityOnly public interface HTMLFileInterface extends com.sas.io.InputStreamProviderInterface, com.sas.entities.EntityKeyInterface, 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:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    A companion body file.
    static final int
    A companion contents file.
    static final int
    A companion frame file.
    static final int
    The main body file.
    static final int
    The main frame file.
    static final int
    A miscellaneous companion file.
    static final int
    A companion page file.
  • Method Summary

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

    Methods inherited from interface com.sas.entities.EntityKeyInterface

    getEntityKey, sameEntity, setEntityKey
  • Field Details

    • MAIN_BODY_FILE

      static final int MAIN_BODY_FILE
      The main body file.
      See Also:
    • BODY_COMPANION

      static final int BODY_COMPANION
      A companion body file.
      See Also:
    • FRAME_COMPANION

      static final int FRAME_COMPANION
      A companion frame file.
      See Also:
    • CONTENTS_COMPANION

      static final int CONTENTS_COMPANION
      A companion contents file.
      See Also:
    • PAGE_COMPANION

      static final int PAGE_COMPANION
      A companion page file.
      See Also:
    • MISC_COMPANION

      static final int MISC_COMPANION
      A miscellaneous companion file.
      See Also:
    • MAIN_FRAME_FILE

      static final int MAIN_FRAME_FILE
      The main frame file.
      See Also:
  • Method Details

    • getEncoding

      String getEncoding() throws RemoteException, IllegalStateException
      Returns the encoding of the file.
      Returns:
      String The file encoding.
      Throws:
      RemoteException - If a network anomaly is encountered.
      IllegalStateException - If the package containing this entry is already closed.
    • setEncoding

      void setEncoding(String encoding) throws IllegalStateException, 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:
      IllegalStateException - If the entry is read only or if the package containing this entry has already been closed.
      RemoteException - If a network anomaly is encountered.
    • getURL

      String getURL() throws RemoteException, IllegalStateException
      Returns the URL of the file.
      Returns:
      String The URL for the file.
      Throws:
      RemoteException - If a network anomaly is encountered.
      IllegalStateException - If the package containing this entry is already closed.
    • setURL

      void setURL(String url) throws IllegalStateException, RemoteException
      Sets the URL of the file.
      Parameters:
      url - The URL for the file.
      Throws:
      IllegalStateException - If the entry is read only or if the package containing this entry has already been closed.
      RemoteException - If a network anomaly is encountered.
    • getName

      String getName() throws RemoteException, IllegalStateException
      Returns the name of the file.
      Returns:
      String The name of the file.
      Throws:
      RemoteException - If a network anomaly is encountered.
      IllegalStateException - If the package containing this entry is already closed.
    • getRole

      int getRole() throws RemoteException, 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:
      RemoteException - If a network anomaly is encountered.
      IllegalStateException - If the package containing this entry is already closed.
    • getMIMEType

      String getMIMEType() throws RemoteException, 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:
      RemoteException - If a network anomaly is encountered.
      IllegalStateException - If the package containing this entry is already closed.
    • setMIMEType

      void setMIMEType(String mimeType) throws IllegalStateException, RemoteException
      Sets the MIME type associated with this file.
      Parameters:
      mimeType - The MIME type associated with this file.
      Throws:
      IllegalStateException - If the entry is read only or if the package containing this entry has already been closed.
      RemoteException - If a network anomaly is encountered.
    • getInputStream

      InputStream getInputStream(Object streamID) throws UnmarshalException, IOException, RemoteException, 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:
      UnmarshalException - If invoked on a remote object.
      IOException - If an error occurs constructing the input stream.
      RemoteException - If a network anomaly is encountered.
      IllegalStateException - If the package containing this entry is already closed.
    • getRemoteInputStream

      com.sas.io.RemoteInputStreamInterface getRemoteInputStream(Object streamID) throws IOException, RemoteException, 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:
      IOException - If an error occurs constructing the remote input stream.
      RemoteException - If a network anomaly is encountered.
      IllegalStateException - If the package containing this entry is already closed.
    • hasInputStream

      Object hasInputStream() throws UnmarshalException, 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:
      UnmarshalException - if invoked on a remote obejct
      RemoteException - if a network anomaly is encountered.
      IllegalStateException - if this result package has already been closed.
    • getInputStream

      InputStream getInputStream() throws IOException, RemoteException, 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:
      IOException - If an error occurs constructing the input stream.
      RemoteException - If a network anomaly is encountered.
      IllegalStateException - If the package containing this entry is already closed.