Java Doc for StrategicTransportProjectorPlugin.java in  » Science » Cougaar12_4 » org » cougaar » logistics » plugin » strattrans » 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 » Science » Cougaar12_4 » org.cougaar.logistics.plugin.strattrans 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.cougaar.lib.filter.UTILExpanderPluginAdapter
   org.cougaar.logistics.plugin.strattrans.StrategicTransportProjectorPlugin

StrategicTransportProjectorPlugin
public class StrategicTransportProjectorPlugin extends UTILExpanderPluginAdapter implements UTILOrgActivityListener,UTILOrganizationListener,UTILParameterizedAssetListener(Code)
Class org.cougaar.logistics.plugin.strattrans.StrategicTransportProjectorPlugin is a replacement for org.cougaar.mlm.plugin.sample.StrategicTranportProjectorPlugin.

(updated based upon ComponentPlugin and Toolkit)

This class subscribes to the single "Deploy" "DetermineRequirements" Task and expands it to "Transport" Tasks for all applicable assets.

Currently expects only one oplan, one "self" org activity, and one "Deploy" "DetermineRequirements" task.

Debug information is now off by default. See method setDebug()


Inner Class :class SubscriptionResults

Field Summary
protected  UTILOrgActivityCallbackmyDeploymentOrgActivityCallback
    
protected  UTILParameterizedAggregateAssetCallbackmyMEIAssetCallback
    
protected  UTILParameterizedAggregateAssetCallbackmyPersonAssetCallback
    
protected  UTILOrganizationCallbackmySelfOrganizationCallback
    


Method Summary
public  SubscriptionResultscheckSubscriptions()
     Returns a structure containing all the information extracted from the blackboard.
protected  UTILOrgActivityCallbackcreateOrgActivityCallback()
    
protected  UTILOrganizationCallbackcreateOrganizationCallback()
    
protected  UTILParameterizedAggregateAssetCallbackcreateParameterizedAggregateAssetCallback(String key, boolean isDynamic)
    
protected  UTILFilterCallbackcreateThreadCallback(UTILGenericListener bufferingThread)
     Provide the callback that is paired with the buffering thread, which is a listener.
protected  VectorgetMEIAssets()
    
protected  OrgActivitygetOrgActivity(String id)
    
protected  StringgetOrgID(Organization org)
    
protected  VectorgetPersonAssets()
    
protected  OrganizationgetSelfOrg()
    
public  VectorgetSubtasks(Task task)
     Expands the task using information from several different subscriptions If the key subscriptions have not been filled, as determined by checkSubscriptions(), then returns an empty Vector, which must be handled appropriately by higher levels.
public  VectorgetSubtasks(Task task, SubscriptionResults subscriptionResults)
     Overloaded for efficient checking of subscriptions. Returns empty vector if the task is in the past.
public  voidhandleChangedOrgActivities(Enumeration e)
    
public  voidhandleChangedOrganizations(Enumeration e)
     Does NOT replan on changed org. If we replan on changed org - will always replan on rehydrate, when the org changes when the agent is reconstituted. Why the org changes, I'm not sure.
public  voidhandleChangedParameterizedAssets(Enumeration e, String key)
    
public  voidhandleNewOrgActivities(Enumeration e)
    
public  voidhandleNewOrganizations(Enumeration e)
    
public  voidhandleNewParameterizedAssets(Enumeration e, String key)
    
public  voidhandleTask(Task t)
    
 Implemented for UTILGenericListener interface
 This method Expands the given Task and publishes the PlanElement,
 but only if subtasks have been created.
public  voidhandleTask(Task t, SubscriptionResults subscriptionResults)
    
public  booleaninterestingOrgActivity(OrgActivity orgAct)
    
public  booleaninterestingOrganization(Organization org)
    
public  booleaninterestingParameterizedAsset(Asset o, String key)
     Interested in listening to Person/ClassVIIMajorEndItem assets See bug 2998 in bugzilla. In order to not strat trans move Level2MEIs we filter out equipment with the cargo cat code of "000" which means phantom equipment.
