wt.content
Interface ContentServiceSvr

All Known Implementing Classes:
StandardContentService

public interface ContentServiceSvr

These methods are only able to be invoked from classes running in the server. Most of these methods are only needed by the ContentHttp class. They are also used by the loader and the indexing modules.

Supported API: true

Extendable: false

See Also:
ContentServerHelper

Method Summary
 void deleteContent(ContentHolder holder, ContentItem item)
          Deletes the passed ContentItem for the given ContentHolder.
 void deleteContent(WTSet contentItemSet)
          Deletes the contents associated with the input content item set.
 void dispatchPostDownloadEvent(ContentHolder holder, ApplicationData appData)
          This method should only be called after the complete and successful download of a file.
 InputStream findContentStream(ApplicationData appData)
          Return the stream based on a ContentHolder and an ApplicationData object.
 ApplicationData getApplicationData(ObjectIdentifier itemId)
          Get a ContentItemInfo object based on an object identifier passed on the query string.
 ContentHolder getContentHolder(HttpContentOperation op)
          

Supported API: false
 ContentHolder getContentHolder(ObjectIdentifier itemId)
          Get a ContentItemInfo object based on an object identifier passed on the query string.
 String getFormatName(ContentItem item)
          

Supported API: false
 Enumeration getHtmlFormatNames()
          Returns the list of valid formats for ApplicationData objects in the system.
 HttpContentOperation getHttpContentOperation(ObjectIdentifier opID)
          Deprecated.  
 HttpOperationItem getHttpOperationItem(ObjectIdentifier itemId)
          Deprecated.  
 String getMimeType(ApplicationData item)
          Return the mime type of an ApplicationData object for download.
 int getNumberForImport()
          Get the configurable number to allow on a new import of content.
 boolean indexable(ApplicationData appData)
          Returns true if the passed ContentItem is an Indexable class.
 HttpContentOperation initializeNewUploads(ContentHolder holder, HttpContentOperation operation, int numberToInit)
          Used to initialize empty uploads from a import html page.
 void initTrx(Persistable obj)
          Deprecated.  
 void setFormatByMimeType(ApplicationData appData, String mimeType)
          Attempt to set the format of an ApplicationData based on the passed mime type.
 ApplicationData store3DThumbnail(ContentHolder contentHolder, ApplicationData thumbnail, InputStream is)
          Store a thumbnail content item for the passed ContentHolder.
 ApplicationData storeThumbnail(ContentHolder contentHolder, ApplicationData thumbnail, InputStream is)
          Store a thumbnail content item for the passed ContentHolder.
 Aggregate updateAggregateFile(ContentHolder holder, Aggregate agg, ApplicationData appData, InputStream is)
          Update an ApplicationData that is part of the passed Aggregate.
 Aggregate updateAggregateFile(ContentHolder holder, Aggregate agg, ApplicationData appData, InputStream is, boolean mustCreateNewFile)
          

Supported API: false
 Aggregate updateAggregateFile(ContentHolder holder, Aggregate agg, ApplicationData appData, String fullPath)
          Update an ApplicationData that is part of the passed Aggregate.
 Aggregate updateAggregateURL(ContentHolder holder, Aggregate agg, URLData urlData)
          Update an URLData that is part of the passed Aggregate.
 Aggregate updateContent(ContentHolder holder, Aggregate agg)
          Update a ContentHolder with the given Aggreate.
 ApplicationData updateContent(ContentHolder holder, ApplicationData appData, CachedContentDescriptor cachedContDesc)
          Update a ContentHolder with the given content passed in with a CachedContDesc.
 ApplicationData updateContent(ContentHolder holder, ApplicationData appData, CachedContentDescriptor cachedContDesc, boolean mustCreateNewFile)
          

Supported API: true
 ApplicationData updateContent(ContentHolder holder, ApplicationData appData, InputStream is)
          Update a ContentHolder based on a persised ContentHolder and ContentItemInfo object and a new ApplicationData object and the corresponding stream to the content.
 ApplicationData updateContent(ContentHolder holder, ApplicationData appData, InputStream is, boolean mustCreateNewFile)
          

