Java Doc for StandardResourceAssignmentService.java in  » Workflow-Engines » wfmopen-2.1.1 » de » danet » an » workflow » assignment » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Workflow Engines » wfmopen 2.1.1 » de.danet.an.workflow.assignment 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   de.danet.an.workflow.assignment.StandardResourceAssignmentService

StandardResourceAssignmentService
public class StandardResourceAssignmentService implements ResourceAssignmentService(Code)
This class implements the standard resource assignment service provided as part of the workflow package.



Constructor Summary
public  StandardResourceAssignmentService(ResourceManagementServiceFactory rmsFac, ResourceAssignmentContext rasCtx, DataSource ds)
     Constructs a new resource assignment service.

Method Summary
protected  voidaddAssignment(long finderId, String actId, WfResource resource)
     Assign a resource to an activity.
Parameters:
  actId - a unique (with respect to an ActivityFinder)identifier for the Activity.
public  WfResourceasResource(Principal principal)
     Given a java.security.Principal principal , return the workflow resource associated with this principal.
public  Collectionassignments(ActivityFinder finder, String actId, WfActivity activity)
     Return the assignments to an activity.
Parameters:
  actId - a unique (with respect to an ActivityFinder)identifier for the Activity.
public  Collectionauthorizers(WfResource resource)
    
public  CollectionautoAssignResources(ActivityFinder finder, String actId, WfActivity activity, Principal principal, Participant participant)
     Triggers the automatic assignment of resources to an activity that is about to become ready.

If resSel is of type string, the following cases are handled by the assignment service:

!:currentUser
Assigns the current user.
In all other cases the parameter resSel is simply passed through to ResourceManagementService.selectResources the resourceselection service .
Parameters:
  actId - a unique (with respect to an ActivityFinder)identifier for the Activity.
public  voidchangeAssignment(ActivityFinder finder, String actId, WfActivity activity, WfResource oldResource, WfResource newResource)
     Change an assignment for enacting an activity.


Parameters:
  finder - the finder used to lookup activities by their finderIds
Parameters:
  actId - a unique (with respect to an ActivityFinder)identifier for the Activity.

protected  ActivityFinderfinderByIndex(long finderId)
     Lookup a finder for a given finder id.
protected  longfinderId(ActivityFinder finder)
     Get the finder id for a finder.
Parameters:
  finder - the activity finder in question.
protected  DataSourcegetDataSource()
     Return the data source oassed to the constructor.
public  WfResourcegetResource(WfAssignment asnmnt)
    
protected  ResourceManagementServicegetResourceManagementService()
     Return the resource management service passed to the constructor.
public  booleanisMemberOfWorkItems(WfResource resource, WfAssignment assignment)
     Find out if a given assignment belongs to the work items assigned to a particular resource.
Parameters:
  resource - the resource.
Parameters:
  assignment - the assignment in question.
public  CollectionknownResources()
     Returns at least the collection of all the workflow resources whom has been assigned work items, but optionally it can return the additional workflow resources who are known to the resource assignment service.
public  voidremoveAssignment(ActivityFinder finder, String actId, WfActivity activity, WfResource resource)
     Remove the assignment of a resource to an activity.
public  WfResourceresourceByKey(String key)
     Given the key of a WfResource (obtained with WfResource.resourceKeyresourceKey() ), return the workflow resource associated with this key.

This method is implemented by simply calling ResourceManagementService.resourceByKeyresourceByKey of the underlying resource management service.
Parameters:
  key - the key.

public  CollectionworkItems(WfResource resource)
     Return the assignments of a given resource.
Parameters:
  resource - the resource.


Constructor Detail
StandardResourceAssignmentService
public StandardResourceAssignmentService(ResourceManagementServiceFactory rmsFac, ResourceAssignmentContext rasCtx, DataSource ds) throws FactoryConfigurationError(Code)
Constructs a new resource assignment service.
Parameters:
  rasCtx - an implementation of the resource Assignment context
