com.crystaldecisions.sdk.occa.infostore
Interface IContent

All Superinterfaces:
IPublicationInfo
All Known Subinterfaces:
IAgnostic, IExcel, IPDF, IPowerPoint, IReport, IRTF, ITxt, IWord

public interface IContent
extends IPublicationInfo

This interface defines functions used by desktop plugins that export to a particular file type. This interface is not actually returned by any objects. The only way to access this object and the methods it contains is through casting. Any desktop plugins that allow their files to be exported support this interface (listed below).

Remarks

This example demonstrates how to check if an object supports this interface and then casts it as an IContent object if it is supported:

 if ( obj instanceof IContent )
 {
        IContent contentObj = (IContent) obj;
 }
 

See Also:
IExcel, IPDF, IRTF, ITxt, IWord

Method Summary
 byte[] getContent()
           Returns the byte stream which represents the main file of the plugin.
 byte[] getContent(java.util.Locale loc, IInfoObject.LocaleOption option)
           Returns the byte stream which represents the localized file of the plugin.
 long getContentLength()
           
 java.lang.String getFileExtensionFromMimeType(java.lang.String fileExtension)
           Returns the file extension for the mime type.
 java.io.InputStream getInputStream()
           
 java.lang.String getMimeType()
           Returns the MIME type for the plugin file type.
 java.lang.String getMimeType(java.lang.String fileExtension)
           Returns the MIME type for the plugin file type.
 java.lang.String getMimeTypeFromFileExtension(java.lang.String mimeType)
           Returns the mime type from file extension
 java.lang.Object getPluginProcessingInterface(java.lang.String kind)
           Returns the processing interface for the object.
 void setMimeType(java.lang.String mimeType)
           Sets the MIME type of the target object.
 void writeContent(java.util.Locale loc, IInfoObject.LocaleOption option, java.io.OutputStream output)
           Uploads the content of the localized file
 void writeContent(java.io.OutputStream output)
           
 
Methods inherited from interface com.crystaldecisions.sdk.plugin.desktop.common.IPublicationInfo
getArtifactParentID, getDestinationProgIDs, getDynamicRecipientVariableMappings, getFormat, getMultiPassBursting, getPublicationDocumentVariableMappings, getScopeBatch, getScopeBatchDocArtifacts, getScopeID, getSourceDocuments, isPluginArtifact, isPublicationGlobalDeliveryRuleJob, isPublicationJob, isShowAllDataForNullProfileValues, setArtifactParentID, setFormat, setMultiPassBursting, setPluginArtifact, setPublicationDocumentVariableMappings, setPublicationGlobalDeliveryRuleJob, setPublicationJob, setScopeBatch, setScopeID, setShowAllDataForNullProfileValues
 

Method Detail

getMimeType

java.lang.String getMimeType()

Returns the MIME type for the plugin file type.

Returns:
The MIME type of the data that will be returned from getContent().
See Also:
IContent.getContent()
InfoObject properties to query for:
SI_MIME_TYPE

getMimeType

java.lang.String getMimeType(java.lang.String fileExtension)

Returns the MIME type for the plugin file type. This method will try to determine the mime type by file extension if the mime type property does not exist. If a mime type cannot be determined by the file extension, the default mime type will be returned.

Returns:
The MIME type of the data that will be returned from getContent().
See Also:
IContent.getContent(), IContent.getMimeType()
InfoObject properties to query for:
SI_MIME_TYPE

setMimeType

void setMimeType(java.lang.String mimeType)

Sets the MIME type of the target object.

Parameters:
mimeType - A String specifying the MIME type of the target object.
Since:
4.0

getFileExtensionFromMimeType

java.lang.String getFileExtensionFromMimeType(java.lang.String fileExtension)

Returns the file extension for the mime type.

Returns:
the file extension for the mime type.
Since:
4.0

getMimeTypeFromFileExtension

java.lang.String getMimeTypeFromFileExtension(java.lang.String mimeType)

Returns the mime type from file extension

Returns:
the mime type from file extension
Since:
4.0

getContent

byte[] getContent()
                  throws SDKException

Returns the byte stream which represents the main file of the plugin.

Returns:
An byte array containing the raw data of the object.
Throws:
SDKException - This is thrown if the process is unsuccessful.
InfoObject properties to query for:
SI_FILES

getContent

byte[] getContent(java.util.Locale loc,
                  IInfoObject.LocaleOption option)
                  throws SDKException

Returns the byte stream which represents the localized file of the plugin.

Parameters:
loc - A java.util.Locale that represents the locale of the file
option - A LocaleOption see IInfoObject.LocaleOption
Returns:
An byte array containing the raw data of the object.
Throws:
SDKException - This is thrown if the process is unsuccessful.
InfoObject properties to query for:
SI_FILES

getInputStream

java.io.InputStream getInputStream()
                                   throws SDKException
Throws:
SDKException
InfoObject properties to query for:
SI_FILES

writeContent

void writeContent(java.io.OutputStream output)
                  throws SDKException
Throws:
SDKException
InfoObject properties to query for:
SI_FILES

writeContent

void writeContent(java.util.Locale loc,
                  IInfoObject.LocaleOption option,
                  java.io.OutputStream output)
                  throws SDKException

Uploads the content of the localized file

Parameters:
loc - A java.util.Locale that represents the locale of the files
option - A LocaleOption see IInfoObject.LocaleOption
output - A OutputStream that is the raw data of the file.
Throws:
SDKException - This is thrown if the process is unsuccessful.
InfoObject properties to query for:
SI_FILES

getContentLength

long getContentLength()
                      throws SDKException
Throws:
SDKException
InfoObject properties to query for:
SI_FILES

getPluginProcessingInterface

java.lang.Object getPluginProcessingInterface(java.lang.String kind)
                                              throws SDKException

Returns the processing interface for the object. This method only applies to objects that can be scheduled.

Parameters:
kind - A String that represents the IInfoObject type.
Returns:
An Object that is one of IReportProcessingInfo or IWebiProcessingInfo.

Throws:
SDKException