org.kuali.rice.krms.util
Class PropositionTreeUtil

java.lang.Object
  extended by org.kuali.rice.krms.util.PropositionTreeUtil

public class PropositionTreeUtil
extends Object

Created with IntelliJ IDEA. User: SW Date: 2012/12/03 Time: 4:39 PM To change this template use File | Settings | File Templates.


Constructor Summary
PropositionTreeUtil()
           
 
Method Summary
static void cancelNewProp(PropositionEditor proposition)
           
static String configureLogicExpression(PropositionEditor proposition)
           
static PropositionEditor createCompoundPropositionBoStub(PropositionEditor existing, boolean addNewChild, Class<? extends PropositionEditor> propClass)
           
static PropositionEditor createCompoundPropositionBoStub(PropositionEditor existing, Class<? extends PropositionEditor> propClass)
           
static List<PropositionParameterEditor> createParameterList()
           
static PropositionEditor createSimplePropositionBoStub(PropositionEditor sibling, Class<? extends PropositionEditor> propClass)
          This method creates a partially populated Simple PropositionBo with three parameters: a term type paramter (value not assigned) a operation parameter a constant parameter (value set to empty string) The returned PropositionBo has an generatedId.
static Node<RuleEditorTreeNode,String> findEditedProposition(Node<RuleEditorTreeNode,String> node)
          Find and return the node containing the proposition that is in currently in edit mode
static Node<RuleEditorTreeNode,String> findParentPropositionNode(Node<RuleEditorTreeNode,String> currentNode, String selectedPropKey)
           
static PropositionEditor findProposition(Node<RuleEditorTreeNode,String> currentNode, String selectedPropKey)
           
static Node<RuleEditorTreeNode,String> findPropositionTreeNode(Node<RuleEditorTreeNode,String> currentNode, String selectedPropId)
           
static PropositionEditor getProposition(RuleEditor ruleEditor)
           
static void resetEditModeOnPropositionTree(Node<RuleEditorTreeNode,String> currentNode)
          disable edit mode for all Nodes beneath and including the passed in Node
static void resetEditModeOnPropositionTree(RuleEditor ruleEditor)
           
static void resetNewProp(PropositionEditor proposition)
           
static void setTypeForCompoundOpCode(PropositionEditor proposition, String compoundOpCode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropositionTreeUtil

public PropositionTreeUtil()
Method Detail

setTypeForCompoundOpCode

public static void setTypeForCompoundOpCode(PropositionEditor proposition,
                                            String compoundOpCode)

findParentPropositionNode

public static Node<RuleEditorTreeNode,String> findParentPropositionNode(Node<RuleEditorTreeNode,String> currentNode,
                                                                        String selectedPropKey)

getProposition

public static PropositionEditor getProposition(RuleEditor ruleEditor)
Returns:
the PropositionBo from the form

findProposition

public static PropositionEditor findProposition(Node<RuleEditorTreeNode,String> currentNode,
                                                String selectedPropKey)

findEditedProposition

public static Node<RuleEditorTreeNode,String> findEditedProposition(Node<RuleEditorTreeNode,String> node)
Find and return the node containing the proposition that is in currently in edit mode

Parameters:
node - the node to start searching from (typically the root)
Returns:
the node that is currently being edited, if any. Otherwise, null.

resetEditModeOnPropositionTree

public static void resetEditModeOnPropositionTree(RuleEditor ruleEditor)

resetEditModeOnPropositionTree

public static void resetEditModeOnPropositionTree(Node<RuleEditorTreeNode,String> currentNode)
disable edit mode for all Nodes beneath and including the passed in Node

Parameters:
currentNode -

findPropositionTreeNode

public static Node<RuleEditorTreeNode,String> findPropositionTreeNode(Node<RuleEditorTreeNode,String> currentNode,
                                                                      String selectedPropId)

configureLogicExpression

public static String configureLogicExpression(PropositionEditor proposition)

createSimplePropositionBoStub

public static PropositionEditor createSimplePropositionBoStub(PropositionEditor sibling,
                                                              Class<? extends PropositionEditor> propClass)
                                                       throws IllegalAccessException,
                                                              InstantiationException
This method creates a partially populated Simple PropositionBo with three parameters: a term type paramter (value not assigned) a operation parameter a constant parameter (value set to empty string) The returned PropositionBo has an generatedId. The type code and ruleId properties are assigned the same value as the sibling param passed in. Each PropositionParameter has the id generated, and type, sequenceNumber, propId default values set. The value is set to "".

Parameters:
sibling - -
Returns:
a PropositionBo partially populated.
Throws:
IllegalAccessException
InstantiationException

createParameterList

public static List<PropositionParameterEditor> createParameterList()

createCompoundPropositionBoStub

public static PropositionEditor createCompoundPropositionBoStub(PropositionEditor existing,
                                                                boolean addNewChild,
                                                                Class<? extends PropositionEditor> propClass)
                                                         throws InstantiationException,
                                                                IllegalAccessException
Throws:
InstantiationException
IllegalAccessException

createCompoundPropositionBoStub

public static PropositionEditor createCompoundPropositionBoStub(PropositionEditor existing,
                                                                Class<? extends PropositionEditor> propClass)
                                                         throws IllegalAccessException,
                                                                InstantiationException
Throws:
IllegalAccessException
InstantiationException

cancelNewProp

public static void cancelNewProp(PropositionEditor proposition)

resetNewProp

public static void resetNewProp(PropositionEditor proposition)


Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.