angular.module('gms.preferences', []).factory(

	    'preferencesService',

	    function($log, $resource, $http, $routeParams, $location) {

	        var preferencesService = function() {

	            var urlPrefix;
	            var url = "/genesys/1/admin/features/";

	            this.getFlag = function(key, responseHandler, errorHandler){
	                $http({
	                    method: 'GET',
	                    url: url + key,
	                    dataType: 'text',
	                })
	                .then(function(response){
	                   responseHandler(response.data);
	                }, function(response) {

					  errorHandler(response.data, 
						response.statusText, response.status);
	                });            	
	            };         
	        };
 
	       return new preferencesService();
	 });