org.kuali.student.lum.common.server
Class StatementUtil

java.lang.Object
  extended by org.kuali.student.lum.common.server.StatementUtil

public class StatementUtil
extends Object

This class contains common utility methods used with statements.

Author:
Kuali Rice Team (kuali-rice@googlegroups.com)

Field Summary
static String NEW_REQ_COMP_ID
          WARNING: this constant is also declared in ProgramRequirementsSummaryView.
static String NEW_STMT_TREE_ID
          WARNING: this constant is also declared in ProgramRequirementsSummaryView.
 
Constructor Summary
StatementUtil()
           
 
Method Summary
static void stripStatementIds(StatementTreeViewInfo tree)
          This method strips the statement ids from the statement tree prior to saving the tree, which allows the web service to generate new ids from the database.
static void updateStatementTreeViewInfoState(String state, StatementTreeViewInfo statementTreeViewInfo)
          This method will recursively set the state of all statements in the tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEW_STMT_TREE_ID

public static final String NEW_STMT_TREE_ID
WARNING: this constant is also declared in ProgramRequirementsSummaryView. We cannot use the one from ProgramRequirementsSummaryView because we cannot compile it into this package. TODO: create a constants class that can be shared across view, server, etc.

See Also:
Constant Field Values

NEW_REQ_COMP_ID

public static final String NEW_REQ_COMP_ID
WARNING: this constant is also declared in ProgramRequirementsSummaryView. We cannot use the one from ProgramRequirementsSummaryView because we cannot compile it into this package. TODO: create a constants class that can be shared across view, server, etc.

See Also:
Constant Field Values
Constructor Detail

StatementUtil

public StatementUtil()
Method Detail

updateStatementTreeViewInfoState

public static void updateStatementTreeViewInfoState(String state,
                                                    StatementTreeViewInfo statementTreeViewInfo)
This method will recursively set the state of all statements in the tree.

WARNING: you must call the statement service in order to update statements.

Parameters:
state - is the state we should set all statements in the tree to
statementTreeViewInfo - the tree of statements
Throws:
Exception

stripStatementIds

public static void stripStatementIds(StatementTreeViewInfo tree)
This method strips the statement ids from the statement tree prior to saving the tree, which allows the web service to generate new ids from the database.

The UI needs to create temporary ids in order to work with the statements in memory prior to storing them in the database. On save, we strip the temporary ids in this method, then write the statement tree to the database, allowing the database to generate proper ids.

Parameters:
tree -


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