Skip navigation links


Thor.API.Operations
Interface tcImportOperationsIntf

All Superinterfaces:
tcUtilityOperationsIntf

public interface tcImportOperationsIntf
extends tcUtilityOperationsIntf

Method Summary
 void acquireLock(boolean forcedAcquisition)
          Try to acquire the lock
 java.util.Collection addLastPreviewedFile()
          Add the file previewed before into the files to be imported.
 void addSubstitution(com.thortech.xl.vo.ddm.RootObject robj, java.lang.String name)
          Create a substitutions for a given root object.
 java.util.Collection addXMLFile(java.lang.String filename, java.lang.String content)
          Add a new XML File to import some more objects in the current session.
 com.thortech.xl.vo.ddm.RootObject findITResourceType(com.thortech.xl.vo.ddm.RootObject obj)
           
 java.util.Collection findITResourceTypeParams(com.thortech.xl.vo.ddm.RootObject obj)
           
 com.thortech.xl.vo.ddm.LockOwner getCurrentLockInfo()
          Return information about the current owner of the lock
 java.util.Collection getFileList()
          Retrieve list of files currently added for import
 com.thortech.xl.vo.ddm.FilePreview getFilePreview(java.lang.String filename, java.lang.String content)
          Get the preview of a file.
 java.util.HashMap getImportMessages(java.util.Collection col)
          Get the import plan of selected objects.
 com.thortech.xl.vo.ddm.ImportView getImportView(java.util.Collection col)
          Get the import view.
 java.util.Collection getMissingDependencies(java.util.Collection selection, java.lang.String type)
          Return list of missing dependencies.
 java.util.HashMap getSubstitutions()
          get the current substitutions
 boolean isLockAcquired()
          Check to see if we have the lock
 java.util.Collection listPossibleSubstitutions(java.util.Collection col)
          Return a list of root objects that allow substitions, and are dependencies to the objects passed as collection.
 void performImport(java.util.Collection col)
          Perform the actual import operation on the selected objects.
 java.util.Collection removeFiles(java.util.Collection filenames)
          Removes the selected XML Files and recomputes what is going to happen.
 void removeSubstitution(com.thortech.xl.vo.ddm.RootObject robj)
          Remove substitutions for a given root object

 

Methods inherited from interface Thor.API.Base.tcUtilityOperationsIntf
close, getName, setCountry, setLanguage, setVariant

 

Method Detail

isLockAcquired

boolean isLockAcquired()
                       throws tcAPIException
Check to see if we have the lock
Returns:
Did the current bean have the lock
Throws:
tcAPIException

getCurrentLockInfo

com.thortech.xl.vo.ddm.LockOwner getCurrentLockInfo()
                                                    throws tcAPIException
Return information about the current owner of the lock
Returns:
Throws:
tcAPIException

acquireLock

void acquireLock(boolean forcedAcquisition)
                 throws java.sql.SQLException,
                        javax.naming.NamingException,
                        com.thortech.xl.ddm.exception.DDMException,
                        tcAPIException
Try to acquire the lock
Parameters:
forcedAcquisition - True, if lock must be acquired regardless of another import in progress
Throws:
SQLException
NamingException
UnableToAcquireLock
com.thortech.xl.ddm.exception.DDMException
tcAPIException

addXMLFile

java.util.Collection addXMLFile(java.lang.String filename,
                                java.lang.String content)
                                throws com.thortech.xl.ddm.exception.DDMException,
                                       com.thortech.xl.ddm.exception.TransformationException,
                                       tcAPIException
Add a new XML File to import some more objects in the current session.
Parameters:
filename - Filename of the file being imported. For tracking purposes.
content - Content of the file to be imported.
Throws:
DDMException - Generic deployment manager error
TransformationException - Input file version is different from the current version and transformation of the data to current version failed.
DuplicateObjectException - Same object is also being imported from a different file.
tcAPIException

removeFiles

java.util.Collection removeFiles(java.util.Collection filenames)
                                 throws com.thortech.xl.ddm.exception.DDMException,
                                        com.thortech.xl.ddm.exception.TransformationException,
                                        tcAPIException
Removes the selected XML Files and recomputes what is going to happen. Very expensive call in terms of computation.
Parameters:
filenames - Files to be removed
Returns:
List of objects found in the remaining files as a flat list
Throws:
DDMException - Generic Deployment error during merging
TransformationException - Input versions cannot be transformed to current version
tcAPIException

getFilePreview

com.thortech.xl.vo.ddm.FilePreview getFilePreview(java.lang.String filename,
                                                  java.lang.String content)
                                                  throws com.thortech.xl.ddm.exception.DDMException,
                                                         com.thortech.xl.ddm.exception.TransformationException,
                                                         tcAPIException
Get the preview of a file. File name, who exported it, source database etc
Returns:
Throws:
DDMException - Generic deployment manager exception
TransformationException - Transformation of the file failed
DuplicateObjectException - When the file being added conflicts with another objects
tcAPIException

