kaos.cougaar.clik.kpat.policyTemplates
Class MessageContentPolicyTemplate

java.lang.Object
  extended by kaos.kpat.policyTemplates.PolicyTemplate
      extended by kaos.cougaar.clik.kpat.policyTemplates.MessageContentPolicyTemplate
All Implemented Interfaces:
java.lang.Comparable

public class MessageContentPolicyTemplate
extends PolicyTemplate


Field Summary
 
Fields inherited from class kaos.kpat.policyTemplates.PolicyTemplate
_instanceId
 
Constructor Summary
MessageContentPolicyTemplate()
           
 
Method Summary
 void createPolicy(SubjectMsg optionalSubject)
          Update the display component to create a new policy.
 void editPolicy(PolicyTemplateResult existingPolicy)
          Update the display component to edit an existing policy
 java.lang.String getDescription()
          Get the description of the PolicyTemplateEditor.
 java.awt.Component getDisplayComponent()
          Return the component to be displayed to the user
 java.lang.String getName()
          Get the name of the PolicyTemplateEditor.
 PolicyTemplateResult getResult()
          Return the resultant policy(s) and optional policy set
 void initialize(TunnelClient tunnelClient, java.util.Hashtable subjectTreeModels, PolicyTemplateFactory factory)
          Initialize the template In most instances, the GUI components should be built at this time
 
Methods inherited from class kaos.kpat.policyTemplates.PolicyTemplate
addTemplateComponentReference, compareTo, getInstanceId, getTemplateState, removeTemplateComponentReference, setTemplateComponentReferences, setTemplateState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageContentPolicyTemplate

public MessageContentPolicyTemplate()
Method Detail

initialize

public void initialize(TunnelClient tunnelClient,
                       java.util.Hashtable subjectTreeModels,
                       PolicyTemplateFactory factory)
Description copied from class: PolicyTemplate
Initialize the template In most instances, the GUI components should be built at this time

Specified by:
initialize in class PolicyTemplate

getName

public java.lang.String getName()
Description copied from class: PolicyTemplate
Get the name of the PolicyTemplateEditor.

Specified by:
getName in class PolicyTemplate
Returns:
String Represents the policy template editor name.

getDescription

public java.lang.String getDescription()
Description copied from class: PolicyTemplate
Get the description of the PolicyTemplateEditor.

Specified by:
getDescription in class PolicyTemplate
Returns:
String Represents the policy template editor name.

getResult

public PolicyTemplateResult getResult()
                               throws PolicyBuildingNotCompleted
Description copied from class: PolicyTemplate
Return the resultant policy(s) and optional policy set

Specified by:
getResult in class PolicyTemplate
Returns:
PolicyTemplateEditorResult the resultant policy(s)
Throws:
PolicyBuildingNotCompleted

createPolicy

public void createPolicy(SubjectMsg optionalSubject)
                  throws java.lang.Exception
Description copied from class: PolicyTemplate
Update the display component to create a new policy. Also called when a template is edited or created. This second usage exists to ensure that the selections of template components in the template is reset to their default values. If your template requires a subject, you should override the requiresSubject() method to return true;

Specified by:
createPolicy in class PolicyTemplate
Parameters:
optionalSubject - The subject if the editor was invoked for it
Throws:
java.lang.Exception

editPolicy

public void editPolicy(PolicyTemplateResult existingPolicy)
                throws java.lang.Exception
Description copied from class: PolicyTemplate
Update the display component to edit an existing policy

Specified by:
editPolicy in class PolicyTemplate
Throws:
java.lang.Exception

getDisplayComponent

public java.awt.Component getDisplayComponent()
Description copied from class: PolicyTemplate
Return the component to be displayed to the user

Specified by:
getDisplayComponent in class PolicyTemplate