Examples of ProfileService


Examples of bigbank.webclient.services.profile.ProfileService

            throw new JspException("Invalid profile location specified");
        }

        ModuleContext moduleContext = CurrentModuleContext.getContext();

        ProfileService profile = (ProfileService) moduleContext.locateService(mProfile);

        if (profile == null) {
            throw new JspException("Profile [" + mProfile + "] not found in current module context");
        }

        if (profile.isLoggedIn()) {
            return EVAL_BODY_INCLUDE;
        } else {
            try {
                doPage = SKIP_PAGE;
                pageContext.forward(mUrl);
View Full Code Here

Examples of bigbank.webclient.services.profile.ProfileService

    private Iterator mIterator;

    public int doStartTag() throws JspException {
        ModuleContext moduleContext = CurrentModuleContext.getContext();
        ProfileService profile = (ProfileService) moduleContext.locateService(mProfileService);
        if (profile == null) {
            throw new JspException("Profile [" + mProfileService + "] not found in current module context");
        }

        AccountService service = (AccountService) moduleContext.locateService(mAccountService);
        if (service == null) {
            throw new JspException("Service [" + mAccountService + "] not found in current module context");
        }
        List summaries;
        try {
            AccountReport accountReport = service.getAccountReport(profile.getId());
            pageContext.setAttribute("StockSummaries", accountReport.getStockSummaries());
            summaries = accountReport.getAccountSummaries();
        } catch (Exception e) {
            throw new JspException(e);
        }
View Full Code Here

Examples of bigbank.webclient.services.profile.ProfileService

            ModuleContext moduleContext = CurrentModuleContext.getContext();
            AccountService accountServices = (AccountService) moduleContext.locateService("AccountServiceComponent");
            if (accountServices == null) {
                throw new ServletException("AccountServiceComponent");
            }
            ProfileService profileServices = null;
            if (!"createAccount".equals(action)) {
                profileServices = (ProfileService) moduleContext.locateService("ProfileServiceComponent");
                if (profileServices == null) {
                    throw new ServletException("ProfileServiceComponent not found.");
                }
                if (!profileServices.isLoggedIn()) {
                    throw new ServletException("User id '" + profileServices.getId() + "' not logged on.");
                }
            }

            if ("createAccount".equals(action)) {
                createAccount(pReq, pResp, accountServices);
View Full Code Here

Examples of bigbank.webclient.services.profile.ProfileService

            throw new JspException("Invalid profile location specified");
        }

        CompositeContext moduleContext = CurrentCompositeContext.getContext();

        ProfileService profile = moduleContext.locateService(ProfileService.class, mProfile);

        if (profile == null) {
            throw new JspException("Profile [" + mProfile + "] not found in current module context");
        }

        if (profile.isLoggedIn()) {
            return EVAL_BODY_INCLUDE;
        } else {
            try {
                doPage = SKIP_PAGE;
                pageContext.forward(mUrl);
View Full Code Here

Examples of bigbank.webclient.services.profile.ProfileService

    @Override
    public int doStartTag() throws JspException {
        CompositeContext moduleContext = CurrentCompositeContext.getContext();

        ProfileService profile = moduleContext.locateService(ProfileService.class, mProfileService);

        if (profile == null) {
            throw new JspException("Profile [" + mProfileService + "] not found in current module context");
        }

        AccountService service = (AccountService) moduleContext.locateService(AccountService.class, mAccountService);
        if (service == null) {
            throw new JspException("Service [" + mAccountService + "] not found in current module context");
        }
        List entries;
        try {
            AccountLog accountLog = service.getAccountLog(profile.getId());
            pageContext.setAttribute("StockLogEntries", accountLog.getStockLogEntries());
            entries = accountLog.getAccountLogEntries();
        } catch (Exception e) {
            throw new JspException(e);
        }
View Full Code Here

Examples of bigbank.webclient.services.profile.ProfileService

    @Override
    public int doStartTag() throws JspException {
        CompositeContext moduleContext = CurrentCompositeContext.getContext();

        ProfileService profile = moduleContext.locateService(ProfileService.class, mProfileService);

        if (profile == null) {
            throw new JspException("Profile [" + mProfileService + "] not found in current module context");
        }

        AccountService service = (AccountService) moduleContext.locateService(AccountService.class, mAccountService);

        if (service == null) {
            throw new JspException("Service [" + mAccountService + "] not found in current module context");
        }
        List summaries;
        try {
            AccountReport accountReport = service.getAccountReport(profile.getId());
            pageContext.setAttribute("StockSummaries", accountReport.getStockSummaries());
            summaries = accountReport.getAccountSummaries();
        } catch (Exception e) {
            throw new JspException(e);
        }
View Full Code Here

Examples of bigbank.webclient.services.profile.ProfileService

            CompositeContext moduleContext = CurrentCompositeContext.getContext();
            AccountService accountServices = (AccountService) moduleContext.locateService(AccountService.class, "AccountServiceComponent");
            if (accountServices == null) {
                throw new ServletException("AccountServiceComponent");
            }
            ProfileService profileServices = null;
            if (!"createAccount".equals(action)) {
                profileServices = moduleContext.locateService(ProfileService.class, "ProfileServiceComponent");
                if (profileServices == null) {
                    throw new ServletException("ProfileServiceComponent not found.");
                }
                if (!profileServices.isLoggedIn()) {
                    throw new ServletException("User id '" + profileServices.getId() + "' not logged on.");
                }
            }

            if ("createAccount".equals(action)) {
                createAccount(pReq, pResp, accountServices);
View Full Code Here

Examples of com.ibm.sbt.services.client.connections.profiles.ProfileService

    }
    return null;
  }
 
  public static String getProfileXMLString(){
    ProfileService svc = new ProfileService("connections");
    Profile prof=null;
    String xmlText = null;
    try {
      prof = svc.getMyProfile();
      xmlText =DOMUtil.getXMLString((Node)prof.getDataHandler().getData());
    } catch (XMLException e) {
      e.printStackTrace();
    }
    catch (ProfileServiceException e) {
View Full Code Here

Examples of com.ibm.sbt.services.client.connections.profiles.ProfileService

  /**
   * This test uses urls with ?param1=value&param2=value parameters
   */
  @Test
  public void testGenerateUrlWithUrlParameters(){
    ProfileService service = new ProfileService();
    String urlAssertEmail = "profiles/atom/connection.do?sourceEmail=bjordan%40renovations.com&targetEmail=fadams%40renovations.com&connectionType=colleague";
    String sourceId = "bjordan@renovations.com";
    String targetId = "fadams@renovations.com";
    String url = ProfileUrls.CHECK_COLLEAGUE.format(service, ProfileParams.sourceId.get(sourceId), ProfileParams.targetId.get(targetId));
    assertEquals(urlAssertEmail, url);
View Full Code Here

Examples of com.ibm.sbt.services.client.connections.profiles.ProfileService

    assertEquals(urlAssertEmail, url);
  }

  @Test
  public void testGenerateUrlWithMissingUrlParameters(){
    ProfileService service = new ProfileService();
    String sourceId = "bjordan@renovations.com";

    thrown.expect(IllegalArgumentException.class);
    thrown.expectMessage("Missing parameter");
    ProfileUrls.CHECK_COLLEAGUE.format(service, ProfileParams.sourceId.get(sourceId));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.