*** This interface provides Binary Compatibility only, not Source Compatibility ***
Package com.sas.services.publish
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 -
Method Summary
Modifier and TypeMethodDescriptionStringReturns the encoding of viewer.InputStreamGets the input stream for the viewer entry.InputStreamgetInputStream(Object streamID) Deprecated.StringReturns the MIME type associated with this viewer entry.StringgetName()Returns the name of the file.ReaderGets reader for this viewer entry.ReadergetReader(Object readerID) Deprecated.UsegetReader()which now supports remote readers.com.sas.io.RemoteInputStreamInterfacegetRemoteInputStream(Object streamID) Deprecated.UsegetInputStream()which now supports remote input streams.com.sas.io.RemoteReaderInterfacegetRemoteReader(Object readerID) Deprecated.UsegetReader()which now supports remote readers.intReturns the type of viewer, HTML or text.ObjectDeprecated.this method no longer needed as getInputStream() will return an input stream that can be used in a remote environmentObjectDeprecated.this method no longer needed as getReader() will return a reader that can be used in a remote environmentvoidsetEncoding(String encoding) Sets the viewer encoding.voidsetMIMEType(String mimeType) Sets the MIME type associated with this viewer file.Methods inherited from interface com.sas.entities.EntityKeyInterface
getEntityKey, sameEntity, setEntityKeyMethods inherited from interface com.sas.services.publish.EntryInterface
getDescription, getNameValuePairs, getURL, isReadOnly, setDescription, setNameValuePairs
-
Field Details
-
HTML_VIEWER
static final int HTML_VIEWER- See Also:
-
TEXT_VIEWER
static final int TEXT_VIEWER- See Also:
-
-
Method Details
-
getEncoding
Returns the encoding of viewer.- Returns:
StringThe encoding of the viewer; can benull.- 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
Returns the type of viewer, HTML or text.- Returns:
intThe type of viewer. Supported viewer types includeHTML_VIEWERorTEXT_VIEWER.- Throws:
TransportException- If the transport encounters an error getting the viewer type.RemoteException- If a network anomaly is encounteredIllegalStateException- If the package is already closed.
-
getName
Returns the name of the file.- Returns:
StringThe 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
Returns the MIME type associated with this viewer entry. The user-specified MIME type is assigned when the viewer entry is published.- Returns:
StringThe MIME type associated with this file; can benull.- 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.UsegetInputStream()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 utilizegetRemoteInputStream(java.lang.Object)in order to obtain the input stream.- Specified by:
getInputStreamin interfacecom.sas.io.InputStreamProviderInterface- Parameters:
streamID- The stream description should benull; 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.UsegetInputStream()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:
getRemoteInputStreamin interfacecom.sas.io.InputStreamProviderInterface- Parameters:
streamID- The stream description should benull; it will be ignored.- Returns:
RemoteInputStreamThe 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.UsegetReader()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 utilizegetRemoteReader(java.lang.Object)in order to obtain the reader.- Specified by:
getReaderin interfacecom.sas.io.ReaderProviderInterface- Parameters:
readerID- The reader description should benull; 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 viewerUnmarshalException- 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.UsegetReader()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:
getRemoteReaderin interfacecom.sas.io.ReaderProviderInterface- Parameters:
readerID- The reader description should benull; it will be ignored.- Returns:
RemoteReaderThe remote reader that can be used for reading the contents of the viewer entry.- Throws:
IllegalStateException- If invoked on an html viewerIOException- If an error occurs constructing the remote reader.RemoteException- If a network anomaly is encountered.
-
hasReader
Object hasReader() throws UnmarshalException, RemoteExceptionDeprecated.this method no longer needed as getReader() will return a reader that can be used in a remote environmentCheck ifgetReader(java.lang.Object)will succeed. SeegetReader(java.lang.Object)to determine whether this method should be used.- Specified by:
hasReaderin interfacecom.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 objectRemoteException- if a network I/O error occurs.
-
hasInputStream
Object hasInputStream() throws UnmarshalException, RemoteExceptionDeprecated.this method no longer needed as getInputStream() will return an input stream that can be used in a remote environmentCheck ifgetInputStream(java.lang.Object)will succeed. SeegetInputStream(java.lang.Object)to determine whether this method should be used.- Specified by:
hasInputStreamin interfacecom.sas.io.InputStreamProviderInterface- Returns:
Objectnon-null if getInputStream(java.lang.Object) would succeed; throws UnmarshalException if it would fail- Throws:
UnmarshalException- if invoked on a remote obejctRemoteException- if a network anomaly is encountered.IllegalStateException- if this result package has already been closed.
-
getInputStream
InputStream getInputStream() throws IllegalStateException, IOException, RemoteExceptionGets 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, RemoteExceptionGets 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 viewerIOException- If an error occurs constructing the reader.RemoteException- If a network anomaly is encountere.
-
getInputStream()which now supports remote input streams.