Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SelfReported"/> class.
        /// </summary>
        public SelfReported()
        {
            Log.Info("ASA.Web.Services.SelfReported.ServiceImplementation.SelfReported() object being created ...");

            //_selfReportedAdapter = new SelfReportedAdapter();
            _memberAdapter = new AsaMemberAdapter();
        }
Exemplo n.º 2
0
 public LoanAdapter()
 {
     _log.Debug("ASA.Web.Services.LoanService.LoanAdapter() object being created ...");
     _proxyLoan     = new InvokeLoanManagementService();
     _proxyPerson   = new InvokePersonManagementService();
     _memberAdapter = new AsaMemberAdapter();
 }
Exemplo n.º 3
0
        public Content(IAsaMemberAdapter asaMemberAdapter)
        {
            Log.Info("ASA.Web.Services.ContentService() object being created ...");

            memberAdapter   = asaMemberAdapter;
            _contentAdapter = new ContentAdapter();
        }
Exemplo n.º 4
0
 public Search()
 {
     _log.Info("ASA.Web.Services.SearchService.Search() object being created ...");
     if (ASA.Web.Services.Common.Config.Testing)
     {
         _memberAdapter = null;
         _searchAdapter = new MockSearchAdapter();
     }
     else
     {
         _memberAdapter = new AsaMemberAdapter();
         _searchAdapter = new SearchAdapter();
     }
 }
Exemplo n.º 5
0
        public SelfReportedLoanListModel GetLoans(string ssn)
        {
            _log.Debug(string.Format("START ASA.Web.Services.LoanService.GetLoan(): ssn={0}", !string.IsNullOrEmpty(ssn)?ssn:"null"));
            HttpHeadersHelper.SetNoCacheResponseHeaders(WebOperationContext.Current);

            SelfReportedLoanListModel loans         = null;
            IAsaMemberAdapter         memberAdapter = null;

            memberAdapter = new AsaMemberAdapter();

            if (LoanValidation.ValidateInputSsn(ssn))
            {
                _log.Debug("calling GetActiveDirectoryKeyFromContext now.");
                int?           id     = memberAdapter.GetMemberIdFromContext();
                ASAMemberModel member = memberAdapter.GetMember(id.Value);

                if (_loanAdapter == null)
                {
                    _log.Error(_loanAdapterExceptionMessage);
                    loans = new SelfReportedLoanListModel();
                    ErrorModel error = new ErrorModel(_loanAdapterExceptionMessage, "Web Loan Service");
                    _log.Error("ASA.Web.Services.LoanService.GetLoan(): " + _loanAdapterExceptionMessage);
                    loans.ErrorList.Add(error);
                }
                else if (member != null)// we should never try to retrieve loans for someone who isn't found as the logged-in member from context.
                {
                    loans = _loanAdapter.GetLoans(ssn, member);
                }

                if (loans == null)
                {
                    _log.Debug("No loans were retrieved for this SSN: " + ssn);
                    loans = new SelfReportedLoanListModel();
                    loans.ErrorList.Add(new ErrorModel("No Loans were retrieved for this SSN."));
                }
            }
            else
            {
                loans = new SelfReportedLoanListModel();
                ErrorModel error = new ErrorModel("Invalid search criteria", "Web Loan Service");
                _log.Warn("ASA.Web.Services.LoanService.GetLoan(): Invalid search criteria");
                loans.ErrorList.Add(error);
            }

            _log.Debug(string.Format("END ASA.Web.Services.LoanService.GetLoan(): ssn={0}", !string.IsNullOrEmpty(ssn) ? ssn : "null"));
            return(loans);
        }
Exemplo n.º 6
0
 public EndecaUtility(ISearchAdapter searchAdapter, IAsaMemberAdapter memberAdapter)
 {
     _memberAdapter = memberAdapter;
     _searchadapter = searchAdapter;
 }
Exemplo n.º 7
0
 public EndecaUtility()
 {
     _memberAdapter = new AsaMemberAdapter();
     _searchadapter = new SearchAdapter();
 }
Exemplo n.º 8
0
 public ASAMember()
 {
     Log.Info("ASA.Web.Services.ASAMemberService.ASAMember() object being created ...");
     _asaMemberAdapter = new AsaMemberAdapter();
 }