Parameters:
  rmsFac - the resource management service factory.
throws:
  FactoryConfigurationError - if a problem creating the RMSoccurs




Method Detail
addAssignment
protected void addAssignment(long finderId, String actId, WfResource resource) throws RemoteException, AlreadyAssignedException(Code)
Assign a resource to an activity.
Parameters:
  actId - a unique (with respect to an ActivityFinder)identifier for the Activity. The length of actId is guaranteed not to exceed 64.
Parameters:
  finderId - the finderIds.
Parameters:
  activity - the activity that is about to become ready.
Parameters:
  resource - the resource to be assigned.
throws:
  RemoteException - if a system-level error occurs.
throws:
  NoSuchResourceException - if the resource is invalid.
See Also:   ActivityFinder
throws:
  AlreadyAssignedException - if the assignment alreadyexists



asResource
public WfResource asResource(Principal principal) throws RemoteException, InvalidKeyException(Code)
Given a java.security.Principal principal , return the workflow resource associated with this principal. This implementation simply delegates the request to the resource management service.
Parameters:
  principal - the principal. a WfResource object corresponding to thegiven principal.
throws:
  NoSuchResourceException - if the StaffMember with the given keycan't be found or the key is not associate with an StaffMember object.
throws:
  RemoteException - if a system-level error occurs.



assignments
public Collection assignments(ActivityFinder finder, String actId, WfActivity activity) throws RemoteException(Code)
Return the assignments to an activity.
Parameters:
  actId - a unique (with respect to an ActivityFinder)identifier for the Activity. The length of actId is guaranteed not to exceed 64.
Parameters:
  finder - the finder used to lookup activities by their finderIds.
Parameters:
  activity - the activity. the collection of assignments (instances ofde.danet.an.workflow.omgcore.WfAssignmentWfAssignment).
throws:
  RemoteException - if a system-level error occurs.



authorizers
public Collection authorizers(WfResource resource) throws RemoteException(Code)



autoAssignResources
public Collection autoAssignResources(ActivityFinder finder, String actId, WfActivity activity, Principal principal, Participant participant) throws RemoteException(Code)
Triggers the automatic assignment of resources to an activity that is about to become ready.

If resSel is of type string, the following cases are handled by the assignment service:

!:currentUser
Assigns the current user.
In all other cases the parameter resSel is simply passed through to ResourceManagementService.selectResources the resourceselection service .
Parameters:
  actId - a unique (with respect to an ActivityFinder)identifier for the Activity. The length of actId is guaranteed not to exceed 64.
Parameters:
  finder - the finder used to lookup activities by their finderIds.
Parameters:
  activity - the activity that is about to become ready.
Parameters:
  principal - the current caller as known in the EJB context,may be null.
Parameters:
  participant - the Participant that describes the resource selection criteria. the assigned resources (instances of de.danet.an.workflow.omgcore.WfResourceWfResource).
throws:
  RemoteException - if a system-level error occurs.
See Also:   ActivityFinder



changeAssignment
public void changeAssignment(ActivityFinder finder, String actId, WfActivity activity, WfResource oldResource, WfResource newResource) throws RemoteException, InvalidResourceException, AlreadyAssignedException, NotAssignedException(Code)
Change an assignment for enacting an activity.


Parameters:
  finder - the finder used to lookup activities by their finderIds
Parameters:
  actId - a unique (with respect to an ActivityFinder)identifier for the Activity. The length of actId is guaranteed not to exceed 64
Parameters:
  activity - the activity being enacted
Parameters:
  oldResource - the resource that has its assignment removed
Parameters:
  newResource - the resource to be assigned
throws:
  RemoteException - if a system-level error occurs
throws:
  InvalidResourceException - if the resource is invalid.As the environment is a concurrent multi user environment, WfResource objects may become invalid
throws:
  AlreadyAssignedException - if the assignment alreadyexists