Supported API: true
 ApplicationData updateContent(ContentHolder holder, ApplicationData appData, String fullPath)
          Update a ContentHolder with the given content passed in with a path.
 URLData updateContent(ContentHolder holder, URLData urlData)
          Update a ContentHolder with the given content passed in with a path.
 Object[] updateContent(Object[][] holderDataArray)
          Update multiple ContentHolders with its corresponding ApplicationData passed in as part of the object[][2].
 Object[] updateContent(Object[][] holderDataArray, boolean mustCreateNewFile)
          Update multiple ContentHolders with its corresponding ApplicationData passed in as part of the object[][2].
 FormatContentHolder updateHolderFormat(FormatContentHolder holder)
          This method will update the format for a FormatContentHolder based on the content in it at it's current state.
 WTSet updateHolderFormat(WTSet inHolderSet)
          This method will update the format for a FormatContentHolder based on the content in it at it's current state.
 ApplicationData updatePrimary(FormatContentHolder holder, ApplicationData appData, InputStream is)
          Update the primary for the passed FormatContentHolder with the passed ApplicationData and stream.
 ContentItem updatePrimary(FormatContentHolder holder, ContentItem item)
          Update the primary for the passed FormatContentHolder with the passed ContentItem.
 HttpContentOperation updateStatus(HttpContentOperation op, HttpOperationItem itemStatus, HttpOperationStatus stat)
          Deprecated.  
 HttpContentOperation updateStatus(HttpContentOperation op, HttpOperationStatus stat)
          Deprecated.  
 HttpContentOperation updateStatusAsFailed(HttpContentOperation op)
          Deprecated.  
 void writeContentStream(ApplicationData appData, String path)
          Write out the content to a path based on a ContentHolder and an ApplicationData object.
 

Method Detail

getHttpContentOperation

public HttpContentOperation getHttpContentOperation(ObjectIdentifier opID)
                                             throws ContentException,
                                                    WTException
Deprecated.  

Get the HttpContentOperation object based on an object identifier. Internal use only.

Supported API: false

Parameters:
opID -
Returns:
HttpContentOperation
Throws:
ContentException
WTException

getHttpOperationItem

public HttpOperationItem getHttpOperationItem(ObjectIdentifier itemId)
                                       throws WTException
Deprecated.  

Get a ContentItemInfo object based on an object identifier. Internally used.

Supported API: false

Parameters:
itemId -
Returns:
HttpOperationItem
Throws:
WTException

findContentStream

public InputStream findContentStream(ApplicationData appData)
                              throws WTException
Return the stream based on a ContentHolder and an ApplicationData object.

Supported API: true

Parameters:
appData -
Returns:
InputStream
Throws:
WTException

writeContentStream

public void writeContentStream(ApplicationData appData,
                               String path)
                        throws WTException,
                               IOException
Write out the content to a path based on a ContentHolder and an ApplicationData object.

Supported API: true

Parameters:
appData -
path -
Throws:
WTException
IOException

updateStatus

public HttpContentOperation updateStatus(HttpContentOperation op,
                                         HttpOperationStatus stat)
                                  throws WTException,
                                         PropertyVetoException
Deprecated.  

update the HttpContentOperation to the passed status internal use

Supported API: false

Parameters:
op -
stat -
Returns:
HttpContentOperation
Throws:
WTException
PropertyVetoException

updateStatus

public HttpContentOperation updateStatus(HttpContentOperation op,
                                         HttpOperationItem itemStatus,
                                         HttpOperationStatus stat)
                                  throws WTException,
                                         PropertyVetoException
Deprecated.  

update the HttpOperationItem object to the passed status. internal use

Supported API: false

Parameters:
op -
itemStatus -
stat -
Returns:
HttpContentOperation
Throws:
WTException
PropertyVetoException

updateStatusAsFailed

public HttpContentOperation updateStatusAsFailed(HttpContentOperation op)
                                          throws WTException,
                                                 PropertyVetoException
Deprecated.  

Attempts to update an HttpContentOperation to a failed status - however it does NOT throw an exception if it is not successful. internal use.

Supported API: false

Parameters:
op -
Returns:
HttpContentOperation
Throws:
WTException
PropertyVetoException

getHtmlFormatNames

public Enumeration getHtmlFormatNames()
                               throws WTException
Returns the list of valid formats for ApplicationData objects in the system. These values are cached in the server, so this does not require a database hit every time.

Supported API: true

Returns:
Enumeration
Throws:
WTException

getMimeType

public String getMimeType(ApplicationData item)
                   throws WTException
Return the mime type of an ApplicationData object for download. internally used.

Supported API: false

