/**
 * Copyright Notice
 * 
 * This is a work of the U.S. Government and is not subject to copyright
 * protection in the United States. Foreign copyrights may apply.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package gov.va.isaac;

import gov.va.isaac.config.profiles.UserProfile;
import gov.va.isaac.config.profiles.UserProfileManager;
import org.ihtsdo.otf.tcc.datastore.BdbTerminologyStore;

/**
 * 
 * Note - this just contains convenience methods at this point... callers can go
 * directly to HK2 if they prefer.
 * 
 * This 'extended' class provides access to methods that require APIs that aren't available (due to dependencies)
 * in the parent 'AppContext' which is purposefully packaged in a project with the bare minimum of external dependencies.
 * 
 * @author <a href="mailto:daniel.armbrust.list@gmail.com">Dan Armbrust</a>
 */
public class ExtendedAppContext extends AppContext
{
	public static BdbTerminologyStore getDataStore()
	{
		return getService(BdbTerminologyStore.class);
	}
	
	public static UserProfile getCurrentlyLoggedInUser()
	{
		return getService(UserProfileManager.class).getCurrentlyLoggedInUser();
	}
}

@@ -1408,16 +1408,380 @@
 ntext%0A%7B%0A
+%09//A nasty little hack, to that I can do some trickery during junit testing / mock testing%0A%09//to substitute a different UserProfileManager - without having to go through the effort to create all of the interfaces that would require%0A%09//I tweak this with reflection....%0A%09private static Class%3CUserProfileManager%3E userProfileManagerClass = UserProfileManager.class;%0A%09%0A
 %09public 
@@ -1878,16 +1878,88 @@
 );%0A%09%7D%0A%09%0A
+%09/**%0A%09 * @see UserProfileManager#getCurrentlyLoggedInUserProfile()%0A%09 */%0A
 %09public 
@@ -2001,16 +2001,23 @@
 edInUser
+Profile
 ()%0A%09%7B%0A%09%09
@@ -2034,36 +2034,237 @@
 Service(
-UserProfileManager.c
+userProfileManagerClass).getCurrentlyLoggedInUserProfile();%0A%09%7D%0A%09%0A%09/**%0A%09 * @see UserProfileManager#getCurrentlyLoggedInUser()%0A%09 */%0A%09public static String getCurrentlyLoggedInUser()%0A%09%7B%0A%09%09return getService(userProfileManagerC
 lass).ge

add the ability to hack the ExtendedAppContext utility methods for test purposes.