wt.ixb.publicforapps
Class ApplicationImportHandlerTemplate

java.lang.Object
  extended bywt.ixb.publicforapps.ApplicationImportHandlerTemplate
All Implemented Interfaces:
ApplicationExpImportHandler, ApplicationImportHandler
Direct Known Subclasses:
IXArchiveRestoreApplication.RestoreImportHandler, ObjectcolImportHandlerForJar, ReplIxbImportHandler, StandardConflictFrameworkService.ImportHandler, StandardIXBService.ImportHandler, StandardLoadService.ImportHandler

public class ApplicationImportHandlerTemplate
extends Object
implements ApplicationImportHandler



Supported API: true

Extendable: true


Field Summary
private static String CLASSNAME
           
private static String RESOURCE
           
 
Fields inherited from interface wt.ixb.publicforapps.ApplicationExpImportHandler
IMPORTANCE_LEVEL_DEFAULT
 
Constructor Summary
ApplicationImportHandlerTemplate()
           
 
Method Summary
 void finalizeImportObjectNotification(Object object)
          Notifies application about objects after being persisted.
 ApplicationData getContentAsApplicationData(String contentId)
          Returns ApplicationData representing input information for import process.
 InputStream getContentAsInputStream(String contentId)
          Returns InputStream representing input information for import process

Supported API: true
 void importObjectNotification(Object object, boolean created, IxbElement fileXML)
          Notifies application about objects, that are created in import process.
 void storeLogMessage(String resourceBundle, String messageKey, Object[] textInserts)
           
 void storeLogMessage(String resourceBundle, String messageKey, Object[] textInserts, int importanceLevel)
          Supplies the localized log message for the application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME
Constructor Detail

ApplicationImportHandlerTemplate

public ApplicationImportHandlerTemplate()
Method Detail

getContentAsInputStream

public InputStream getContentAsInputStream(String contentId)
                                    throws WTException
Returns InputStream representing input information for import process

Supported API: true

Specified by:
getContentAsInputStream in interface ApplicationImportHandler
Parameters:
contentId - The unique id to identify the content data, such as the file name (including the path) in a jar file.
Returns:
InputStream
Throws:
WTException

getContentAsApplicationData

public ApplicationData getContentAsApplicationData(String contentId)
                                            throws WTException
Returns ApplicationData representing input information for import process. Import application does not have really implement this method. It can simple return null.

Supported API: true

Specified by:
getContentAsApplicationData in interface ApplicationImportHandler
Parameters:
contentId - The unique id to identify the content data, such as the file name (including the path) in a jar file.
Returns:
ApplicationData
Throws:
WTException

importObjectNotification

public void importObjectNotification(Object object,
                                     boolean created,
                                     IxbElement fileXML)
                              throws WTException
Notifies application about objects, that are created in import process.

Supported API: true

Specified by:
importObjectNotification in interface ApplicationImportHandler
Parameters:
object -
created - "true" if import process creates new object and "false" otherwise.
fileXML -
Throws:
WTException

finalizeImportObjectNotification

public void finalizeImportObjectNotification(Object object)
                                      throws WTException
Notifies application about objects after being persisted.

Supported API: true

Specified by:
finalizeImportObjectNotification in interface ApplicationImportHandler
Parameters:
object -
Throws:
WTException

storeLogMessage

public void storeLogMessage(String resourceBundle,
                            String messageKey,
                            Object[] textInserts,
                            int importanceLevel)
                     throws WTException
Supplies the localized log message for the application.

Supported API: true

Specified by:
storeLogMessage in interface ApplicationExpImportHandler
Parameters:
resourceBundle -
messageKey -
textInserts -
importanceLevel -
Throws:
WTException

storeLogMessage

public void storeLogMessage(String resourceBundle,
                            String messageKey,
                            Object[] textInserts)
                     throws WTException
Throws:
WTException