throws:
  NotAssignedException - if there is no assignment to theold resource
See Also:   ActivityFinder




finderByIndex
protected ActivityFinder finderByIndex(long finderId)(Code)
Lookup a finder for a given finder id.
Parameters:
  finderId - the finder id the finder



finderId
protected long finderId(ActivityFinder finder) throws RemoteException(Code)
Get the finder id for a finder.
Parameters:
  finder - the activity finder in question. the associated index.
throws:
  RemoteException - if a system-level error occurs.



getDataSource
protected DataSource getDataSource()(Code)
Return the data source oassed to the constructor. Returns the data source.



getResource
public WfResource getResource(WfAssignment asnmnt) throws RemoteException(Code)
Get the resource associated with an Assignment.


Parameters:
  asnmnt - the assignment the resource
throws:
  RemoteException - if a system-level error occurs.
See Also:   de.danet.an.workflow.spis.ras.ActivityFinder




getResourceManagementService
protected ResourceManagementService getResourceManagementService()(Code)
Return the resource management service passed to the constructor. Returns the rms.



isMemberOfWorkItems
public boolean isMemberOfWorkItems(WfResource resource, WfAssignment assignment) throws RemoteException, NoSuchResourceException(Code)
Find out if a given assignment belongs to the work items assigned to a particular resource.
Parameters:
  resource - the resource.
Parameters:
  assignment - the assignment in question. true if the assignment belongs to the work items of the resource.
throws:
  RemoteException - if a system-level error occurs.
throws:
  NoSuchResourceException - if the resource is invalid.
See Also:   de.danet.an.workflow.spis.rms



knownResources
public Collection knownResources() throws RemoteException(Code)
Returns at least the collection of all the workflow resources whom has been assigned work items, but optionally it can return the additional workflow resources who are known to the resource assignment service. the collection of the known resources to the ras (instances ofde.danet.an.workflow.omgcore.WfResourceWfResource).
throws:
  RemoteException - if a system-level error occurs.
See Also:   de.danet.an.workflow.assignment



removeAssignment
public void removeAssignment(ActivityFinder finder, String actId, WfActivity activity, WfResource resource) throws RemoteException, InvalidResourceException, NotAssignedException(Code)
Remove the assignment of a resource to an activity. This method is called by the workflow engine to implement the assignment manipulation methods provided by its API.


Parameters:
  actId - a unique (with respect to an ActivityFinder)identifier for the Activity. The length of actId is guaranteed not to exceed 64.
Parameters:
  finder - the finder used to lookup activities by their finderIds.
Parameters:
  activity - the activity that is about to become ready.
Parameters:
  resource - the resource to be assigned.
throws:
  RemoteException - if a system-level error occurs.
throws:
  InvalidResourceException - if the resource is invalid.
throws:
  NotAssignedException - if the resource is not assigned tothe given activity
See Also:   ActivityFinder




resourceByKey
public WfResource resourceByKey(String key) throws InvalidKeyException, RemoteException(Code)
Given the key of a WfResource (obtained with WfResource.resourceKeyresourceKey() ), return the workflow resource associated with this key.

This method is implemented by simply calling ResourceManagementService.resourceByKeyresourceByKey of the underlying resource management service.
Parameters:
  key - the key. a WfResource object corresponding to thegiven key.
throws:
  NoSuchResourceException - if the resource with the givenkey can't be found. As the environment is a concurrent multiuser environment, WfResource objects (and keys obtainedfrom WfResource objects) may become invalid.
throws:
  RemoteException - if a system-level error occurs.




workItems
public Collection workItems(WfResource resource) throws RemoteException(Code)
Return the assignments of a given resource.
Parameters:
  resource - the resource. the collection of assigned work items (instances ofde.danet.an.workflow.omgcore.WfAssignmentWfAssignment).
throws:
  RemoteException - if a system-level error occurs.
See Also:   de.danet.an.workflow.spis.rms



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.