public  booleaninterestingTask(Task task)
     State that we are interested in all DETERMINEREQUIREMENT tasks of type Asset where the asset type is StrategicTransportation.
Parameters:
  task - the task to test.
public  booleanorgActivityInThePast(SubscriptionResults subscriptionResults)
     Is the org activity for something in the past? SubscriptionResults refers to org activity, which has a time span for when it's active.
public  voidredoTasks()
     Replan tasks when one of the inputs has changed, typically the Org Activity.
public  voidsetupFilters()
    

Field Detail
myDeploymentOrgActivityCallback
protected UTILOrgActivityCallback myDeploymentOrgActivityCallback(Code)



myMEIAssetCallback
protected UTILParameterizedAggregateAssetCallback myMEIAssetCallback(Code)



myPersonAssetCallback
protected UTILParameterizedAggregateAssetCallback myPersonAssetCallback(Code)



mySelfOrganizationCallback
protected UTILOrganizationCallback mySelfOrganizationCallback(Code)





Method Detail
checkSubscriptions
public SubscriptionResults checkSubscriptions()(Code)
Returns a structure containing all the information extracted from the blackboard. Returns null if any key information is missing.



createOrgActivityCallback
protected UTILOrgActivityCallback createOrgActivityCallback()(Code)
create the org activity callback



createOrganizationCallback
protected UTILOrganizationCallback createOrganizationCallback()(Code)
create the organization callback



createParameterizedAggregateAssetCallback
protected UTILParameterizedAggregateAssetCallback createParameterizedAggregateAssetCallback(String key, boolean isDynamic)(Code)
create the parameterized aggregate asset callback



createThreadCallback
protected UTILFilterCallback createThreadCallback(UTILGenericListener bufferingThread)(Code)
Provide the callback that is paired with the buffering thread, which is a listener. The buffering thread is the listener to the callback overridden to use UTILExpandableChildTaskCallback to allow tasks that are child of another task (specifically required for Strat-Trans Deter-Req tasks, which are child of GLS) an UTILExpandableChildTaskCallback with the buffering thread as its listener
See Also:   org.cougaar.lib.callback.UTILWorkflowCallback



getMEIAssets
protected Vector getMEIAssets()(Code)
return Vector of ClassVIIMajorEndItem assets from (in myMEIAssetCallback bucket)



getOrgActivity
protected OrgActivity getOrgActivity(String id)(Code)
return orgActivity with matching id (in myDeploymentOrgActivityCallback bucket)



getOrgID
protected String getOrgID(Organization org)(Code)
helper function



getPersonAssets
protected Vector getPersonAssets()(Code)
return Vector of Person assets from (in myPersonAssetCallback bucket)



getSelfOrg
protected Organization getSelfOrg()(Code)
return "self" organization in mySelfOrganizationCallback bucket



getSubtasks
public Vector getSubtasks(Task task)(Code)
Expands the task using information from several different subscriptions If the key subscriptions have not been filled, as determined by checkSubscriptions(), then returns an empty Vector, which must be handled appropriately by higher levels.
Parameters:
  task - the task to expand a vector with the expanded subtask



getSubtasks
public Vector getSubtasks(Task task, SubscriptionResults subscriptionResults)(Code)
Overloaded for efficient checking of subscriptions. Returns empty vector if the task is in the past. (note: still processes task if the deploy time span is null. May need to change this?) empty vector if org activity is in the past, or if both person and MEI assets are missing



handleChangedOrgActivities
public void handleChangedOrgActivities(Enumeration e)(Code)



handleChangedOrganizations
public void handleChangedOrganizations(Enumeration e)(Code)
Does NOT replan on changed org. If we replan on changed org - will always replan on rehydrate, when the org changes when the agent is reconstituted. Why the org changes, I'm not sure. I just know it does on rehydrate.



handleChangedParameterizedAssets
public void handleChangedParameterizedAssets(Enumeration e, String key)(Code)



handleNewOrgActivities
public void handleNewOrgActivities(Enumeration e)(Code)



handleNewOrganizations
public void handleNewOrganizations(Enumeration e)(Code)



