|
|||||||||
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) |
java.util.Collection |
findITResourceTypeParams(RootObject obj) |
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, checkStatusAndCallbackProvisioningHandler, 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 lookedupCreateException
public void close()
close
in interface tcUtilityOperationsIntf
close
in class tcBaseUtility
public void ejbRemove() throws EJBException, java.rmi.RemoteException
ejbRemove
in class tcBaseUtility
EJBException
- 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 tcBaseUtility
EJBException
- 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 tcBaseUtility
EJBException
- Thrown if the instance could not perform the function requested by the container because of an system-level error.java.rmi.RemoteException
public boolean isLockAcquired()
isLockAcquired
in interface tcImportOperationsIntf
public LockOwner getCurrentLockInfo()
getCurrentLockInfo
in interface tcImportOperationsIntf
public void acquireLock(boolean forcedAcquisition) throws java.sql.SQLException, javax.naming.NamingException, DDMException
acquireLock
in interface tcImportOperationsIntf
forcedAcquisition
- True, if lock must be acquired regardless of another import in progressjava.sql.SQLException
javax.naming.NamingException
UnableToAcquireLock
SQLException
NamingException
DDMException
public java.util.Collection addXMLFile(java.lang.String filename, java.lang.String content) throws DDMException, TransformationException
addXMLFile
in interface tcImportOperationsIntf
filename
- 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 tcImportOperationsIntf
filenames
- Files to be removedDDMException
- Generic Deployment error during mergingjava.sql.SQLException
- Generic database error during mergingTransformationException
- Input versions cannot be transformed to current versionpublic FilePreview getFilePreview(java.lang.String filename, java.lang.String content) throws DDMException, TransformationException
getFilePreview
in interface tcImportOperationsIntf
DDMException
TransformationException
- Transformation of the file failedcom.thortech.xl.ddm.exception.DuplicateObjectException
- When the file being added conflicts with another objectsDDMException
- Generic deployment manager exceptionpublic java.util.Collection getFileList() throws DDMException
getFileList
in interface tcImportOperationsIntf
DDMException
public java.util.Collection addLastPreviewedFile() throws DDMException
addLastPreviewedFile
in interface tcImportOperationsIntf
DDMException
DDMException
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 tcImportOperationsIntf
col
-DDMException
DDMException
public ImportView getImportView(java.util.Collection col) throws DDMException
getImportView
in interface tcImportOperationsIntf
Col
- (Collection of root objects)DDMException
DDMException
public java.util.Collection listPossibleSubstitutions(java.util.Collection col) throws DDMException
listPossibleSubstitutions
in interface tcImportOperationsIntf
col
- collection of objects for which substitutions can be madeDDMException
- Deployment Errorpublic RootObject findITResourceType(RootObject obj) throws java.sql.SQLException, DDMException
findITResourceType
in interface tcImportOperationsIntf
RootObject
- objDDMException
- Deployment Errorjava.sql.SQLException
- SQL Errorpublic java.util.Collection findITResourceTypeParams(RootObject obj) throws java.sql.SQLException, DDMException
findITResourceTypeParams
in interface tcImportOperationsIntf
RootObject
- objDDMException
- Deployment Errorjava.sql.SQLException
- SQL Errorpublic void addSubstitution(RootObject robj, java.lang.String name) throws DDMException, java.sql.SQLException
addSubstitution
in interface tcImportOperationsIntf
robj
-name
-DDMException
java.sql.SQLException
public void removeSubstitution(RootObject robj) throws DDMException
removeSubstitution
in interface tcImportOperationsIntf
robj
-DDMException
public java.util.HashMap getSubstitutions() throws DDMException
getSubstitutions
in interface tcImportOperationsIntf
DDMException
public void performImport(java.util.Collection col) throws DDMException, javax.naming.NamingException, tcBulkException
performImport
in interface tcImportOperationsIntf
col
- Collection of root objectsjavax.naming.NamingException
DDMException
- General ExceptiontcBulkException
NamingException
public java.util.Collection getMissingDependencies(java.util.Collection selection, java.lang.String type) throws DDMException
getMissingDependencies
in interface tcImportOperationsIntf
selection
- List of objects selected for importtype
- Type of the objects interested in.DDMException
- General Exceptionpublic java.util.Collection addConnectorPreviewedFile(java.util.Collection col) throws DDMException, UnableToAcquireLock
col
- List of all root objects present in only old connector version.DDMException
UnableToAcquireLock
public java.util.Collection getConnectorRootObjects(java.lang.String type) throws DDMException, UnableToAcquireLock
type
- connector object types retrieved from the xml fileUnableToAcquireLock
DDMException
- Generic deployment manager exceptionpublic 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 |