Package Thor.API.Operations
Interface tcImportOperationsIntf
- All Superinterfaces:
tcUtilityOperationsIntf
- All Known Implementing Classes:
tcImportOperationsBean
-
Method Summary
Modifier and TypeMethodDescriptionvoidacquireLock(boolean forcedAcquisition) Try to acquire the lockAdd the file previewed before into the files to be imported.voidaddSubstitution(RootObject robj, String name) Create a substitutions for a given root object.addXMLFile(String filename, String content) Add a new XML File to import some more objects in the current session.addXMLFile(String filename, String content, boolean importReview) addXMLFile(String filename, String content, String objectSkip) Return IT Resource typeReturn Collection which contains IT Resource type parametersReturn information about the current owner of the lockRetrieve list of files currently added for importgetFilePreview(String filename, String content) Get the preview of a file.Get the import plan of selected objects.getImportView(Collection col) Get the import view.getMissingDependencies(Collection selection, String type) Return list of missing dependencies.get the current substitutionsbooleanCheck to see if we have the lockReturn a list of root objects that allow substitions, and are dependencies to the objects passed as collection.voidperformImport(Collection col) Perform the actual import operation on the selected objects.removeFiles(Collection filenames) Removes the selected XML Files and recomputes what is going to happen.voidremoveSubstitution(RootObject robj) Remove substitutions for a given root objectMethods inherited from interface Thor.API.Base.tcUtilityOperationsIntf
close, getName, setCountry, setLanguage, setVariant
-
Method Details
-
isLockAcquired
Check to see if we have the lock- Returns:
- Did the current bean have the lock
- Throws:
tcAPIException
-
getCurrentLockInfo
Return information about the current owner of the lock- Returns:
- Throws:
tcAPIException
-
acquireLock
void acquireLock(boolean forcedAcquisition) throws SQLException, NamingException, DDMException, tcAPIException Try to acquire the lock- Parameters:
forcedAcquisition- True, if lock must be acquired regardless of another import in progress- Throws:
SQLExceptionNamingExceptionUnableToAcquireLockSQLExceptionNamingExceptionDDMExceptiontcAPIException
-
addXMLFile
Collection addXMLFile(String filename, String content) throws DDMException, 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.- Returns:
- List of objects after adding xml file as a flat list
- Throws:
DDMException- Generic deployment manager errorTransformationException- Input file version is different from the current version and transformation of the data to current version failed.DDMExceptionTransformationExceptiontcAPIException
-
addXMLFile
Collection addXMLFile(String filename, String content, String objectSkip) throws DDMException, TransformationException, tcAPIException -
addXMLFile
Collection addXMLFile(String filename, String content, boolean importReview) throws DDMException, TransformationException, tcAPIException -
removeFiles
Collection removeFiles(Collection filenames) throws DDMException, 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 mergingTransformationException- Input versions cannot be transformed to current versionDDMExceptionTransformationExceptiontcAPIException
-
getFilePreview
FilePreview getFilePreview(String filename, String content) throws DDMException, TransformationException, tcAPIException Get the preview of a file. File name, who exported it, source database etc- Returns:
- FilePreview Object
- Throws:
DDMException- Generic deployment manager exceptionTransformationException- Transformation of the file failedDDMExceptionTransformationExceptiontcAPIException
-
getFileList
Retrieve list of files currently added for import- Returns:
- Return list of files being imported. Contains the FilePreview objects.
- Throws:
DDMExceptiontcAPIException
-
addLastPreviewedFile
Add the file previewed before into the files to be imported.- Returns:
- List of objects found in the file just added
- Throws:
DDMExceptionDDMExceptiontcAPIException
-
getImportMessages
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- Collection of RootObjects- Returns:
- Return import plan
- Throws:
DDMExceptionDDMExceptiontcAPIException
-
getImportView
Get the import view. This is to be used by the webclient to get the information to be displayed.- Parameters:
col- Collection of RootObjects- Returns:
- ImportView Object
- Throws:
DDMExceptionDDMExceptiontcAPIException
-
listPossibleSubstitutions
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 ErrorDDMExceptiontcAPIException
-
findITResourceType
Return IT Resource type- Parameters:
obj- IT Resource Object- Returns:
- Return IT Resource type
- Throws:
DDMException- Deployment ErrorSQLExceptionDDMExceptiontcAPIException
-
findITResourceTypeParams
Collection findITResourceTypeParams(RootObject obj) throws SQLException, DDMException, tcAPIException Return Collection which contains IT Resource type parameters- Parameters:
obj- IT Resource Object- Returns:
- Return Collection which contains IT Resource type parameters
- Throws:
DDMException- Deployment ErrorSQLExceptionDDMExceptiontcAPIException
-
addSubstitution
void addSubstitution(RootObject robj, String name) throws DDMException, 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- RootObjectname- Name of the substitution- Throws:
DDMExceptionSQLExceptiontcAPIException
-
removeSubstitution
Remove substitutions for a given root object- Parameters:
robj- RootObject- Throws:
DDMExceptiontcAPIException
-
getSubstitutions
get the current substitutions- Returns:
- current substitutions - Keys in the map are RootObjects and values are the new names.
- Throws:
DDMExceptiontcAPIException
-
performImport
void performImport(Collection col) throws DDMException, NamingException, tcBulkException, tcAPIException Perform the actual import operation on the selected objects.- Parameters:
col- Collection of RootObjects- Throws:
NamingExceptionDDMException- General ExceptiontcBulkExceptionDDMExceptionNamingExceptiontcAPIException
-
getMissingDependencies
Collection getMissingDependencies(Collection selection, String type) throws 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 importtype- Type of the objects interested in.- Returns:
- List of missing dependencies. Collection contains objects of type RootObject.
- Throws:
DDMExceptionDDMExceptiontcAPIException
-