*** 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
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
FieldsModifier and TypeFieldDescriptionstatic final intA companion body file.static final intA companion contents file.static final intA companion frame file.static final intThe main body file.static final intThe main frame file.static final intA miscellaneous companion file.static final intA companion page file. -
Method Summary
Modifier and TypeMethodDescriptionStringReturns the encoding of the file.InputStreamGets the input stream for this HTML or companion file.InputStreamgetInputStream(Object streamID) Deprecated.StringReturns the MIME type associated with this file.StringgetName()Returns the name of the file.com.sas.io.RemoteInputStreamInterfacegetRemoteInputStream(Object streamID) Deprecated.UsegetInputStream()which now supports remote input streams.intgetRole()Returns the role of this file.StringgetURL()Returns the URL of the file.ObjectDeprecated.this method no longer needed as getInputStream() will return an input stream that can be used in a remote environmentvoidsetEncoding(String encoding) Sets the file encoding.voidsetMIMEType(String mimeType) Sets the MIME type associated with this file.voidsetURL(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_FILEThe main body file.- See Also:
-
BODY_COMPANION
static final int BODY_COMPANIONA companion body file.- See Also:
-
FRAME_COMPANION
static final int FRAME_COMPANIONA companion frame file.- See Also:
-
CONTENTS_COMPANION
static final int CONTENTS_COMPANIONA companion contents file.- See Also:
-
PAGE_COMPANION
static final int PAGE_COMPANIONA companion page file.- See Also:
-
MISC_COMPANION
static final int MISC_COMPANIONA miscellaneous companion file.- See Also:
-
MAIN_FRAME_FILE
static final int MAIN_FRAME_FILEThe main frame file.- See Also:
-
-
Method Details
-
getEncoding
String getEncoding() throws RemoteException, IllegalStateExceptionReturns the encoding of the file.- Returns:
StringThe 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, IllegalStateExceptionReturns the URL of the file.- Returns:
StringThe 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, IllegalStateExceptionReturns the name of the file.- Returns:
StringThe 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, IllegalStateExceptionReturns the role of this file.- Returns:
intThe role of this file. Supported roles includeBODY_COMPANION,MAIN_BODY_FILE,MAIN_FRAME_FILE,FRAME_COMPANION,CONTENTS_COMPANION,PAGE_COMPANIONandMISC_COMPANION.- Throws:
RemoteException- If a network anomaly is encountered.IllegalStateException- If the package containing this entry is already closed.
-
getMIMEType
String getMIMEType() throws RemoteException, IllegalStateExceptionReturns the MIME type associated with this file. The user-specified MIME type is assigned when the file is published.- Returns:
StringThe MIME type associated with this file; can benull.- 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.UsegetInputStream()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 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 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.UsegetInputStream()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:
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 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, 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 IOException, RemoteException, IllegalStateExceptionGets 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.
-
getInputStream()which now supports remote input streams.