Package com.thortech.xl.ejb.beansimpl
Class tcExportOperationsBean
java.lang.Object
Thor.API.Base.tcBaseUtility
com.thortech.xl.ejb.beansimpl.tcExportOperationsBean
- All Implemented Interfaces:
com.thortech.xl.dataobj.tcErrorReceiver
,com.thortech.xl.orb.api.operations._tcUtilityIntfOperations
,com.thortech.xl.server.tcOrbServerObject
,Serializable
,javax.ejb.EnterpriseBean
,javax.ejb.SessionBean
,tcUtilityOperationsIntf
,tcExportOperationsIntf
public class tcExportOperationsBean
extends tcBaseUtility
implements javax.ejb.SessionBean, tcExportOperationsIntf
Server-side API class for Exports using Deployment Manager
The APIs will be called in following order:
- findObjects : Find objects to be exported
- getExportXML(objectCollection, description) : Get the xml by passing the object collection
- Author:
- evandana
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Thor.API.Base.tcBaseUtility
tcBaseUtility.Entities
-
Field Summary
Fields inherited from class Thor.API.Base.tcBaseUtility
ALL_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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionarrangeSelectionAsATree
(Collection objects) Arranges the passed objects as a Treevoid
TheejbActivate()
method as required by the EJB specification.
The activate method is called when the instance is activated from its passive" state.void
Populate SchemaFacade and initializes SchemaInstancevoid
TheejbPassivate()
method as required by the EJB specification.
The activate method is called when the instance is activated from its "passive" state.findObjects
(String type, String searchPattern) Find the objects for a given type, with a given searchPattern.getDependencies
(Collection root) Return a list of dependent objects for the selected root objectsGet the tree view to be displayed for export operationgetExportXML
(Collection rootObjects, String description) Export selected objects.com.thortech.xl.ddm.engine.SchemaFacade
Retrieve the categories name via iterating all the root objects metadata, which are having the actual data.retrieveChildren
(Collection objects) Retrieve the children of the selected objects as a treeretrieveDependencyTree
(Collection objects) Find dependencies, and return them as a tree.void
setSchema
(com.thortech.xl.ddm.engine.SchemaFacade schema) Methods inherited from class Thor.API.Base.tcBaseUtility
addError, addErrorReceiver, addReject, clearErrors, close, ejbRemove, 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 javax.ejb.SessionBean
ejbRemove, setSessionContext
Methods inherited from interface Thor.API.Base.tcUtilityOperationsIntf
close, getName, setCountry, setLanguage, setVariant
-
Constructor Details
-
tcExportOperationsBean
public tcExportOperationsBean()
-
-
Method Details
-
ejbPassivate
Description copied from class:tcBaseUtility
TheejbPassivate()
method as required by the EJB specification.
The activate method is called when the instance is activated from its "passive" state. The instance should acquire any resource that it has released earlier in theejbActivate()
method.
This method is called with no transaction context.- Specified by:
ejbPassivate
in interfacejavax.ejb.SessionBean
- Overrides:
ejbPassivate
in classtcBaseUtility
- Throws:
javax.ejb.EJBException
- Thrown if the instance could not perform the function requested by the container because of an system-level error.RemoteException
-
ejbActivate
Description copied from class:tcBaseUtility
TheejbActivate()
method as required by the EJB specification.
The activate method is called when the instance is activated from its passive" state. The instance should acquire any resource that it has released earlier in theejbPassivate()
method.
This method is called with no transaction context.- Specified by:
ejbActivate
in interfacejavax.ejb.SessionBean
- Overrides:
ejbActivate
in classtcBaseUtility
- Throws:
javax.ejb.EJBException
- Thrown if the instance could not perform the function requested by the container because of an system-level error.RemoteException
-
ejbCreate
Populate SchemaFacade and initializes SchemaInstance- Throws:
DDMException
javax.ejb.CreateException
-
getExportView
Get the tree view to be displayed for export operation- Specified by:
getExportView
in interfacetcExportOperationsIntf
- Returns:
- Collection of RootObjects
- Throws:
tcAPIException
-
getExportXML
Export selected objects. Generate doc object to export all the selected root objects in the form of xml.- Specified by:
getExportXML
in interfacetcExportOperationsIntf
- Parameters:
rootObjects
-description
- string containing the description of exported XML- Returns:
- string containing the export XML
- Throws:
tcAPIException
-
getDependencies
Return a list of dependent objects for the selected root objects- Specified by:
getDependencies
in interfacetcExportOperationsIntf
- Parameters:
rootObjects
-- Returns:
- collection of dependent objects
- Throws:
tcAPIException
tcAPIException
-
findObjects
Find the objects for a given type, with a given searchPattern. searchPattern can have '*' to indicate any pattern. Type can be a name, or '*' to indicate all types- Specified by:
findObjects
in interfacetcExportOperationsIntf
- Parameters:
type
-name
-- Returns:
- objects matched
- Throws:
tcAPIException
-
retrieveCategories
Retrieve the categories name via iterating all the root objects metadata, which are having the actual data.- Specified by:
retrieveCategories
in interfacetcExportOperationsIntf
- Returns:
- category collection. Collection contains strings
- Throws:
tcAPIException
-
retrieveChildren
Retrieve the children of the selected objects as a tree- Specified by:
retrieveChildren
in interfacetcExportOperationsIntf
- Parameters:
objects
- (Collection of root objects)- Returns:
- children of the selected elements as a tree
- Throws:
DDMException
tcAPIException
-
retrieveDependencyTree
Find dependencies, and return them as a tree. Tree only contains the children of the dependencies. Not their parents.- Specified by:
retrieveDependencyTree
in interfacetcExportOperationsIntf
- Parameters:
objects
-- Returns:
- dependencies with all the children
- Throws:
tcAPIException
-
arrangeSelectionAsATree
Arranges the passed objects as a Tree- Specified by:
arrangeSelectionAsATree
in interfacetcExportOperationsIntf
- Parameters:
objects
-- Returns:
- collection arranged as a tree as much as possible
- Throws:
tcAPIException
-
setSchema
public void setSchema(com.thortech.xl.ddm.engine.SchemaFacade schema) -
getSchema
public com.thortech.xl.ddm.engine.SchemaFacade getSchema()
-