<commit_before>/**
 * 
 */
package org.concord.framework.otrunk.view;

import org.concord.framework.otrunk.OTObject;

/**
 * Use this interface to access services provided to a view.
 * 
 * @author scott
 *
 */
public interface OTViewContext 
{
	/**
	 * Use this method to get a service for example:
	 * OTFrameManager frameManager = 
	 *    (OTFrameManager)serviceProvider.getViewService(OTFrameManager.class);
	 * 
	 * If this viewContext doesn't have the service then the getViewService method
	 * on the parent view context will be called.
	 * 
	 * @param serviceClass this can either be a class or interface.   
	 * @return the instance of this serviceClass available to a view.  Or null
	 *   if there is no service implementing this interface.
	 */
	public Object getViewService(Class serviceClass);
	
	/**
	 * Use this method to add services to this viewContext.
	 * Views can access these services by using the {@link OTViewContextAware} 
	 * interface to get a viewContext and then call getViewService on the 
	 * context.<commit_msg>Next installment of java 1.5 language update.<commit_after>/**
 * 
 */
package org.concord.framework.otrunk.view;

import org.concord.framework.otrunk.OTObject;

/**
 * Use this interface to access services provided to a view.
 * 
 * @author scott
 *
 */
public interface OTViewContext 
{
	/**
	 * Use this method to get a service for example:
	 * OTFrameManager frameManager = 
	 *    (OTFrameManager)serviceProvider.getViewService(OTFrameManager.class);
	 * 
	 * If this viewContext doesn't have the service then the getViewService method
	 * on the parent view context will be called.
	 * 
	 * @param serviceClass this can either be a class or interface.   
	 * @return the instance of this serviceClass available to a view.  Or null
	 *   if there is no service implementing this interface.
	 */
	public <T> T getViewService(Class<T> serviceClass);
	
	/**
	 * Use this method to add services to this viewContext.
	 * Views can access these services by using the {@link OTViewContextAware} 
	 * interface to get a viewContext and then call getViewService on the 
	 * context.
{'fraction_non_alphanumeric': 0.07540056550424128, 'fraction_numerical': 0.000942507068803016, 'mean_word_length': 3.5754310344827585, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4820544', 'n_tokens_mistral': 618, 'n_tokens_neox': 557, 'n_words': 238}