Package org.osforce.connect.entity.system

Examples of org.osforce.connect.entity.system.Site


    }

  @RequestMapping(value="/authorizationUrl", method=RequestMethod.GET)
  public @ResponseBody Map<String, Object> getAuthUrl(
      @RequestParam String target, WebRequest request) {
    Site site = (Site) request.getAttribute(AttributeKeys.SITE_KEY, WebRequest.SCOPE_REQUEST);
    String callback = site.getHomeURL()+ "/oauth/callback/" + target;
    String beanId = target + ApiService.class.getSimpleName();
    ApiService apiService = appContext.getBean(beanId, ApiService.class);
    OAuthService oAuthService = apiService.getOAuthService(callback);
    Token requestToken = oAuthService.getRequestToken();
    oAuthServices.put(requestToken, oAuthService);
View Full Code Here


  }
 
  protected void exposeSite(HttpServletRequest request) {
    if(request.getAttribute(AttributeKeys.SITE_KEY)==null) {
      String domain = request.getServerName();
      Site site = siteService.getSite(domain);
      request.setAttribute(AttributeKeys.SITE_KEY, site);
      request.setAttribute(AttributeKeys.SITE_KEY_READABLE, site);
      request.setAttribute(AttributeKeys.SITE_DOMAIN_KEY_READABLE, domain);
    }
  }
View Full Code Here

 
  protected void exposeProjectCategory(HttpServletRequest request, Object handler) {
    if(handler instanceof RouteController) {
      String categoryIdStr = request.getParameter("categoryId");
      Project project = (Project) request.getAttribute(AttributeKeys.PROJECT_KEY);
      Site site = (Site) request.getAttribute(AttributeKeys.SITE_KEY);
      String categoryCode = (String) request.getAttribute("categoryCode");
      ProjectCategory currentCategory = null;
      if(StringUtils.isNotBlank(categoryIdStr)) {
        currentCategory = categoryService.getProjectCategory(NumberUtils.createLong(categoryIdStr));
      } else if(StringUtils.isNotBlank(categoryCode)) {
View Full Code Here

    updateSiteLink(siteLink);
  }

  public void updateSiteLink(SiteLink siteLink) {
    if(siteLink.getSiteId()!=null) {
      Site site = siteDao.get(siteLink.getSiteId());
      siteLink.setSite(site);
    }
    if(siteLink.getId()==null) {
      siteLinkDao.save(siteLink);
    } else {
View Full Code Here

    updateProjectCategory(projectCategory);
  }

  public void updateProjectCategory(ProjectCategory category) {
    if(category.getSiteId()!=null) {
      Site site = siteDao.get(category.getSiteId());
      category.setSite(site);
    }
    if(category.getParentId()!=null) {
      ProjectCategory parent = projectCategoryDao.get(category.getParentId());
      category.setParent(parent);
View Full Code Here

TOP

Related Classes of org.osforce.connect.entity.system.Site

Copyright © 2018 www.massapicom. 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.