Parameters:
item -
Returns:
String
Throws:
WTException

updateContent

public ApplicationData updateContent(ContentHolder holder,
                                     ApplicationData appData,
                                     String fullPath)
                              throws WTException,
                                     PropertyVetoException,
                                     IOException,
                                     FileNotFoundException
Update a ContentHolder with the given content passed in with a path. This would be used for data migration tools.

Supported API: true

Parameters:
holder -
appData -
fullPath -
Returns:
ApplicationData
Throws:
WTException
PropertyVetoException
IOException
FileNotFoundException

updateContent

public ApplicationData updateContent(ContentHolder holder,
                                     ApplicationData appData,
                                     CachedContentDescriptor cachedContDesc)
                              throws WTException,
                                     PropertyVetoException
Update a ContentHolder with the given content passed in with a CachedContDesc. This would be used for Cached Content.

Supported API: true

Parameters:
holder -
appData -
cachedContDesc -
Returns:
ApplicationData
Throws:
WTException
PropertyVetoException

updateContent

public URLData updateContent(ContentHolder holder,
                             URLData urlData)
                      throws WTException,
                             PropertyVetoException
Update a ContentHolder with the given content passed in with a path. This would be used for data migration tools.

Supported API: true

Parameters:
holder -
urlData -
Returns:
URLData
Throws:
WTException
PropertyVetoException

updateContent

public ApplicationData updateContent(ContentHolder holder,
                                     ApplicationData appData,
                                     InputStream is)
                              throws WTException,
                                     PropertyVetoException,
                                     IOException,
                                     FileNotFoundException
Update a ContentHolder based on a persised ContentHolder and ContentItemInfo object and a new ApplicationData object and the corresponding stream to the content.

Supported API: true

Parameters:
holder -
appData -
is -
Returns:
ApplicationData
Throws:
WTException
PropertyVetoException
IOException
FileNotFoundException

updateContent

public Aggregate updateContent(ContentHolder holder,
                               Aggregate agg)
                        throws WTException,
                               PropertyVetoException
Update a ContentHolder with the given Aggreate. The Aggregate is attached as secondary content by default.

Supported API: true

Parameters:
holder -
agg -
Returns:
Aggregate
Throws:
WTException
PropertyVetoException

getNumberForImport

public int getNumberForImport()
Get the configurable number to allow on a new import of content. There will be this many open spots avaliable on the bottom of the generated html on an upload to allow the user to define new content from the server side.

Supported API: false

Returns:
int

getApplicationData

public ApplicationData getApplicationData(ObjectIdentifier itemId)
                                   throws WTException
Get a ContentItemInfo object based on an object identifier passed on the query string. This is only used for download. internal use

Supported API: false

Parameters:
itemId -
Returns:
ApplicationData
Throws:
WTException

getContentHolder

public ContentHolder getContentHolder(ObjectIdentifier itemId)
                               throws WTException
Get a ContentItemInfo object based on an object identifier passed on the query string. This is only used for download.

Supported API: false

Parameters:
itemId -
Returns:
ContentHolder
Throws:
WTException

initializeNewUploads

public HttpContentOperation initializeNewUploads(ContentHolder holder,
                                                 HttpContentOperation operation,
                                                 int numberToInit)
                                          throws WTException,
                                                 PropertyVetoException
Used to initialize empty uploads from a import html page. internal use.

Supported API: false

Parameters:
holder -
operation -
numberToInit -
Returns:
HttpContentOperation
Throws:
WTException
PropertyVetoException

indexable

public boolean indexable(ApplicationData appData)
                  throws WTException
Returns true if the passed ContentItem is an Indexable class.

Supported API: false

Parameters:
appData -
Returns:
boolean
Throws:
WTException

updateHolderFormat

public FormatContentHolder updateHolderFormat(FormatContentHolder holder)
                                       throws WTException,
                                              PropertyVetoException
This method will update the format for a FormatContentHolder based on the content in it at it's current state. This method should be called after modifying a FormatContentHolder for a load or an upload.

Supported API: true

Parameters:
holder -
Returns:
FormatContentHolder
Throws:
WTException
PropertyVetoException

getFormatName

public String getFormatName(ContentItem item)
                     throws WTException


Supported API: false

Parameters:
item -
Returns:
String
Throws:
WTException

initTrx

public void initTrx(Persistable obj)
             throws WTException
Deprecated.  