handleNewParameterizedAssets
public void handleNewParameterizedAssets(Enumeration e, String key)(Code)



handleTask
public void handleTask(Task t)(Code)
 Implemented for UTILGenericListener interface
 This method Expands the given Task and publishes the PlanElement,
 but only if subtasks have been created.
 The method expandTask should be implemented by child classes.
 

Parameters:
  t - the task to be expanded.



handleTask
public void handleTask(Task t, SubscriptionResults subscriptionResults)(Code)
overloaded for efficient checking of subscriptions



interestingOrgActivity
public boolean interestingOrgActivity(OrgActivity orgAct)(Code)
Interested in listening to deployment org-activities (from interface UTILOrgActivityListener, and linked to UTILOrgActivityCallback)



interestingOrganization
public boolean interestingOrganization(Organization org)(Code)
Interested in listening to self-organization (from interface UTILOrganizationListener, and linked to UTILOrganizationCallback)



interestingParameterizedAsset
public boolean interestingParameterizedAsset(Asset o, String key)(Code)
Interested in listening to Person/ClassVIIMajorEndItem assets See bug 2998 in bugzilla. In order to not strat trans move Level2MEIs we filter out equipment with the cargo cat code of "000" which means phantom equipment. The phantom equipment corresponds to Level2MEIs. The cargo cat code is put onto the Level2MEIs retroactively after they have been made that is the reason for the DynamicUnaryPredicate (i.e., callback created with isDynamic true)



interestingTask
public boolean interestingTask(Task task)(Code)
State that we are interested in all DETERMINEREQUIREMENT tasks of type Asset where the asset type is StrategicTransportation.
Parameters:
  task - the task to test. true if the tasks verb is DetermineRequirements with the preposition "StrategicTransportation", false otherwise



orgActivityInThePast
public boolean orgActivityInThePast(SubscriptionResults subscriptionResults)(Code)
Is the org activity for something in the past? SubscriptionResults refers to org activity, which has a time span for when it's active. Compares with current cougaar time (not wall clock time).



redoTasks
public void redoTasks()(Code)
Replan tasks when one of the inputs has changed, typically the Org Activity.



setupFilters
public void setupFilters()(Code)



Fields inherited from org.cougaar.lib.filter.UTILExpanderPluginAdapter
protected UTILExpand expand(Code)(Java Doc)
protected UTILExpandableTaskCallback myInputTaskCallback(Code)(Java Doc)
protected boolean wantConfidence(Code)(Java Doc)

Methods inherited from org.cougaar.lib.filter.UTILExpanderPluginAdapter
public void changeExpansion(Expansion exp)(Code)(Java Doc)
protected UTILFilterCallback createExpansionCallback()(Code)(Java Doc)
protected UTILFilterCallback createThreadCallback(UTILGenericListener bufferingThread)(Code)(Java Doc)
protected UTILFilterCallback getInputTaskCallback()(Code)(Java Doc)
public Vector getSubtasks(Task t)(Code)(Java Doc)
public void handleConstraintViolation(Expansion exp, List violatedConstraints)(Code)(Java Doc)
public void handleFailedExpansion(Expansion exp, List failedSubTaskResults)(Code)(Java Doc)
public void handleIllFormedTask(Task t)(Code)(Java Doc)
public void handleRemovedTask(Task t)(Code)(Java Doc)
public void handleSuccessfulExpansion(Expansion exp, List successfulSubtasks)(Code)(Java Doc)
public void handleTask(Task t)(Code)(Java Doc)
public boolean interestingExpandedTask(Task t)(Code)(Java Doc)
public boolean interestingTask(Task t)(Code)(Java Doc)
public void localSetup()(Code)(Java Doc)
public void processTasks(List tasks)(Code)(Java Doc)
public void publishChangedExpansion(Expansion exp)(Code)(Java Doc)
public void reportChangedExpansion(Expansion exp)(Code)(Java Doc)
public void setupFilters()(Code)(Java Doc)
public boolean wantToChangeExpansion(Expansion exp)(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.