|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResultPackageInterface
The ResultPackageInterface provides a mechanism for setting and getting the attributes of a result package. A result package is a collection of information, such as a collection of reports, tables and documents. A package can contain text files, binary files (such as GIF or JPG), HTML files, references, viewer files and SAS files such as SAS datasets. The ResultPackageInterface provides access to all the result package attributes and to all the entries included in the package.
Package metadata can be defined to provide more information about the result package:
TransportFactory
Method Summary | |
---|---|
void |
addEntry(EntryInterface entry)
Adds a new entry to the result package. |
void |
close()
Close the result package. |
void |
delete()
Delete the result package. |
java.lang.String |
getAbstract()
Returns the abstract of the result package. |
long |
getCreationDateTime()
Returns the creation datetime stamp. |
EntryInterface[] |
getEntries()
Return an array of all entries in this package. |
EntryInterface |
getEntry(int index)
Returns a particular result package entry as indicated by the specified index. |
EntryInterface |
getEntry(java.lang.String uniqueId)
Returns the result package entry identified by the entity key. |
EventDataInterface |
getEventData()
Returns the event data. |
long |
getExpirationDateTime()
Returns the expiration datetime stamp. |
java.io.InputStream |
getInputStream()
Gets the input stream for this result package. |
java.io.InputStream |
getInputStream(java.lang.Object streamID)
Deprecated. Use getInputStream() which now supports remote input streams. |
java.lang.String |
getName()
Returns the name for this result package. |
com.sas.io.RemoteInputStreamInterface |
getRemoteInputStream(java.lang.Object streamID)
Deprecated. Use getInputStream() which now supports remote input streams. |
java.lang.Object |
hasInputStream()
Deprecated. this method no longer needed as getInputStream() will return an input stream that can be used in a remote environment |
boolean |
isNested()
Returns true when the result package is a nested package. |
void |
setAbstract(java.lang.String description)
Set the abstract for the result package. |
void |
setExpirationDateTime(long expiration)
Sets the expiration datetime stamp for the result package. |
void |
setName(java.lang.String name)
Set the name for the result package. |
Methods inherited from interface com.sas.services.publish.EntryInterface |
---|
getDescription, getNameValuePairs, getURL, isReadOnly, setDescription, setNameValuePairs |
Method Detail |
---|
java.lang.String getAbstract() throws java.lang.IllegalStateException, TransportException, java.rmi.RemoteException
String
The abstract of the result package;
can be null
.
java.lang.IllegalStateException
- If the result package has already been
closed.
TransportException
- If the transport encounters an error
getting the abstract.
java.rmi.RemoteException
- If a network anomaly is encountered.void setAbstract(java.lang.String description) throws java.lang.IllegalStateException, java.rmi.RemoteException
description
- Plain text that is the abstract for this result package.
java.lang.IllegalStateException
- If the result package is read only or
the result package has already been closed.
java.rmi.RemoteException
- If a network anomaly is encountered.long getExpirationDateTime() throws java.lang.IllegalStateException, TransportException, java.rmi.RemoteException
long
The expiration datetime stamp for this result package.
java.lang.IllegalStateException
- If the result package has already been
closed.
TransportException
- If the transport encounters an error
getting the expiration datetime stamp.
java.rmi.RemoteException
- If a network anomaly is encountered.void setExpirationDateTime(long expiration) throws java.lang.IllegalStateException, java.rmi.RemoteException
expiration
- The expiration datetime stamp for this result package.
java.lang.IllegalStateException
- If the result package is read only or
the result package has already been closed.
java.rmi.RemoteException
- If a network anomaly is encountered.long getCreationDateTime() throws java.lang.IllegalStateException, TransportException, java.rmi.RemoteException
long
The creation datetime stamp for this result package.
java.lang.IllegalStateException
- If the result package is
an existing package that is being retrieved or if the result
package has already been closed.
TransportException
- If the transport encounters an error
getting the creation datetime stamp.
java.rmi.RemoteException
- If a network anomaly is encountered.java.lang.String getName() throws java.lang.IllegalStateException, TransportException, java.rmi.RemoteException
If the result package is retrieved using the archive transport, the name will be the canonical name of the .spk file. If the result package is a nested package, only the name of the nested .spk file is returned (not the complete path).
If the result package is retrieved using the WebDAV transport, the name will be the complete URL of the result package. If the result package is a nested package, only the name of of the nested package is returned (not the complete URL).
If the result package is retrieved using the requester transport,
the name will be null
.
String
The name of the result package; can be null.
java.lang.IllegalStateException
- If the result package has already been
closed.
TransportException
- If the transport encounters an error
getting the nested name.
java.rmi.RemoteException
- If a network anomaly is encountered.void setName(java.lang.String name) throws java.lang.IllegalStateException, java.rmi.RemoteException
name
- The name for this result package if published as a nested package; can be null.
java.lang.IllegalStateException
- If the result package is read only or
the result package has already been closed.
java.rmi.RemoteException
- If a network anomaly is encountered.EntryInterface getEntry(int index) throws java.lang.IllegalStateException, java.rmi.RemoteException, TransportException
index
- The zero-based index of the desired result package entry.
EntryInterface
The result package entry.
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.EntryInterface getEntry(java.lang.String uniqueId) throws java.lang.IllegalStateException, java.rmi.RemoteException, TransportException
uniqueId
- The unique identifier of the desired result package entry.
EntryInterface
The result package entry. This may be null
if no entry is found with the specified identifier.
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.EntryInterface[] getEntries() throws java.lang.IllegalStateException, java.rmi.RemoteException, TransportException
EntryInterface []
An array of EntryInterface objects.
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.void addEntry(EntryInterface entry) throws java.lang.IllegalStateException, java.rmi.RemoteException
entry
- The entry to add to the result package.
java.lang.IllegalStateException
- If the result package is read only or
the result package has already been closed.
java.rmi.RemoteException
- If a network anomaly is encountered.boolean isNested() throws java.rmi.RemoteException, java.lang.IllegalStateException
boolean
True if the result package is a
nested package;
otherwise if this is the main package,
false is returned.
java.lang.IllegalStateException
- If the result package is a new package
under construction or if the result package has already been
closed. A package under construction can be
inserted as an entry into another package, and thus the
nested context cannot be determined.
java.rmi.RemoteException
- If a network anomaly is encountered.void close() throws java.lang.IllegalStateException, TransportException, java.rmi.RemoteException
java.lang.IllegalStateException
- If the result package has already been
closed or if this is a nested package.
TransportException
- If the transport encounters an error
getting the entry.
java.rmi.RemoteException
- If a network anomaly is encountered.void delete() throws java.lang.UnsupportedOperationException, TransportException, java.rmi.RemoteException
java.lang.UnsupportedOperationException
- If the operation is not supported by
the transport.
java.lang.IllegalStateException
- If the result package is being constructed,
if this is a nested package, or if the result package has
already been closed.
TransportException
- If the transport encounters an error
deleting the package.
java.rmi.RemoteException
- If a network anomaly is encountered.EventDataInterface getEventData() throws TransportException, java.rmi.RemoteException
EventDataInterface
The event data which includes
the SASPackage event body, and the event persistence information.
TransportException
- If the transport encounters an error
getting the nested name.
java.rmi.RemoteException
- If a network anomaly is encountered.java.io.InputStream getInputStream(java.lang.Object streamID) throws java.rmi.UnmarshalException, java.io.IOException, java.rmi.RemoteException, java.lang.IllegalStateException
getInputStream()
which now supports remote input streams.
getRemoteInputStream(java.lang.Object)
in order to obtain the input stream.
Only the Requester transport provides the ability to obtain an input stream.
getInputStream
in interface com.sas.io.InputStreamProviderInterface
streamID
- The stream description should be null
; it will be ignored.
null
if the transport does not support it or
if the method is invoked on a nested package.
java.rmi.UnmarshalException
- If invoked on a remote object.
java.io.IOException
- If an error occurs constructing the input stream.
java.rmi.RemoteException
- If a network anomaly is encountered.
java.lang.IllegalStateException
- If the package containing this entry is already closed.com.sas.io.RemoteInputStreamInterface getRemoteInputStream(java.lang.Object streamID) throws java.io.IOException, java.rmi.RemoteException, java.lang.IllegalStateException
getInputStream()
which now supports remote input streams.
getRemoteInputStream
in interface com.sas.io.InputStreamProviderInterface
streamID
- The stream description should be null
; it will be ignored.
RemoteInputStream
The remote input stream that can
be used for reading the contents of the result package;
null
if the method is invoked on a nested package.
java.io.IOException
- If an error occurs constructing the remote input stream.
java.rmi.RemoteException
- If a network anomaly is encountered.
java.lang.IllegalStateException
- If the package containing this entry is already closed.java.io.InputStream getInputStream() throws java.io.IOException, java.rmi.RemoteException, java.lang.IllegalStateException
null
if the transport does not support it or
if the method is invoked on a nested package.
java.io.IOException
- If an error occurs constructing the input stream.
java.rmi.RemoteException
- If a network anomaly is encountered.
java.lang.IllegalStateException
- If the package containing this entry is already closed.java.lang.Object hasInputStream() throws java.rmi.UnmarshalException, java.rmi.RemoteException
getInputStream(java.lang.Object)
will succeed.
See getInputStream(java.lang.Object)
to
determine whether this method should be used.
hasInputStream
in interface com.sas.io.InputStreamProviderInterface
Object
non-null if getInputStream(java.lang.Object) would succeed;
throws UnmarshalException if it would fail
java.rmi.UnmarshalException
- if invoked on a remote obejct
java.rmi.RemoteException
- if a network anomaly is encountered.
java.lang.IllegalStateException
- if this result package has already been closed.
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |