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


java.lang.Object
   org.cougaar.planning.plugin.util.PluginHelper

All known Subclasses:   org.cougaar.glm.plugins.TaskUtils,  org.cougaar.logistics.plugin.inventory.TaskUtils,
PluginHelper
public class PluginHelper (Code)
Container for various static helper methods used by Plugins to manipulate Plan objects.




Method Summary
public static  booleancheckChangeReports(Set reports, Class cls)
    
public static  AllocationResultcreateEstimatedAllocationResult(Task t, PlanningFactory ldmf, double confrating, boolean success)
     Returns an AllocationResult based on the preferences of Task and specified confidence rating and success . Results are estimated to be the "best" possible based on the preference scoring function.
public static  doublegetARAspectValue(AllocationResult ar, int type)
    
public static  longgetEndTime(Task task)
    
public static  doublegetEndTime(AllocationResult ar)
    
public static  AspectValuegetPreferenceBest(Task task, int aspect_type)
    
public static  doublegetPreferenceBestValue(Task task, int aspect_type)
    
public static  longgetStartTime(Task task)
    
public static  doublegetStartTime(AllocationResult ar)
    
public static  NewTaskmakeSubtask(Task task, PlanningFactory ldmf)
     Returns a NewTask based on .
public static  voidpublishAddExpansion(BlackboardService sub, Expansion exp)
    
public static  voidremoveSubTask(BlackboardService sub, Task task)
     Helper to remove a task from an Expansion. Removes the task from its workflow if not already done. When doing so, also recalculate the received result on the Expansion, and publishChange the Expansion if the result is now different.
public static  voidupdateAllocationResult(IncrementalSubscription sub)
     For each PlanElement of which has changed, if the estimated and reported results are different, change estimated to reported and publish the PlanElement change.
public static  booleanupdatePlanElement(PlanElement pe)
     updatePlanElement looks for differences between the reported and estimated allocation results.
public static  AggregationwireAggregation(Task parent, NewMPTask mpTask, PlanningFactory ldmf, AllocationResult ar)
     Connect a parent task to an MPTask.
public static  CollectionwireAggregation(Collection parents, NewMPTask mpTask, PlanningFactory ldmf, double confrating, boolean success)
     Connect a Collection of parent tasks to an MPTask.
public static  ExpansionwireExpansion(Task parent, NewTask subTask, PlanningFactory ldmf)
     Returns an expansion based on and , with appropriate relations set.
public static  ExpansionwireExpansion(Task parent, NewTask subTask, PlanningFactory ldmf, AllocationResult ar)
     Same as wireExpansion(Task, NewTask, PlanningFactory) but uses the specified AllocationResult for the expansion.
public static  voidwireExpansion(Expansion exp, NewTask subTask)
    
public static  ExpansionwireExpansion(Task parentTask, Vector subTasks, PlanningFactory ldmf)
     Same as wireExpansion(Task, NewTask, PlanningFactory) except that a Vector of subtasks is used.
public static  ExpansionwireExpansion(Task parentTask, Vector subTasks, PlanningFactory ldmf, AllocationResult ar)
    



Method Detail
checkChangeReports
public static boolean checkChangeReports(Set reports, Class cls)(Code)
Check if a List of ChangeReports has an instance of a given class



createEstimatedAllocationResult
public static AllocationResult createEstimatedAllocationResult(Task t, PlanningFactory ldmf, double confrating, boolean success)(Code)
Returns an AllocationResult based on the preferences of Task and specified confidence rating and success . Results are estimated to be the "best" possible based on the preference scoring function. AllocationResult is null if has no preferences.



getARAspectValue
public static double getARAspectValue(AllocationResult ar, int type)(Code)



getEndTime
public static long getEndTime(Task task)(Code)



getEndTime
public static double getEndTime(AllocationResult ar)(Code)



getPreferenceBest
public static AspectValue getPreferenceBest(Task task, int aspect_type)(Code)



getPreferenceBestValue
public static double getPreferenceBestValue(Task task, int aspect_type)(Code)



getStartTime
public static long getStartTime(Task task)(Code)



getStartTime
public static double getStartTime(AllocationResult ar)(Code)



makeSubtask
public static NewTask makeSubtask(Task task, PlanningFactory ldmf)(Code)
Returns a NewTask based on . The NewTask has identical Verb, DirectObject, Plan, Preferences, Context, and PrepositionalPhrases as .



publishAddExpansion
public static void publishAddExpansion(BlackboardService sub, Expansion exp)(Code)
Publish a new Expansion and its subtasks *



removeSubTask
public static void removeSubTask(BlackboardService sub, Task task)(Code)
Helper to remove a task from an Expansion. Removes the task from its workflow if not already done. When doing so, also recalculate the received result on the Expansion, and publishChange the Expansion if the result is now different. This permits the Expander Plugin to copy the new result up the chain. Note that normally the ReceivedResult would be updated by the LPs when one of the other sub-tasks got a new AllocationResult. But that may not happen soon enough, or may never happen. Note that the Plugin is responsible for publishRemoving the Task or re-parenting, as desired.
Parameters:
  sub - BlackboardService through which to do publishChange
Parameters:
  task - sub-task being removed



updateAllocationResult
public static void updateAllocationResult(IncrementalSubscription sub)(Code)
For each PlanElement of which has changed, if the estimated and reported results are different, change estimated to reported and publish the PlanElement change.



updatePlanElement
public static boolean updatePlanElement(PlanElement pe)(Code)
updatePlanElement looks for differences between the reported and estimated allocation results. If they are not equal (== for now) then the estimated value is set to the reported value. Return true if has been changed, false otherwise.



wireAggregation
public static Aggregation wireAggregation(Task parent, NewMPTask mpTask, PlanningFactory ldmf, AllocationResult ar)(Code)
Connect a parent task to an MPTask. If the MPTask does not have a Composition one is created for it. The MPTask may already have other Aggregations. the Aggregation created. The caller is responsible for publishingthe new Aggregation.



wireAggregation
public static Collection wireAggregation(Collection parents, NewMPTask mpTask, PlanningFactory ldmf, double confrating, boolean success)(Code)
Connect a Collection of parent tasks to an MPTask. If the MPTask does not have a Composition one is created for it. The MPTask may already have other Aggregations. An estimated AllocationResult is created for all Aggregations having a confidence rating and success flag as specified by the arguments.
Parameters:
  parents - the parents to be wired to the MPTask
Parameters:
  mpTask - the MPTask of the aggregation
Parameters:
  ldmf - the factory
Parameters:
  confrating - the confidence rating of all the created Aggregations
Parameters:
  success - the "success" flag for all the created Aggregations a Collection of the Aggregations created. These have _not_ beenpublished. The caller is responsible for publishing them.



wireExpansion
public static Expansion wireExpansion(Task parent, NewTask subTask, PlanningFactory ldmf)(Code)
Returns an expansion based on and , with appropriate relations set. Specifically, puts the subtask in a NewWorkflow, sets the Workflow's parent task to and sets the subtask Workflow. Sets the subtask to be removed if the Workflow is removed. If has no context, sets it to that of Uses a null estimated AllocationResult for the expansion.



wireExpansion
public static Expansion wireExpansion(Task parent, NewTask subTask, PlanningFactory ldmf, AllocationResult ar)(Code)
Same as wireExpansion(Task, NewTask, PlanningFactory) but uses the specified AllocationResult for the expansion.



wireExpansion
public static void wireExpansion(Expansion exp, NewTask subTask)(Code)
Wire a new subtask into an existing expansion



wireExpansion
public static Expansion wireExpansion(Task parentTask, Vector subTasks, PlanningFactory ldmf)(Code)
Same as wireExpansion(Task, NewTask, PlanningFactory) except that a Vector of subtasks is used. All the subtasks in the Vector are added to the Workflow.



wireExpansion
public static Expansion wireExpansion(Task parentTask, Vector subTasks, PlanningFactory ldmf, AllocationResult ar)(Code)
Same as wireExpansion(Task, Vector, PlanningFactory) except uses the specified AllocationResult



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.