org.imixs.workflow.jee.ejb
Class ModelServiceBean

java.lang.Object
  extended by org.imixs.workflow.jee.ejb.ModelServiceBean
All Implemented Interfaces:
org.imixs.workflow.ExtendedModel, org.imixs.workflow.jee.ejb.ModelService, org.imixs.workflow.Model

@DeclareRoles(value={"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"})
@RolesAllowed(value={"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"})
public class ModelServiceBean
extends Object
implements org.imixs.workflow.jee.ejb.ModelService

This is the IX JEE ModelManager Implementation. This Class implements the ModelManager Interface form the IX API and also the IX JEE ModelManager Since Version 1.7.0 The Implementation handles multiple model versions. Different Versions of an Model Entity can be saved and updated. The Getter methods can be furthermore Controlled by providing a valid Model Version. If no model version is set this Implementation automatically defaults to the highest available ModelVersion

Author:
rsoika
See Also:
org.imixs.workflow.ModelManager, org.imixs.workflow.jee.ejb.ModelManager

Constructor Summary
ModelServiceBean()
           
 
Method Summary
 org.imixs.workflow.ItemCollection getActivityEntity(int processid, int activityid)
          This method returns the ActivityEntity with the highest Version number ($modelversion)
 org.imixs.workflow.ItemCollection getActivityEntityByVersion(int processid, int activityid, String modelVersion)
           
 Collection<org.imixs.workflow.ItemCollection> getActivityEntityList(int processid)
          returns a collection of ItemCollections representing the model activity Entities for the coresponding processid
 Collection<org.imixs.workflow.ItemCollection> getActivityEntityListByVersion(int processid, String aModelVersion)
           
 List<String> getAllModelVersions()
          returns a String list of all accessible Modelversions
 List<org.imixs.workflow.ItemCollection> getAllProcessEntitiesByGroup(String aGroup)
          returns a list of all ProcessEntities for a specific ProcessGroup
 List<org.imixs.workflow.ItemCollection> getAllStartProcessEntities()
          returns a list of all ProcessEntities which are the first one in each ProcessGroup.
 List<org.imixs.workflow.ItemCollection> getAllStartProcessEntitiesByVersion(String version)
          returns a list of all ProcessEntities which are the first one in each ProcessGroup.
 List<String> getAllWorkflowGroups()
           
 List<String> getAllWorkflowGroupsByVersion(String version)
           
 Collection<org.imixs.workflow.ItemCollection> getEnvironmentEntityList()
           
 Collection<org.imixs.workflow.ItemCollection> getEnvironmentEntityListByVersion(String modelversion)
           
 String getLatestVersion()
          This helper method finds the highest Model Version available in the system.
 org.imixs.workflow.ItemCollection getProcessEntity(int processid)
           
 org.imixs.workflow.ItemCollection getProcessEntityByVersion(int processid, String modelversion)
           
 Collection<org.imixs.workflow.ItemCollection> getProcessEntityList()
          returns a collection of ItemCollections representing the model process Entities
 Collection<org.imixs.workflow.ItemCollection> getProcessEntityListByVersion(String aModelVersion)
          returns a collection of ItemCollections representing the model process Entities
 List<org.imixs.workflow.ItemCollection> getPublicActivities(int aprocessid)
          returns all the activities in a list for a corresponding process entity The method returns only Activities where keypublicresult !
 List<org.imixs.workflow.ItemCollection> getPublicActivitiesByVersion(int aprocessid, String version)
          returns all the activities in a list for a corresponding process entity The method returns only Activities where keypublicresult !
 void removeModelVersion(String modelversion)
          This method removes a spcific ModelVersion defined by param 'modelversion'.
 void saveActivityEntity(org.imixs.workflow.ItemCollection ic)
          Saves or updates an ActivityEntity represented by an ItemCollection.
 void saveEnvironmentEntity(org.imixs.workflow.ItemCollection ic)
           
 void saveProcessEntity(org.imixs.workflow.ItemCollection ic)
          Saves or updates a ProcessEntitiy represented by an ItemCollection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelServiceBean

