public class tcImportOperationsBean extends tcBaseUtility implements javax.ejb.SessionBean, tcImportOperationsIntf
tcBaseUtility.EntitiesALL_ATTR_OB, DATE_FORMAT_SYS_PROP, DEFAULT_DATE_PATTERN, DEFAULT_LOCALE, DISPLAYNAME, FIRSTNAME, LASTNAME, LKU_GROUP, MANAGERKEY, OBJECTCLASS_COL_CODE, ORG_NAME, ORGANIZATION_KEY_COL_CODE, ORGANIZATION_NAME_COL_CODE, ORGANIZATION_PARENT_KEY_COL_CODE, ORGANIZATION_PARENT_NAME_COL_CODE, ORGKEY, ORGNAME, PARENTORGNAME, ROLE_KEY_COL_CODE, ROLE_NAME_COL_CODE, STATUS, USER_ENTITY, USER_MANAGEMENT, USERID, USERKEY, USR_DEFINED_COLUMN_CONSTANT, USR_KEY_COL_CODE, USR_MANAGER_DISPLAY_NAME_COL_CODE, USR_MANAGER_DISPLAY_NAME_LABEL, USR_MANAGER_FIRST_NAME_COL_CODE, USR_MANAGER_FIRST_NAME_COLUMN, USR_MANAGER_FIRST_NAME_LABEL, USR_MANAGER_KEY_COL_CODE, USR_MANAGER_LAST_NAME_COL_CODE, USR_MANAGER_LAST_NAME_COLUMN, USR_MANAGER_LAST_NAME_LABEL, USR_MANAGER_LOGIN_COL_CODE, USR_MANAGER_LOGIN_COLUMN, USR_MANAGER_LOGIN_LABEL| Constructor and Description |
|---|
tcImportOperationsBean() |
| Modifier and Type | Method and Description |
|---|---|
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.util.Collection |
addXMLFile(java.lang.String filename,
java.lang.String content,
java.lang.String objectSkip) |
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
|
addError, addErrorReceiver, addReject, clearErrors, getDataBase, getDefaultLocaleCode, getEJBContext, getErrors, getMap, getMapping, getName, getQueryFilter, getRejections, getSessionContext, getUnAuthorizedTargetFieldSet, removeErrorReceiver, removeInstance, setCountry, setLanguage, setSessionContext, setVariantequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, setCountry, setLanguage, setVariantpublic void ejbCreate()
throws DDMException,
javax.ejb.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 lookedupjavax.ejb.CreateExceptionpublic void close()
close in interface tcUtilityOperationsIntfclose in class tcBaseUtilitypublic void ejbRemove()
throws javax.ejb.EJBException,
java.rmi.RemoteException
ejbRemove in interface javax.ejb.SessionBeanejbRemove in class tcBaseUtilityjavax.ejb.EJBException - Thrown if the instance could not perform the
function requested by the container because of an system-level
error.java.rmi.RemoteExceptionpublic void ejbPassivate()
throws javax.ejb.EJBException,
java.rmi.RemoteException
ejbPassivate in interface javax.ejb.SessionBeanejbPassivate in class tcBaseUtilityjavax.ejb.EJBException - Thrown if the instance could not perform the
function requested by the container because of an system-level
error.java.rmi.RemoteExceptionpublic void ejbActivate()
throws javax.ejb.EJBException,
java.rmi.RemoteException
ejbActivate in interface javax.ejb.SessionBeanejbActivate in class tcBaseUtilityjavax.ejb.EJBException - 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 tcImportOperationsIntfpublic 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.NamingExceptionUnableToAcquireLockSQLExceptionNamingExceptionDDMExceptionpublic 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.public java.util.Collection addXMLFile(java.lang.String filename,
java.lang.String content,
java.lang.String objectSkip)
throws DDMException,
TransformationException
addXMLFile in interface tcImportOperationsIntfDDMExceptionTransformationExceptionpublic 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 versionpublic FilePreview getFilePreview(java.lang.String filename, java.lang.String content) throws DDMException, TransformationException
getFilePreview in interface tcImportOperationsIntfTransformationException - Transformation of the file failedDDMException - Generic deployment manager exceptionpublic java.util.Collection getFileList()
throws DDMException
getFileList in interface tcImportOperationsIntfDDMExceptionpublic java.util.Collection addLastPreviewedFile()
throws DDMException
addLastPreviewedFile in interface tcImportOperationsIntfDDMExceptionDDMExceptionpublic java.util.Collection getSourceTree(RootObject root) throws DDMException
root - Object for which source tree is neededDDMExceptionpublic java.util.HashMap getImportMessages(java.util.Collection col)
throws DDMException
getImportMessages in interface tcImportOperationsIntfcol - DDMExceptionDDMExceptionpublic ImportView getImportView(java.util.Collection col) throws DDMException
getImportView in interface tcImportOperationsIntfCol - (Collection of root objects)DDMExceptionDDMExceptionpublic java.util.Collection listPossibleSubstitutions(java.util.Collection col)
throws DDMException
listPossibleSubstitutions in interface tcImportOperationsIntfcol - collection of objects for which substitutions can be madeDDMException - Deployment Errorpublic RootObject findITResourceType(RootObject obj) throws java.sql.SQLException, DDMException
tcImportOperationsIntffindITResourceType in interface tcImportOperationsIntfRootObject - objDDMException - Deployment Errorjava.sql.SQLException - SQL Errorpublic java.util.Collection findITResourceTypeParams(RootObject obj) throws java.sql.SQLException, DDMException
tcImportOperationsIntffindITResourceTypeParams in interface tcImportOperationsIntfRootObject - objDDMException - Deployment Errorjava.sql.SQLException - SQL Errorpublic void addSubstitution(RootObject robj, java.lang.String name) throws DDMException, java.sql.SQLException
addSubstitution in interface tcImportOperationsIntfrobj - name - DDMExceptionjava.sql.SQLExceptionpublic void removeSubstitution(RootObject robj) throws DDMException
removeSubstitution in interface tcImportOperationsIntfrobj - DDMExceptionpublic java.util.HashMap getSubstitutions()
throws DDMException
getSubstitutions in interface tcImportOperationsIntfDDMExceptionpublic void performImport(java.util.Collection col)
throws DDMException,
javax.naming.NamingException,
tcBulkException
performImport in interface tcImportOperationsIntfcol - Collection of root objectsjavax.naming.NamingExceptionDDMException - General ExceptiontcBulkExceptionNamingExceptionpublic 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 Exceptionpublic java.util.Collection addConnectorPreviewedFile(java.util.Collection col)
throws DDMException,
UnableToAcquireLock
col - List of all root objects present in only old connector version.DDMExceptionUnableToAcquireLockpublic java.util.Collection getConnectorRootObjects(java.lang.String type)
throws DDMException,
UnableToAcquireLock
type - connector object types retrieved from the xml fileUnableToAcquireLockDDMException - 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 exceptionUnableToAcquireLockpublic 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 exceptionUnableToAcquireLockpublic 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 exceptionUnableToAcquireLockpublic java.util.Collection retrieveChildren(java.util.Collection objects)
throws DDMException
objects - Collection of RootObjectsDDMExceptionpublic java.lang.String checkTasks(TaskObject pt) throws DDMException, TransformationException
pt - TaskObject containing the dependent tasksTransformationException - Transformation of the file failedDDMException - Generic deployment manager exception