|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
Thor.API.Base.tcBaseUtility
com.thortech.xl.ejb.beansimpl.tcImportOperationsBean
public class tcImportOperationsBean
Server-side API class for Imports using Deployment Manager The APIs will be called in following order:
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class Thor.API.Base.tcBaseUtility |
|---|
tcBaseUtility.Entities |
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
tcImportOperationsBean() |
|
| Method Summary | |
|---|---|
void |
acquireLock(boolean forcedAcquisition)Try to acquire the lock |
java.util.Collection |
addConnectorPreviewedFile(java.util.Collection col)All the RootObjects which are being calculated for deletion are to be populated. |
java.util.Collection |
addLastPreviewedFile()Add the file previewed before into the files to be imported. |
void |
addSubstitution(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. |
java.lang.String |
checkTasks(TaskObject pt)It checks the dependency tasks to be available if a task is being imported/deleted. |
void |
close()This method will clean up all resources associated with this object. |
void |
ejbActivate()Throw an exception and don't activate |
void |
ejbCreate()create a session bean and try to acquire the lock. |
void |
ejbPassivate()Passivate the ebjb |
void |
ejbRemove()Remove the EJB and release the lock |
RootObject |
findITResourceType(RootObject obj)Return IT Resource type |
java.util.Collection |
findITResourceTypeParams(RootObject obj)Return Collection which contains IT Resource type parameters |
java.util.Collection |
getConnectorRootObjects(java.lang.String type)Returns a collection of RootObjects which are present in the connector XML file to be imported of a particular entity type. |
LockOwner |
getCurrentLockInfo()Return information about the current owner of the lock |
java.util.Collection |
getFileList()Retrieve list of files currently added for import |
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. |
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.Collection |
getProcessTasks(java.util.Collection col)Returns Collection of TaskObjects containing details of all the process tasks to be taken care of during import |
java.util.Collection |
getSourceTree(RootObject root)Return the object as it appeared in the source database. |
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. |
void |
populateChildren(java.util.Collection oldObjects)Populates the name value pairs to be saved to export this dependency. |
java.util.Collection |
removeFiles(java.util.Collection filenames)Removes the selected XML Files and recomputes what is going to happen. |
void |
removeSubstitution(RootObject robj)Remove substitutions for a given root object |
java.util.Collection |
retrieveChildren(java.util.Collection objects)Returns collection of RootObjects whose children need to be populated. |
void |
updateTasks(TaskObject pt)The TaskObject contain the details of a process Task which needs to be updated to check if it needs to be deleted/Imported |
| Methods inherited from class Thor.API.Base.tcBaseUtility |
|---|
addError, addErrorReceiver, addReject, clearErrors, getDataBase, getDefaultLocaleCode, getEJBContext, getErrors, getMap, getMapping, getName, getQueryFilter, getRejections, getSessionContext, getUnAuthorizedTargetFieldSet, removeErrorReceiver, removeInstance, setCountry, setLanguage, setSessionContext, setVariant |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface Thor.API.Base.tcUtilityOperationsIntf |
|---|
getName, setCountry, setLanguage, setVariant |
| Constructor Detail |
|---|
public tcImportOperationsBean()
| Method Detail |
|---|
public void ejbCreate()
throws DDMException,
CreateException,
java.sql.SQLException,
javax.naming.NamingException
UnableToAcquireLock - if some other import is in progressDDMException - General Deployment Manager errorsjava.sql.SQLException - General database errorsjavax.naming.NamingException - When the database cannot be lookedupCreateExceptionpublic void close()
close in interface tcUtilityOperationsIntfclose in class tcBaseUtility
public void ejbRemove()
throws EJBException,
java.rmi.RemoteException
ejbRemove in class tcBaseUtilityEJBException - Thrown if the instance could not perform the function requested by the container because of an system-level error.java.rmi.RemoteException
public void ejbPassivate()
throws EJBException,
java.rmi.RemoteException
ejbPassivate in class tcBaseUtilityEJBException - Thrown if the instance could not perform the function requested by the container because of an system-level error.java.rmi.RemoteException
public void ejbActivate()
throws EJBException,
java.rmi.RemoteException
ejbActivate in class tcBaseUtilityEJBException - Thrown if the instance could not perform the function requested by the container because of an system-level error.java.rmi.RemoteExceptionpublic boolean isLockAcquired()
isLockAcquired in interface tcImportOperationsIntfpublic LockOwner getCurrentLockInfo()
getCurrentLockInfo in interface tcImportOperationsIntf
public void acquireLock(boolean forcedAcquisition)
throws java.sql.SQLException,
javax.naming.NamingException,
DDMException
acquireLock in interface tcImportOperationsIntfforcedAcquisition - True, if lock must be acquired regardless of another import in progressjava.sql.SQLExceptionjavax.naming.NamingExceptionUnableToAcquireLockSQLExceptionNamingExceptionDDMException
public java.util.Collection addXMLFile(java.lang.String filename,
java.lang.String content)
throws DDMException,
TransformationException
addXMLFile in interface tcImportOperationsIntffilename - Filename of the file being imported. For tracking purposes.content - Content of the file to be imported.DDMException - Generic deployment manager errorjava.sql.SQLException - Generic database errorTransformationException - Input file version is different from the current version and transformation of the data to current version failed.com.thortech.xl.ddm.exception.DuplicateObjectException - Same object is also being imported from a different file.
public java.util.Collection removeFiles(java.util.Collection filenames)
throws DDMException,
TransformationException
removeFiles in interface tcImportOperationsIntffilenames - Files to be removedDDMException - Generic Deployment error during mergingjava.sql.SQLException - Generic database error during mergingTransformationException - Input versions cannot be transformed to current version
public FilePreview getFilePreview(java.lang.String filename,
java.lang.String content)
throws DDMException,
TransformationException
getFilePreview in interface tcImportOperationsIntfDDMExceptionTransformationException - Transformation of the file failedcom.thortech.xl.ddm.exception.DuplicateObjectException - When the file being added conflicts with another objectsDDMException - Generic deployment manager exception
public java.util.Collection getFileList()
throws DDMException
getFileList in interface tcImportOperationsIntfDDMException
public java.util.Collection addLastPreviewedFile()
throws DDMException
addLastPreviewedFile in interface tcImportOperationsIntfDDMExceptionDDMException
public java.util.Collection getSourceTree(RootObject root)
throws DDMException
root - Object for which source tree is neededDDMException
public java.util.HashMap getImportMessages(java.util.Collection col)
throws DDMException
getImportMessages in interface tcImportOperationsIntfcol -DDMExceptionDDMException
public ImportView getImportView(java.util.Collection col)
throws DDMException
getImportView in interface tcImportOperationsIntfCol - (Collection of root objects)DDMExceptionDDMException
public java.util.Collection listPossibleSubstitutions(java.util.Collection col)
throws DDMException
listPossibleSubstitutions in interface tcImportOperationsIntfcol - collection of objects for which substitutions can be madeDDMException - Deployment Error
public RootObject findITResourceType(RootObject obj)
throws java.sql.SQLException,
DDMException
tcImportOperationsIntffindITResourceType in interface tcImportOperationsIntfRootObject - objDDMException - Deployment Errorjava.sql.SQLException - SQL Error
public java.util.Collection findITResourceTypeParams(RootObject obj)
throws java.sql.SQLException,
DDMException
tcImportOperationsIntffindITResourceTypeParams in interface tcImportOperationsIntfRootObject - objDDMException - Deployment Errorjava.sql.SQLException - SQL Error
public void addSubstitution(RootObject robj,
java.lang.String name)
throws DDMException,
java.sql.SQLException
addSubstitution in interface tcImportOperationsIntfrobj -name -DDMExceptionjava.sql.SQLException
public void removeSubstitution(RootObject robj)
throws DDMException
removeSubstitution in interface tcImportOperationsIntfrobj -DDMException
public java.util.HashMap getSubstitutions()
throws DDMException
getSubstitutions in interface tcImportOperationsIntfDDMException
public void performImport(java.util.Collection col)
throws DDMException,
javax.naming.NamingException,
tcBulkException
performImport in interface tcImportOperationsIntfcol - Collection of root objectsjavax.naming.NamingExceptionDDMException - General ExceptiontcBulkExceptionNamingException
public java.util.Collection getMissingDependencies(java.util.Collection selection,
java.lang.String type)
throws DDMException
getMissingDependencies in interface tcImportOperationsIntfselection - List of objects selected for importtype - Type of the objects interested in.DDMException - General Exception
public java.util.Collection addConnectorPreviewedFile(java.util.Collection col)
throws DDMException,
UnableToAcquireLock
col - List of all root objects present in only old connector version.DDMExceptionUnableToAcquireLock
public java.util.Collection getConnectorRootObjects(java.lang.String type)
throws DDMException,
UnableToAcquireLock
type - connector object types retrieved from the xml fileUnableToAcquireLockDDMException - Generic deployment manager exception
public void populateChildren(java.util.Collection oldObjects)
throws DDMException,
TransformationException,
UnableToAcquireLock
oldObjects - collection of Objects to be deleted , so the deletion when triggered deleted the whole tree starting from the leaf.TransformationException - Transformation of the file failedDDMException - Generic deployment manager exceptionUnableToAcquireLock
public java.util.Collection getProcessTasks(java.util.Collection col)
throws DDMException,
TransformationException,
UnableToAcquireLock
col - List of Collection of TaskObjects containing details of all the process tasksTransformationException - Transformation of the file failedDDMException - Generic deployment manager exceptionUnableToAcquireLock
public void updateTasks(TaskObject pt)
throws DDMException,
TransformationException,
UnableToAcquireLock
pt - TaskObject contain the details of a process Task to be updatedTransformationException - Transformation of the file failedDDMException - Generic deployment manager exceptionUnableToAcquireLock
public java.util.Collection retrieveChildren(java.util.Collection objects)
throws DDMException
objects - Collection of RootObjectsDDMException
public java.lang.String checkTasks(TaskObject pt)
throws DDMException,
TransformationException
pt - TaskObject containing the dependent tasksTransformationException - Transformation of the file failedDDMException - Generic deployment manager exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||