public ModelServiceBean()
Method Detail

getActivityEntity

public org.imixs.workflow.ItemCollection getActivityEntity(int processid,
                                                           int activityid)
                                                    throws Exception
This method returns the ActivityEntity with the highest Version number ($modelversion)

Specified by:
getActivityEntity in interface org.imixs.workflow.Model
Throws:
Exception

getActivityEntityByVersion

public org.imixs.workflow.ItemCollection getActivityEntityByVersion(int processid,
                                                                    int activityid,
                                                                    String modelVersion)
                                                             throws Exception
Specified by:
getActivityEntityByVersion in interface org.imixs.workflow.ExtendedModel
Throws:
Exception

getProcessEntity

public org.imixs.workflow.ItemCollection getProcessEntity(int processid)
                                                   throws Exception
Specified by:
getProcessEntity in interface org.imixs.workflow.Model
Throws:
Exception

getProcessEntityByVersion

public org.imixs.workflow.ItemCollection getProcessEntityByVersion(int processid,
                                                                   String modelversion)
                                                            throws Exception
Specified by:
getProcessEntityByVersion in interface org.imixs.workflow.ExtendedModel
Throws:
Exception

getActivityEntityList

public Collection<org.imixs.workflow.ItemCollection> getActivityEntityList(int processid)
                                                                    throws Exception
returns a collection of ItemCollections representing the model activity Entities for the coresponding processid

Specified by:
getActivityEntityList in interface org.imixs.workflow.Model
Throws:
Exception

getActivityEntityListByVersion

public Collection<org.imixs.workflow.ItemCollection> getActivityEntityListByVersion(int processid,
                                                                                    String aModelVersion)
                                                                             throws Exception
Specified by:
getActivityEntityListByVersion in interface org.imixs.workflow.ExtendedModel
Specified by:
getActivityEntityListByVersion in interface org.imixs.workflow.jee.ejb.ModelService
Throws:
Exception

getProcessEntityList

public Collection<org.imixs.workflow.ItemCollection> getProcessEntityList()
                                                                   throws Exception
returns a collection of ItemCollections representing the model process Entities

Specified by:
getProcessEntityList in interface org.imixs.workflow.Model
Throws:
Exception

getProcessEntityListByVersion

public Collection<org.imixs.workflow.ItemCollection> getProcessEntityListByVersion(String aModelVersion)
                                                                            throws Exception
returns a collection of ItemCollections representing the model process Entities

Specified by:
getProcessEntityListByVersion in interface org.imixs.workflow.ExtendedModel
Specified by:
getProcessEntityListByVersion in interface org.imixs.workflow.jee.ejb.ModelService
Throws:
Exception

getEnvironmentEntityList

public Collection<org.imixs.workflow.ItemCollection> getEnvironmentEntityList()
                                                                       throws Exception
Specified by:
getEnvironmentEntityList in interface org.imixs.workflow.jee.ejb.ModelService
Throws:
Exception

getEnvironmentEntityListByVersion

public Collection<org.imixs.workflow.ItemCollection> getEnvironmentEntityListByVersion(String modelversion)
                                                                                throws Exception
Specified by:
getEnvironmentEntityListByVersion in interface org.imixs.workflow.jee.ejb.ModelService
Throws:
Exception

saveActivityEntity

public void saveActivityEntity(org.imixs.workflow.ItemCollection ic)
                        throws Exception
Saves or updates an ActivityEntity represented by an ItemCollection. The Entity is unique identified of its Attributes 'numProcessID', 'numActivityID' and '$modelversion' The Method verifies that an existing instance will be updated.

Specified by:
saveActivityEntity in interface org.imixs.workflow.jee.ejb.ModelService
Parameters:
ic -
Throws:
Exception

saveProcessEntity

public void saveProcessEntity(org.imixs.workflow.ItemCollection ic)
                       throws Exception
