001 /**
002 * Copyright 2005-2013 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.rice.kew.server;
017
018 import java.util.ArrayList;
019 import java.util.List;
020
021 import org.junit.Ignore;
022 import org.kuali.rice.kew.engine.RouteContext;
023 import org.kuali.rice.kew.engine.RouteHelper;
024 import org.kuali.rice.kew.engine.node.SimpleSplitNode;
025 import org.kuali.rice.kew.engine.node.SplitResult;
026
027 /**
028 * This is a description of what this class does - delyea don't forget to fill this in.
029 *
030 * @author Kuali Rice Team (rice.collab@kuali.org)
031 *
032 */
033 @Ignore
034 public class TestSplitNode extends SimpleSplitNode {
035
036 private static boolean leftBranch = true;
037 private static boolean rightBranch = true;
038
039 @Override
040 public SplitResult process(RouteContext routeContext,
041 RouteHelper routeHelper) throws Exception {
042 return new SplitResult(getBranchNames());
043 }
044
045 public List<String> getBranchNames() {
046 List<String> branchNames = new ArrayList<String>();
047 if (isLeftBranch()) {
048 branchNames.add("Left");
049 }
050 if (isRightBranch()) {
051 branchNames.add("Right");
052 }
053 return branchNames;
054 }
055 public static void setLeftBranch(boolean leftBranch) {
056 TestSplitNode.leftBranch = leftBranch;
057 }
058 public static boolean isLeftBranch() {
059 return TestSplitNode.leftBranch;
060 }
061 public static void setRightBranch(boolean rightBranch) {
062 TestSplitNode.rightBranch = rightBranch;
063 }
064 public static boolean isRightBranch() {
065 return TestSplitNode.rightBranch;
066 }
067 }