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

Interface ViewerEntryInterface

All Superinterfaces:
com.sas.entities.EntityKeyInterface, EntryInterface, com.sas.io.InputStreamProviderInterface, com.sas.io.ReaderProviderInterface, Remote
All Known Implementing Classes:
ViewerEntry

@SASScope("ALL") @BinaryCompatibilityOnly public interface ViewerEntryInterface extends EntryInterface, com.sas.io.InputStreamProviderInterface, com.sas.io.ReaderProviderInterface
The ViewerEntryInterface provides a mechanism for setting and getting the attributes of a viewer entry. In the MVA Publishing Framework, a viewer is a custom-written template that contains HTML tags for formatting result set package content for view-only transports, such as e-mail. The viewer file is applied to the package during package publishing. A viewer file is particularly useful for rendering a SAS data set in a tabular format for viewing in e-mail. Also, it is useful for streaming dynamic information in the form of a binary file or a URL for inclusion in an electronic newsletter format.

The viewer is not used for rendering purposes in the Java Publishing Framework, but viewer entries can be published and retrieved.

Since:
1.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    String
    Returns the encoding of viewer.
    InputStream
    Gets the input stream for the viewer entry.
    InputStream
    getInputStream(Object streamID)
    Deprecated.
    Use getInputStream() which now supports remote input streams.
    String
    Returns the MIME type associated with this viewer entry.
    String
    Returns the name of the file.
    Reader
    Gets reader for this viewer entry.
    Reader
    getReader(Object readerID)
    Deprecated.
    Use getReader() which now supports remote readers.
    com.sas.io.RemoteInputStreamInterface
    getRemoteInputStream(Object streamID)
    Deprecated.
    Use getInputStream() which now supports remote input streams.
    com.sas.io.RemoteReaderInterface
    getRemoteReader(Object readerID)
    Deprecated.
    Use getReader() which now supports remote readers.
    int
    Returns the type of viewer, HTML or text.
    Object
    Deprecated.
    this method no longer needed as getInputStream() will return an input stream that can be used in a remote environment
    Object
    Deprecated.
    this method no longer needed as getReader() will return a reader that can be used in a remote environment
    void
    setEncoding(String encoding)
    Sets the viewer encoding.
    void
    setMIMEType(String mimeType)
    Sets the MIME type associated with this viewer file.

    Methods inherited from interface com.sas.entities.EntityKeyInterface

    getEntityKey, sameEntity, setEntityKey

    Methods inherited from interface com.sas.services.publish.EntryInterface

    getDescription, getNameValuePairs, getURL, isReadOnly, setDescription, setNameValuePairs
  • Field Details

  • Method Details

    • getEncoding

      String getEncoding() throws RemoteException, TransportException
      Returns the encoding of viewer.
      Returns:
      String The encoding of the viewer; can be null.
      Throws:
      TransportException - If the transport encounters an error getting the encoding.
      RemoteException - If a network anomaly is encountered.
      IllegalStateException - If the package is already closed.
    • setEncoding

      void setEncoding(String encoding) throws IllegalStateException, RemoteException
      Sets the viewer encoding.

      If this is a text viewer, the encoding is used when constructing the Reader that is returned by getReader and getRemoteReader, and it is used to publish the viewer.

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

      Parameters:
      encoding - The encoding for this viewer.
      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
    • getViewerType

      int getViewerType() throws TransportException, RemoteException
      Returns the type of viewer, HTML or text.
      Returns:
      int The type of viewer. Supported viewer types include HTML_VIEWER or TEXT_VIEWER.
      Throws:
      TransportException - If the transport encounters an error getting the viewer type.
      RemoteException - If a network anomaly is encountered
      IllegalStateException - If the package is already closed.
    • getName

      String getName() throws RemoteException, TransportException
      Returns the name of the file.
      Returns:
      String The name of the file.
      Throws:
      TransportException - If the transport encounters an error getting the name of the file.
      RemoteException - If a network anomaly is encountered.
      IllegalStateException - If the package is already closed.
    • getMIMEType

      String getMIMEType() throws RemoteException, TransportException
      Returns the MIME type associated with this viewer entry. The user-specified MIME type is assigned when the viewer entry is published.
      Returns:
      String The MIME type associated with this file; can be null.
      Throws:
      TransportException - If the transport encounters an error getting the MIME type.
      RemoteException - If a network anomaly is encountered.
      IllegalStateException - If the package is already closed.
    • setMIMEType

      void setMIMEType(String mimeType) throws IllegalStateException, RemoteException
      Sets the MIME type associated with this viewer file.
      Parameters:
      mimeType - The MIME type associated with this viewer 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 IllegalStateException, UnmarshalException, IOException, RemoteException
      Deprecated.
      Use getInputStream() which now supports remote input streams.
      Gets the input stream for the viewer entry. This method is only supported by HTML viewers. 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 viewer entry.
      Throws:
      IllegalStateException - If invoked on a text viewer or if the package containing this entry is already closed.
      UnmarshalException - If invoked on a remote object.
      IOException - If an error occurs constructing the input stream.
      RemoteException - If a network anomaly is encountered.
    • getRemoteInputStream

      com.sas.io.RemoteInputStreamInterface getRemoteInputStream(Object streamID) throws IllegalStateException, IOException, RemoteException
      Deprecated.
      Use getInputStream() which now supports remote input streams.
      Get the remote input stream for the viewer entry. This method is only valid for HTML viewers. 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 viewer entry.
      Throws:
      IllegalStateException - If invoked on a text viewer or if the package containing this entry is already closed.
      IOException - If an error occurs constructing the remote input stream.
      RemoteException - If a network anomaly is encountered.
    • getReader

      Reader getReader(Object readerID) throws IllegalStateException, UnmarshalException, IOException, RemoteException
      Deprecated.
      Use getReader() which now supports remote readers.
      Gets reader for this viewer entry. This method is only valid for text viewers. Because readers are not remotable, this method will throw a RemoteException if it is invoked on a remote object. Distributed applications should utilize getRemoteReader(java.lang.Object) in order to obtain the reader.
      Specified by:
      getReader in interface com.sas.io.ReaderProviderInterface
      Parameters:
      readerID - The reader description should be null; it will be ignored.
      Returns:
      The reader that can be used for reading the contents of the viewer entry.
      Throws:
      IllegalStateException - If invoked on an html viewer
      UnmarshalException - If invoked on a remote object.
      IOException - If an error occurs constructing the reader.
      RemoteException - If a network anomaly is encountere.
    • getRemoteReader

      com.sas.io.RemoteReaderInterface getRemoteReader(Object readerID) throws IllegalStateException, IOException, RemoteException
      Deprecated.
      Use getReader() which now supports remote readers.
      Get the remote reader for this viewer entry. This method is only valid for text viewers. Because readers are not remotable, distributed applications should use remote readers.
      Specified by:
      getRemoteReader in interface com.sas.io.ReaderProviderInterface
      Parameters:
      readerID - The reader description should be null; it will be ignored.
      Returns:
      RemoteReader The remote reader that can be used for reading the contents of the viewer entry.
      Throws:
      IllegalStateException - If invoked on an html viewer
      IOException - If an error occurs constructing the remote reader.
      RemoteException - If a network anomaly is encountered.
    • hasReader

      Object hasReader() throws UnmarshalException, RemoteException
      Deprecated.
      this method no longer needed as getReader() will return a reader that can be used in a remote environment
      Check if getReader(java.lang.Object) will succeed. See getReader(java.lang.Object) to determine whether this method should be used.
      Specified by:
      hasReader in interface com.sas.io.ReaderProviderInterface
      Returns:
      non-null if getReader(java.lang.Object) would succeed; throws UnmarshalException if it would fail
      Throws:
      UnmarshalException - if invoked on a remote object
      RemoteException - if a network I/O error occurs.
    • 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 IllegalStateException, IOException, RemoteException
      Gets the input stream for the viewer entry.
      Returns:
      The input stream that can be used for reading the contents of this viewer entry.
      Throws:
      IllegalStateException - If invoked on a text viewer or if the package containing this entry is already closed.
      IOException - If an error occurs constructing the input stream.
      RemoteException - If a network anomaly is encountered.
    • getReader

      Reader getReader() throws IllegalStateException, IOException, RemoteException
      Gets reader for this viewer entry.
      Returns:
      The reader that can be used for reading the contents of the viewer entry.
      Throws:
      IllegalStateException - If invoked on an html viewer
      IOException - If an error occurs constructing the reader.
      RemoteException - If a network anomaly is encountere.