Saves or updates a ProcessEntitiy represented by an ItemCollection. The Entity is unique identified of its Attributes 'numProcessID' and '$modelversion' The Method verifies that an existing instance will be updated.

Specified by:
saveProcessEntity in interface org.imixs.workflow.jee.ejb.ModelService
Parameters:
ic -
Throws:
Exception

saveEnvironmentEntity

public void saveEnvironmentEntity(org.imixs.workflow.ItemCollection ic)
                           throws Exception
Specified by:
saveEnvironmentEntity in interface org.imixs.workflow.jee.ejb.ModelService
Throws:
Exception

removeModelVersion

public void removeModelVersion(String modelversion)
                        throws Exception
This method removes a spcific ModelVersion defined by param 'modelversion'. If modelVersion is null the method will remove all models

Specified by:
removeModelVersion in interface org.imixs.workflow.jee.ejb.ModelService
Throws:
Exception

getLatestVersion

public String getLatestVersion()
                        throws Exception
This helper method finds the highest Model Version available in the system. Returns null if no version was found!

Specified by:
getLatestVersion in interface org.imixs.workflow.jee.ejb.ModelService
Returns:
Throws:
Exception

getAllModelVersions

public List<String> getAllModelVersions()
returns a String list of all accessible Modelversions

Specified by:
getAllModelVersions in interface org.imixs.workflow.jee.ejb.ModelService
Returns:

getPublicActivities

public List<org.imixs.workflow.ItemCollection> getPublicActivities(int aprocessid)
returns all the activities in a list for a corresponding process entity The method returns only Activities where keypublicresult != "0"

Specified by:
getPublicActivities in interface org.imixs.workflow.jee.ejb.ModelService
Returns:
List of activity Entities

getPublicActivitiesByVersion

public List<org.imixs.workflow.ItemCollection> getPublicActivitiesByVersion(int aprocessid,
                                                                            String version)
returns all the activities in a list for a corresponding process entity The method returns only Activities where keypublicresult != "0"

Specified by:
getPublicActivitiesByVersion in interface org.imixs.workflow.jee.ejb.ModelService
Returns:
List of activity Entities

getAllWorkflowGroups

public List<String> getAllWorkflowGroups()
Specified by:
getAllWorkflowGroups in interface org.imixs.workflow.jee.ejb.ModelService

getAllWorkflowGroupsByVersion

public List<String> getAllWorkflowGroupsByVersion(String version)
Specified by:
getAllWorkflowGroupsByVersion in interface org.imixs.workflow.jee.ejb.ModelService

getAllStartProcessEntities

public List<org.imixs.workflow.ItemCollection> getAllStartProcessEntities()
returns a list of all ProcessEntities which are the first one in each ProcessGroup. So for each ProcessGroup the ProcessEntity with the lowest processID will be returned. The method builds a cash with the best (lowest) ProcessID for each process group.

Specified by:
getAllStartProcessEntities in interface org.imixs.workflow.jee.ejb.ModelService
Returns:

getAllStartProcessEntitiesByVersion

public List<org.imixs.workflow.ItemCollection> getAllStartProcessEntitiesByVersion(String version)
returns a list of all ProcessEntities which are the first one in each ProcessGroup. The ModelVersion specifies the Model to be analiezed. So for each ProcessGroup the ProcessEntity with the lowest processID will be returned. The method builds a cash with the best (lowest) ProcessID for each process group. The collection returned will be sorted by the numProcessID

Specified by:
getAllStartProcessEntitiesByVersion in interface org.imixs.workflow.jee.ejb.ModelService
Returns:

getAllProcessEntitiesByGroup

public List<org.imixs.workflow.ItemCollection> getAllProcessEntitiesByGroup(String aGroup)
returns a list of all ProcessEntities for a specific ProcessGroup

Specified by:
getAllProcessEntitiesByGroup in interface org.imixs.workflow.jee.ejb.ModelService
Returns:


Copyright © 2006-2011 Imixs Software Solutions GmbH. All Rights Reserved.