initialize a content transaction for tracking in the server so the client can do a transaction wait.

Supported API: false

Parameters:
obj -
Throws:
WTException

getContentHolder

public ContentHolder getContentHolder(HttpContentOperation op)
                               throws WTException


Supported API: false

Parameters:
op -
Returns:
ContentHolder
Throws:
WTException

deleteContent

public void deleteContent(ContentHolder holder,
                          ContentItem item)
                   throws WTException,
                          WTPropertyVetoException
Deletes the passed ContentItem for the given ContentHolder.

Supported API: true

Parameters:
holder -
item -
Throws:
WTException
WTPropertyVetoException

setFormatByMimeType

public void setFormatByMimeType(ApplicationData appData,
                                String mimeType)
                         throws WTPropertyVetoException,
                                WTException
Attempt to set the format of an ApplicationData based on the passed mime type.

Supported API: false

Parameters:
appData -
mimeType -
Throws:
WTPropertyVetoException
WTException

updatePrimary

public ApplicationData updatePrimary(FormatContentHolder holder,
                                     ApplicationData appData,
                                     InputStream is)
                              throws WTException,
                                     PropertyVetoException,
                                     FileNotFoundException,
                                     IOException
Update the primary for the passed FormatContentHolder with the passed ApplicationData and stream. This can be an update or the save of a new primary.

Supported API: true

Parameters:
holder -
appData -
is -
Returns:
ApplicationData
Throws:
WTException
PropertyVetoException
FileNotFoundException
IOException

updatePrimary

public ContentItem updatePrimary(FormatContentHolder holder,
                                 ContentItem item)
                          throws WTException,
                                 PropertyVetoException
Update the primary for the passed FormatContentHolder with the passed ContentItem. This can be an update or the save of a new primary.

Supported API: true

Parameters:
holder -
item -
Returns:
ContentItem
Throws:
WTException
PropertyVetoException

updateAggregateFile

public Aggregate updateAggregateFile(ContentHolder holder,
                                     Aggregate agg,
                                     ApplicationData appData,
                                     InputStream is)
                              throws WTException,
                                     PropertyVetoException
Update an ApplicationData that is part of the passed Aggregate. The Aggregate and the ContentHolder should be saved appropriately before being passed to this method. This can update an aggregate or create a new one.

Supported API: false

Parameters:
holder -
agg -
appData -
is -
Returns:
Aggregate
Throws:
WTException
PropertyVetoException

updateAggregateFile

public Aggregate updateAggregateFile(ContentHolder holder,
                                     Aggregate agg,
                                     ApplicationData appData,
                                     String fullPath)
                              throws WTException,
                                     PropertyVetoException,
                                     IOException,
                                     FileNotFoundException
Update an ApplicationData that is part of the passed Aggregate. The Aggregate and the ContentHolder should be saved appropriately before being passed to this method. This can update an aggregate or create a new one. For use with the loader.

Supported API: false

Parameters:
holder -
agg -
appData -
fullPath -
Returns:
Aggregate
Throws:
WTException
PropertyVetoException
IOException
FileNotFoundException

updateAggregateURL

public Aggregate updateAggregateURL(ContentHolder holder,
                                    Aggregate agg,
                                    URLData urlData)
                             throws WTException,
                                    PropertyVetoException
Update an URLData that is part of the passed Aggregate. The Aggregate and the ContentHolder should be saved appropriately before being passed to this method. This can update an aggregate or create a new one.

Supported API: false

Parameters:
holder -
agg -
urlData -
Returns:
Aggregate
Throws:
WTException
PropertyVetoException

dispatchPostDownloadEvent

public void dispatchPostDownloadEvent(ContentHolder holder,
                                      ApplicationData appData)
                               throws WTException,
                                      WTPropertyVetoException
This method should only be called after the complete and successful download of a file. This occurs OOTB in the ContentHttp class. This will cover any customization using the Windchill content beans or the wt.util.clients.http.HTTPContentUploadDownload class. As well as accessing the ContentHttp.viewContent method.

Supported API: false

Parameters:
holder -
appData -
Throws:
WTException
WTPropertyVetoException

storeThumbnail

public ApplicationData storeThumbnail(ContentHolder contentHolder,
                                      ApplicationData thumbnail,
                                      InputStream is)
                               throws WTException,
                                      PropertyVetoException,
                                      IOException,
                                      FileNotFoundException
