*** This class provides Binary Compatibility only, not Source Compatibility ***
Class HTMLEntry
- All Implemented Interfaces:
com.sas.entities.EntityKeyInterface,EntryInterface,HTMLEntryInterface,Serializable,Remote
An HTML entry 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 entry contains a main HTML 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 for the HTML entry. The HTML entry can also contain any number of 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.
- Since:
- 1.0
- See Also:
-
Field Summary
Fields inherited from class com.sas.services.publish.AbstractEntry
BINARY_COMPAT_VERSION, CATALOG_COMPAT_VERSION, DATASET_COMPAT_VERSION, DEFAULT_ENTRY_VERSION, HTML_COMPAT_VERSION, MDDB_COMPAT_VERSION, NESTEDPACKAGE_COMPAT_VERSION, REFERENCE_COMPAT_VERSION, SQLVIEW_COMPAT_VERSION, TEXT_COMPAT_VERSION, VERSION_94_EXTENDED_ATTRIBUTES, VIEWER_COMPAT_VERSIONFields inherited from class java.rmi.server.RemoteObject
ref -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an instance which will export a remote object using RMI socket factories associated with HTMLEntry.class.HTMLEntry(HTMLFileInterface main, HTMLFileInterface[] companions) Constructs an instance which will export a remote object using RMI socket factories associated with HTMLEntry.class for the specified HTML file and companions. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCompanionFile(HTMLFileInterface companion) Adds a companion to file to the HTML entry.protected voidRemove any temporary files needed for inputstream re-use and mark this entry as closed.Returns an array of all companion files included in this HTML entry.getFile()Returns the main file for this HTML entry.getFile(String uniqueId) Returns the file identified by the entity key.voidsetCompanionFiles(HTMLFileInterface[] companions) Sets the companion to files for this HTML entry.voidsetFile(HTMLFileInterface mainFile) Sets the main file for this HTML entry.Methods inherited from class com.sas.services.publish.AbstractEntry
getDescription, getEntityKey, getNameValuePairs, getURL, isClosed, isReadOnly, sameEntity, setClosed, setDescription, setEntityKey, setNameValuePairs, setRead, throwExceptionIfClosedMethods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObjectMethods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLogMethods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStubMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.sas.entities.EntityKeyInterface
getEntityKey, sameEntity, setEntityKeyMethods inherited from interface com.sas.services.publish.EntryInterface
getDescription, getNameValuePairs, getURL, isReadOnly, setDescription, setNameValuePairs
-
Constructor Details
-
HTMLEntry
public HTMLEntry() throws RemoteExceptionConstructs an instance which will export a remote object using RMI socket factories associated with HTMLEntry.class.- Throws:
RemoteException- If a network anomaly is encountered.
-
HTMLEntry
Constructs an instance which will export a remote object using RMI socket factories associated with HTMLEntry.class for the specified HTML file and companions.- Parameters:
main- The main HTML file for this HTML entry.companions- The companion files for this HTML entry.- Throws:
IllegalArgumentException- If an invalid role is specified for any of the companion files or the main file. The main file must have a role ofHTMLFileInterface.MAIN_BODY_FILEorHTMLFileInterface.MAIN_FRAME_FILE. The companion files must have a role ofHTMLFileInterface.BODY_COMPANION,HTMLFileInterface.FRAME_COMPANION,HTMLFileInterface.CONTENTS_COMPANION,HTMLFileInterface.PAGE_COMPANIONorHTMLFileInterface.MISC_COMPANION.RemoteException- If a network anomaly is encountered.
-
-
Method Details
-
getFile
public HTMLFileInterface getFile() throws RemoteException, TransportException, IllegalStateExceptionReturns the main file for this HTML entry. For ODS generated HTML files, this is typically the frame file if it exists; otherwise it is the main body file.- Specified by:
getFilein interfaceHTMLEntryInterface- Returns:
HTMLFileInterfaceThe main HTML file for this set.- Throws:
TransportException- If the transport encounters an error getting the file.RemoteException- If a network anomaly is encountered.IllegalStateException- if the result package containing this entry has already been closed.
-
setFile
public void setFile(HTMLFileInterface mainFile) throws IllegalArgumentException, IllegalStateException, RemoteException Sets the main file for this HTML entry.- Specified by:
setFilein interfaceHTMLEntryInterface- Parameters:
mainFile- The main HTML file for this HTML entry.- Throws:
IllegalArgumentException- If the file type is anything other thanHTMLFileInterface.MAIN_BODY_FILEorHTMLFileInterface.MAIN_FRAME_FILE.IllegalStateException- If the entry is read only or if the result package containing this entry has already been closed.RemoteException- If a network anomaly is encountered.
-
getFile
public HTMLFileInterface getFile(String uniqueId) throws IllegalStateException, RemoteException, TransportException Returns the file identified by the entity key. The file can be the main HTML file or any companion file within the HTML set.- Specified by:
getFilein interfaceHTMLEntryInterface- Parameters:
uniqueId- The unique identifier of the desired file. This unique identifier can identify the main file or any companion file within the HTML entry.- Returns:
HTMLFileInterfaceThe file within the HTML entry. This may benullif no file is found with the specified identifier.- Throws:
IllegalStateException- If the result package containing this entry has already been closed.TransportException- If the transport encounters an error getting the entry.RemoteException- If a network anomaly is encountered.
-
getCompanionFiles
public HTMLFileInterface[] getCompanionFiles() throws RemoteException, TransportException, IllegalStateExceptionReturns an array of all companion files included in this HTML entry. The companion files are any files other than the main HTML file. The companion files can include, the body, frame, contents and page files, as well as any additional files (such as HTML, GIF, JPG) needed by the HTML entry. The order is preserved betweenaddCompanionFile(com.sas.services.publish.HTMLFileInterface)andgetCompanionFiles().- Specified by:
getCompanionFilesin interfaceHTMLEntryInterface- Returns:
HTMLFileInterface[]An array of HTMLFileInterface objects.- Throws:
IllegalStateException- if the result package containing this entry has already been closed.TransportException- If the transport encounters an error getting the companion files.RemoteException- If a network anomaly is encountered.
-
addCompanionFile
public void addCompanionFile(HTMLFileInterface companion) throws IllegalArgumentException, IllegalStateException, RemoteException Adds a companion to file to the HTML entry. An HTML entry can contain multiple companion files. This method adds the file to the existing companion files. The order is preserved betweenaddCompanionFile(com.sas.services.publish.HTMLFileInterface)andgetCompanionFiles().- Specified by:
addCompanionFilein interfaceHTMLEntryInterface- Parameters:
companion- The companion file to add to the existing HTML entry.- Throws:
IllegalArgumentException- If the file type added isHTMLFileInterface.MAIN_BODY_FILEorHTMLFileInterface.MAIN_FRAME_FILE.IllegalStateException- If the entry is read only or if the result package containing this entry has already been closed.RemoteException- If a network anomaly is encountered.
-
setCompanionFiles
public void setCompanionFiles(HTMLFileInterface[] companions) throws IllegalArgumentException, IllegalStateException, RemoteException Sets the companion to files for this HTML entry. This replaces any previously set companion files.- Specified by:
setCompanionFilesin interfaceHTMLEntryInterface- Parameters:
companions- The companion files to set for this HTML entry.- Throws:
IllegalArgumentException- If any of the companion files have a role ofHTMLFileInterface.MAIN_BODY_FILEorHTMLFileInterface.MAIN_FRAME_FILE.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.
-
closeEntry
protected void closeEntry()Remove any temporary files needed for inputstream re-use and mark this entry as closed.
-