getFileList

java.util.Collection getFileList()
                                 throws com.thortech.xl.ddm.exception.DDMException,
                                        tcAPIException
Retrieve list of files currently added for import
Returns:
Return list of files being imported. Contains the FilePreview objects.
Throws:
com.thortech.xl.ddm.exception.DDMException
tcAPIException

addLastPreviewedFile

java.util.Collection addLastPreviewedFile()
                                          throws com.thortech.xl.ddm.exception.DDMException,
                                                 tcAPIException
Add the file previewed before into the files to be imported.
Returns:
List of objects found in the file just added
Throws:
DDMException
tcAPIException

getImportMessages

java.util.HashMap getImportMessages(java.util.Collection col)
                                    throws com.thortech.xl.ddm.exception.DDMException,
                                           tcAPIException
Get the import plan of selected objects. This will give any warnings, errors and other information For example: what is going to happen, any missing dependencies etc. Map contains the RootObject as the key and the a collection of ImportMessage as value.
Parameters:
col -
Returns:
Return import plan
Throws:
DDMException
tcAPIException

getImportView

com.thortech.xl.vo.ddm.ImportView getImportView(java.util.Collection col)
                                                throws com.thortech.xl.ddm.exception.DDMException,
                                                       tcAPIException
Get the import view. This is to be used by the webclient to get the information to be displayed.
Parameters:
col - (Collection of root objects)
Returns:
Throws:
DDMException
tcAPIException

listPossibleSubstitutions

java.util.Collection listPossibleSubstitutions(java.util.Collection col)
                                               throws com.thortech.xl.ddm.exception.DDMException,
                                                      tcAPIException
Return a list of root objects that allow substitions, and are dependencies to the objects passed as collection. This is primarily used by webclient.
Parameters:
col - collection of objects for which substitutions can be made
Returns:
substitutable dependencies
Throws:
DDMException - Deployment Error
tcAPIException

findITResourceType

com.thortech.xl.vo.ddm.RootObject findITResourceType(com.thortech.xl.vo.ddm.RootObject obj)
                                                     throws java.sql.SQLException,
                                                            com.thortech.xl.ddm.exception.DDMException,
                                                            tcAPIException
Throws:
java.sql.SQLException
com.thortech.xl.ddm.exception.DDMException
tcAPIException

findITResourceTypeParams

java.util.Collection findITResourceTypeParams(com.thortech.xl.vo.ddm.RootObject obj)
                                              throws java.sql.SQLException,
                                                     com.thortech.xl.ddm.exception.DDMException,
                                                     tcAPIException
Throws:
java.sql.SQLException
com.thortech.xl.ddm.exception.DDMException
tcAPIException

addSubstitution

void addSubstitution(com.thortech.xl.vo.ddm.RootObject robj,
                     java.lang.String name)
                     throws com.thortech.xl.ddm.exception.DDMException,
                            java.sql.SQLException,
                            tcAPIException
Create a substitutions for a given root object. Basically Deployment uses the new name provided instead of the old name contained in the exported files. Useful when the names are different in development and staging and production machines.
Parameters:
robj -
name -
Throws:
com.thortech.xl.ddm.exception.DDMException
java.sql.SQLException
tcAPIException

removeSubstitution

void removeSubstitution(com.thortech.xl.vo.ddm.RootObject robj)
                        throws com.thortech.xl.ddm.exception.DDMException,
                               tcAPIException
Remove substitutions for a given root object
Parameters:
robj -
Throws:
com.thortech.xl.ddm.exception.DDMException
tcAPIException

getSubstitutions

java.util.HashMap getSubstitutions()
                                   throws com.thortech.xl.ddm.exception.DDMException,
                                          tcAPIException
get the current substitutions
Returns:
current substitutions - Keys in the map are RootObjects and values are the new names.
Throws:
com.thortech.xl.ddm.exception.DDMException
tcAPIException

performImport

void performImport(java.util.Collection col)
                   throws com.thortech.xl.ddm.exception.DDMException,
                          javax.naming.NamingException,
                          tcBulkException,
                          tcAPIException
Perform the actual import operation on the selected objects.
Parameters:
col -
Throws:
NamingException
DDMException - General Exception
tcBulkException
tcAPIException

getMissingDependencies

java.util.Collection getMissingDependencies(java.util.Collection selection,
                                            java.lang.String type)
                                            throws com.thortech.xl.ddm.exception.DDMException,
                                                   tcAPIException
Return list of missing dependencies. Find all the missing dependencies of the given selection. If a type is provided dependencies of that type are returned. The type specified here is the physical type and not logical type. I.e. Form implies both types of forms.
Parameters:
selection - List of objects selected for import
type - Type of the objects interested in.
Returns:
List of missing dependencies. Collection contains objects of type RootObject.
Throws:
DDMException
tcAPIException

Skip navigation links


Copyright © 2011, Oracle and/or its affiliates. All rights reserved.