<commit_before>package edu.ucsf.lava.core.controller;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.validation.BindingResult;
import org.springframework.validation.DataBinder;
import org.springframework.webflow.context.servlet.ServletExternalContext;
import org.springframework.webflow.execution.Event;
import org.springframework.webflow.execution.RequestContext;

import edu.ucsf.lava.core.action.ActionUtils;
import edu.ucsf.lava.core.action.model.Action;
import edu.ucsf.lava.core.auth.model.AuthUser;
import edu.ucsf.lava.core.model.LavaEntity;
import edu.ucsf.lava.core.session.CoreSessionUtils;

/*
 * This class serves as the base handler class for group handler classes. A group handler
 * specific to the type of entities in the group should override this class and define the 
 * abstract methods.
 * 
 * The handler is the primary handler for group flow FormAction's, handling all events related
 * to iterating over a group of entities and initiating a specified action on each entity
 * in the group.
 * 
 * The handler is also used as the secondary handler for parent flows of group flows, e.g.
 * list flow FormActions. In this capacity, it creates the group of entities based on items
 * selected in the list.  
 */

public abstract class BaseGroupComponentHandler extends LavaComponentHandler {
	// keeps track of where we are in the group. initialized to 0 in GroupFlowBuilder
	protected static String GROUP_INDEX = "groupIndex";
	// reference data model attribute used by view's to display prototype group
	// functionality
	protected static String GROUP_PROTOTYPE = "groupPrototype";
	// flow scope attribute for storing the name of the command component from which
	// the group can be created, e.g. the list from which the selected items compose 
	// the group
	public static String SOURCE_COMPONENT = "sourceComponent";
	// flow scope attribute for mapping the group data structure into the group flow
	public static String GROUP_MAPPING = "group";
	// used for both returning an Event for errors when handling an entity in the group<commit_msg>Emory fix: GROUP_INDEX: protected ==> public<commit_after>package edu.ucsf.lava.core.controller;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.validation.BindingResult;
import org.springframework.validation.DataBinder;
import org.springframework.webflow.context.servlet.ServletExternalContext;
import org.springframework.webflow.execution.Event;
import org.springframework.webflow.execution.RequestContext;

import edu.ucsf.lava.core.action.ActionUtils;
import edu.ucsf.lava.core.action.model.Action;
import edu.ucsf.lava.core.auth.model.AuthUser;
import edu.ucsf.lava.core.model.LavaEntity;
import edu.ucsf.lava.core.session.CoreSessionUtils;

/*
 * This class serves as the base handler class for group handler classes. A group handler
 * specific to the type of entities in the group should override this class and define the 
 * abstract methods.
 * 
 * The handler is the primary handler for group flow FormAction's, handling all events related
 * to iterating over a group of entities and initiating a specified action on each entity
 * in the group.
 * 
 * The handler is also used as the secondary handler for parent flows of group flows, e.g.
 * list flow FormActions. In this capacity, it creates the group of entities based on items
 * selected in the list.  
 */

public abstract class BaseGroupComponentHandler extends LavaComponentHandler {
	// keeps track of where we are in the group. initialized to 0 in GroupFlowBuilder
	public static String GROUP_INDEX = "groupIndex";
	// reference data model attribute used by view's to display prototype group
	// functionality
	protected static String GROUP_PROTOTYPE = "groupPrototype";
	// flow scope attribute for storing the name of the command component from which
	// the group can be created, e.g. the list from which the selected items compose 
	// the group
	public static String SOURCE_COMPONENT = "sourceComponent";
	// flow scope attribute for mapping the group data structure into the group flow
	public static String GROUP_MAPPING = "group";
	// used for both returning an Event for errors when handling an entity in the group
{'fraction_non_alphanumeric': 0.06686046511627906, 'fraction_numerical': 0.0004472271914132379, 'mean_word_length': 4.619346733668341, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6649563', 'n_tokens_mistral': 1191, 'n_tokens_neox': 1163, 'n_words': 489}