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:
  • Constructor Details

    • tcExportOperationsBean

      public tcExportOperationsBean()
  • Method Details

    • ejbPassivate

      public void ejbPassivate() throws javax.ejb.EJBException, RemoteException
      Description copied from class: tcBaseUtility
      The ejbPassivate() 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 the ejbActivate() method.
      This method is called with no transaction context.
      Specified by:
      ejbPassivate in interface javax.ejb.SessionBean
      Overrides:
      ejbPassivate in class tcBaseUtility
      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

      public void ejbActivate() throws javax.ejb.EJBException, RemoteException
      Description copied from class: tcBaseUtility
      The ejbActivate() 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 the ejbPassivate() method.
      This method is called with no transaction context.
      Specified by:
      ejbActivate in interface javax.ejb.SessionBean
      Overrides:
      ejbActivate in class tcBaseUtility
      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

      public void ejbCreate() throws DDMException, javax.ejb.CreateException
      Populate SchemaFacade and initializes SchemaInstance
      Throws:
      DDMException
      javax.ejb.CreateException
    • getExportView

      public Collection getExportView() throws tcAPIException
      Get the tree view to be displayed for export operation
      Specified by:
      getExportView in interface tcExportOperationsIntf
      Returns:
      Collection of RootObjects
      Throws:
      tcAPIException
    • getExportXML

      public String getExportXML(Collection rootObjects, String description) throws tcAPIException
      Export selected objects. Generate doc object to export all the selected root objects in the form of xml.
      Specified by:
      getExportXML in interface tcExportOperationsIntf
      Parameters:
      rootObjects -
      description - string containing the description of exported XML
      Returns:
      string containing the export XML
      Throws:
      tcAPIException
    • getDependencies

      public Collection getDependencies(Collection root) throws tcAPIException
      Return a list of dependent objects for the selected root objects
      Specified by:
      getDependencies in interface tcExportOperationsIntf
      Parameters:
      rootObjects -
      Returns:
      collection of dependent objects
      Throws:
      tcAPIException
      tcAPIException
    • findObjects

      public Collection findObjects(String type, String searchPattern) throws tcAPIException
      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 interface tcExportOperationsIntf
      Parameters:
      type -
      name -
      Returns:
      objects matched
      Throws:
      tcAPIException
    • retrieveCategories

      public Collection retrieveCategories() throws tcAPIException
      Retrieve the categories name via iterating all the root objects metadata, which are having the actual data.
      Specified by:
      retrieveCategories in interface tcExportOperationsIntf
      Returns:
      category collection. Collection contains strings
      Throws:
      tcAPIException
    • retrieveChildren

      public Collection retrieveChildren(Collection objects) throws tcAPIException
      Retrieve the children of the selected objects as a tree
      Specified by:
      retrieveChildren in interface tcExportOperationsIntf
      Parameters:
      objects - (Collection of root objects)
      Returns:
      children of the selected elements as a tree
      Throws:
      DDMException
      tcAPIException
    • retrieveDependencyTree

      public Collection retrieveDependencyTree(Collection objects) throws tcAPIException
      Find dependencies, and return them as a tree. Tree only contains the children of the dependencies. Not their parents.
      Specified by:
      retrieveDependencyTree in interface tcExportOperationsIntf
      Parameters:
      objects -
      Returns:
      dependencies with all the children
      Throws:
      tcAPIException
    • arrangeSelectionAsATree

      public Collection arrangeSelectionAsATree(Collection objects) throws tcAPIException
      Arranges the passed objects as a Tree
      Specified by:
      arrangeSelectionAsATree in interface tcExportOperationsIntf
      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()