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

com.sas.services.publish
Interface HTMLEntryInterface

All Superinterfaces:
com.sas.entities.EntityKeyInterface, EntryInterface, java.rmi.Remote
All Known Implementing Classes:
HTMLEntry

public interface HTMLEntryInterface
extends EntryInterface, java.rmi.Remote

The HTMLEntryInterface provides a mechanism for getting and setting the attributes of an HTML entry.

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:
HTMLFileInterface

Method Summary
 void addCompanionFile(HTMLFileInterface companion)
          Adds a companion to file to the HTML entry.
 HTMLFileInterface[] getCompanionFiles()
          Returns an array of all companion files included in this HTML entry.
 HTMLFileInterface getFile()
          Returns the main file for this HTML entry.
 HTMLFileInterface getFile(java.lang.String uniqueId)
          Returns the file identified by the entity key.
 void setCompanionFiles(HTMLFileInterface[] companions)
          Sets the companion to files for this HTML entry.
 void setFile(HTMLFileInterface mainFile)
          Sets the main file for this HTML entry.
 
Methods inherited from interface com.sas.services.publish.EntryInterface
getDescription, getNameValuePairs, getURL, isReadOnly, setDescription, setNameValuePairs
 

Method Detail

getFile

HTMLFileInterface getFile()
                          throws TransportException,
                                 java.rmi.RemoteException,
                                 java.lang.IllegalStateException
Returns 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.

Returns:
HTMLFileInterface The main HTML file for this set.
Throws:
TransportException - If the transport encounters an error getting the file.
java.rmi.RemoteException - If a network anomaly is encountered.
java.lang.IllegalStateException - If the package containing this entry is already closed.

setFile

void setFile(HTMLFileInterface mainFile)
             throws java.lang.IllegalArgumentException,
                    java.lang.IllegalStateException,
                    java.rmi.RemoteException
Sets the main file for this HTML entry. This file is designated as the main file for this HTML entry. This should be either the frame file, if it exists, or the body file.

Parameters:
mainFile - The main HTML file for this set.
Throws:
java.lang.IllegalArgumentException - If the file type is anything other than HTMLFileInterface.MAIN_BODY_FILE or HTMLFileInterface.MAIN_FRAME_FILE.
java.lang.IllegalStateException - If the entry is read only or if the package containing this entry has already been closed.
java.rmi.RemoteException - If a network anomaly is encountered.

getCompanionFiles

HTMLFileInterface[] getCompanionFiles()
                                      throws TransportException,
                                             java.rmi.RemoteException,
                                             java.lang.IllegalStateException
Returns 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. Ordering is preserved between addCompanionFile(HTMLFileInterface) and getCompanionFiles().

Returns:
HTMLFileInterface[] An array of HTMLFileInterface objects.
Throws:
TransportException - If the transport encounters an error getting the companion files.
java.rmi.RemoteException - If a network anomaly is encountered.
java.lang.IllegalStateException - If the package containing this entry is already closed.

addCompanionFile

void addCompanionFile(HTMLFileInterface companion)
                      throws java.lang.IllegalArgumentException,
                             java.lang.IllegalStateException,
                             java.rmi.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. Ordering is preserved between addCompanionFile(HTMLFileInterface) and getCompanionFiles().

Parameters:
companion - The companion file to add to the existing HTML entry.
Throws:
java.lang.IllegalArgumentException - If the file type added is HTMLFileInterface.MAIN_BODY_FILE or HTMLFileInterface.MAIN_FRAME_FILE.
java.lang.IllegalStateException - If the entry is read only or if the package containing this entry has already been closed.
java.rmi.RemoteException - If a network anomaly is encountered.

setCompanionFiles

void setCompanionFiles(HTMLFileInterface[] companions)
                       throws java.lang.IllegalArgumentException,
                              java.lang.IllegalStateException,
                              java.rmi.RemoteException
Sets the companion to files for this HTML entry. This replaces any previously set companion files.

Parameters:
companions - The companion files to set for this HTML entry.
Throws:
java.lang.IllegalArgumentException - If any of the companion files have a role of HTMLFileInterface.MAIN_BODY_FILE or HTMLFileInterface.MAIN_FRAME_FILE.
java.lang.IllegalStateException - If the entry is read only or if the package containing this entry has already been closed.
java.rmi.RemoteException - If a network anomaly is encountered.

getFile

HTMLFileInterface getFile(java.lang.String uniqueId)
                          throws java.lang.IllegalStateException,
                                 java.rmi.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.

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:
HTMLFileInterface The file within the HTML entry. This may be null if no file is found with the specified identifier.
Throws:
java.lang.IllegalStateException - If the result package has already been closed.
TransportException - If the transport encounters an error getting the entry.
java.rmi.RemoteException - If a network anomaly is encountered.

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




Copyright © 2009 SAS Institute Inc. All Rights Reserved.