Store a thumbnail content item for the passed ContentHolder. Will allow more than one thumbnail content item for the ContentHolder. The attributes on the ApplicationData need to be set appropriately.

Supported API: false

Parameters:
contentHolder -
thumbnail -
is -
Returns:
ApplicationData
Throws:
WTException
PropertyVetoException
IOException
FileNotFoundException

store3DThumbnail

public ApplicationData store3DThumbnail(ContentHolder contentHolder,
                                        ApplicationData thumbnail,
                                        InputStream is)
                                 throws WTException,
                                        PropertyVetoException,
                                        IOException,
                                        FileNotFoundException
Store a thumbnail content item for the passed ContentHolder. Will allow more than one thumbnail content item for the ContentHolder. The attributes on the ApplicationData need to be set appropriately.

Supported API: false

Parameters:
contentHolder -
thumbnail -
is -
Returns:
ApplicationData
Throws:
WTException
PropertyVetoException
IOException
FileNotFoundException

updateContent

public ApplicationData updateContent(ContentHolder holder,
                                     ApplicationData appData,
                                     CachedContentDescriptor cachedContDesc,
                                     boolean mustCreateNewFile)
                              throws WTException,
                                     PropertyVetoException


Supported API: true

Parameters:
holder -
appData -
cachedContDesc -
mustCreateNewFile -
Returns:
ApplicationData
Throws:
WTException
PropertyVetoException

updateContent

public ApplicationData updateContent(ContentHolder holder,
                                     ApplicationData appData,
                                     InputStream is,
                                     boolean mustCreateNewFile)
                              throws WTException,
                                     PropertyVetoException,
                                     IOException,
                                     FileNotFoundException


Supported API: true

Parameters:
holder -
appData -
is -
mustCreateNewFile -
Returns:
ApplicationData
Throws:
WTException
PropertyVetoException
IOException
FileNotFoundException

updateAggregateFile

public Aggregate updateAggregateFile(ContentHolder holder,
                                     Aggregate agg,
                                     ApplicationData appData,
                                     InputStream is,
                                     boolean mustCreateNewFile)
                              throws WTException,
                                     PropertyVetoException


Supported API: false

Parameters:
holder -
agg -
appData -
is -
mustCreateNewFile -
Returns:
Aggregate
Throws:
WTException
PropertyVetoException

updateContent

public Object[] updateContent(Object[][] holderDataArray,
                              boolean mustCreateNewFile)
                       throws WTException,
                              PropertyVetoException
Update multiple ContentHolders with its corresponding ApplicationData passed in as part of the object[][2]. The first index object is a ContentHolder, the second index object is a Hashtable containing ApplicationData and CachedContentDescriptor information, i.e. each element in the table, the key is a ApplicationData, the value is the corresponding CachedContentDescriptor. Returns an array of WTReference objects corresponding with the ApplicationData objects from the input array.

Supported API: true

Parameters:
holderDataArray -
mustCreateNewFile -
Returns:
Object[]
Throws:
WTException
PropertyVetoException

updateContent

public Object[] updateContent(Object[][] holderDataArray)
                       throws WTException,
                              PropertyVetoException
Update multiple ContentHolders with its corresponding ApplicationData passed in as part of the object[][2]. The first index object is a ContentHolder, the second index object is a Hashtable containing ApplicationData and CachedContentDescriptor information, i.e. each element in the table, the key is a ApplicationData, the value is the corresponding CachedContentDescriptor. This will call updateContent() with mustCreateNewFile set to true. Returns an array of WTReference objects corresponding with the ApplicationData objects from the input array.

Supported API: true

Parameters:
holderDataArray -
Returns:
Object[]
Throws:
WTException
PropertyVetoException

deleteContent

public void deleteContent(WTSet contentItemSet)
                   throws WTException,
                          WTPropertyVetoException
Deletes the contents associated with the input content item set.

Supported API: true

Parameters:
contentItemSet -
Throws:
WTException
WTPropertyVetoException

updateHolderFormat

public WTSet updateHolderFormat(WTSet inHolderSet)
                         throws WTException,
                                PropertyVetoException
This method will update the format for a FormatContentHolder based on the content in it at it's current state. This method should be called after modifying a FormatContentHolder for a load or an upload.

Supported API: true

Parameters:
inHolderSet -
Returns:
WTSet
Throws:
WTException
PropertyVetoException