kaos.kpat.policyTemplates
Class GenericDAMLPolicyTemplate

java.lang.Object
  extended by kaos.kpat.policyTemplates.PolicyTemplate
      extended by kaos.kpat.policyTemplates.GenericDAMLPolicyTemplate
All Implemented Interfaces:
java.lang.Comparable

public class GenericDAMLPolicyTemplate
extends PolicyTemplate


Nested Class Summary
static class GenericDAMLPolicyTemplate.MyStateObject
           
 
Field Summary
 
Fields inherited from class kaos.kpat.policyTemplates.PolicyTemplate
_instanceId
 
Constructor Summary
GenericDAMLPolicyTemplate()
           
 
Method Summary
 void addTemplateComponentReference(TemplateComponentReference tcr)
           
 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
 PolicyTemplateResult getResult(boolean resolveBindings)
           
 java.lang.Object getTemplateState()
          This method is used if this template is a subtemplate
 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
 void removeTemplateComponentReference(TemplateComponentReference tcr)
           
 void setTemplateComponentReferences(java.util.List refs)
           
 void setTemplateState(java.lang.Object state)
          This method is used if this template is a subtemplate It should restore it's state from the state object returned above
 
Methods inherited from class kaos.kpat.policyTemplates.PolicyTemplate
compareTo, getInstanceId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericDAMLPolicyTemplate

public GenericDAMLPolicyTemplate()
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

getResult

public PolicyTemplateResult getResult(boolean resolveBindings)
                               throws PolicyBuildingNotCompleted
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

addTemplateComponentReference

public void addTemplateComponentReference(TemplateComponentReference tcr)
Overrides:
addTemplateComponentReference in class PolicyTemplate

removeTemplateComponentReference

public void removeTemplateComponentReference(TemplateComponentReference tcr)
Overrides:
removeTemplateComponentReference in class PolicyTemplate

setTemplateComponentReferences

public void setTemplateComponentReferences(java.util.List refs)
Overrides:
setTemplateComponentReferences in class PolicyTemplate

setTemplateState

public void setTemplateState(java.lang.Object state)
                      throws java.lang.Exception
Description copied from class: PolicyTemplate
This method is used if this template is a subtemplate It should restore it's state from the state object returned above

Overrides:
setTemplateState in class PolicyTemplate
Throws:
java.lang.Exception

getTemplateState

public java.lang.Object getTemplateState()
                                  throws PolicyBuildingNotCompleted
Description copied from class: PolicyTemplate
This method is used if this template is a subtemplate

Overrides:
getTemplateState in class PolicyTemplate
Throws:
PolicyBuildingNotCompleted