Package com.agiletec.aps.system.services.user

Examples of com.agiletec.aps.system.services.user.UserDetails


    return null;
  }
 
  protected void extractTokenParameters(String entandoApiToken, ApiMethod apiMethod,
      HttpServletRequest request, Properties properties) throws ApiException, IOException, ServletException {
    UserDetails user = null;
        IApiTokenizerManager tokenizerManager =
                (IApiTokenizerManager) ApsWebApplicationUtils.getBean(JpTokenApiSystemConstants.TOKENIZER_MANAGER, request);
        IAuthenticationProviderManager authenticationProvider =
                (IAuthenticationProviderManager) ApsWebApplicationUtils.getBean(SystemConstants.AUTHENTICATION_PROVIDER_MANAGER, request);
        IAuthorizationManager authorizationManager =
View Full Code Here


 
  //---------------------------------------------- ContentList
 
  public void testGetContents_1() throws Throwable {
    try {
      UserDetails guestUser = super.getUser(SystemConstants.GUEST_USER_NAME);
      MockContentListBean bean = new MockContentListBean();
      bean.setContentType("ART");
      assertTrue(bean.isCacheable());
      String cacheKey = BaseContentListHelper.buildCacheKey(bean, guestUser);
      assertNull(this._cacheInfoManager.getFromCache(cacheKey));
View Full Code Here

  }
 
  public void testGetContents_2() throws Throwable {
    String contentId = null;
    try {
      UserDetails guestUser = super.getUser(SystemConstants.GUEST_USER_NAME);
      MockContentListBean bean = new MockContentListBean();
      bean.setContentType("ART");
      assertTrue(bean.isCacheable());
      String cacheKey = BaseContentListHelper.buildCacheKey(bean, guestUser);
      List<String> extractedContents = this._contentListHelper.getContentsId(bean, guestUser);
View Full Code Here

        return customShowlets;
    }

    private Map<String, WidgetType> getCustomizableShowlets(IPageUserConfigManager pageUserConfigManager) throws ApsSystemException {
        Map<String, WidgetType> map = new HashMap<String, WidgetType>();
        UserDetails currentUser = (UserDetails) this.pageContext.getSession().getAttribute(SystemConstants.SESSIONPARAM_CURRENT_USER);
        try {
            List<WidgetType> list = pageUserConfigManager.getCustomizableWidgets(currentUser);
            for (int i = 0; i < list.size(); i++) {
                WidgetType type = list.get(i);
                map.put(type.getCode(), type);
            }
        } catch (Throwable t) {
            String message = "Error extracting customizable Showlets by user '" + currentUser.getUsername() + "'";
            ApsSystemUtils.logThrowable(t, this, "getCustomizableShowlets", message);
            throw new ApsSystemException(message, t);
        }
        return map;
    }
View Full Code Here

    }
  }
 
  public void testGetContentsGroup() throws Throwable {
    try {
      UserDetails guestUser = super.getUser(SystemConstants.GUEST_USER_NAME);
      MockContentListBean bean = new MockContentListBean();
      bean.setContentType("ART");
      assertTrue(bean.isCacheable());
      String cacheKey = BaseContentListHelper.buildCacheKey(bean, guestUser);
      List<String> extractedContents = this._contentListHelper.getContentsId(bean, guestUser);
View Full Code Here

  @Override
  public String send() {
    String sentFolderName = this.getWebMailManager().getSentFolderName();
    try {
      MimeMessage message = this.getMessage();
      UserDetails currentUser = this.getCurrentUser();
      this.getWebMailManager().sendMail(message, currentUser.getUsername(), currentUser.getPassword());
      Folder dfolder = this.getStore().getFolder(sentFolderName);
      if (null == dfolder) {
        this.addActionMessage(this.getText("SENT_FOLDER_NULL"));
        return SUCCESS;
      }
View Full Code Here

  @Override
  public String resetFrames() {
    try {
      IPage currentPage = this.getCurrentPage();
      UserDetails currentUser = super.getCurrentUser();
      if (currentUser.getUsername().equals(SystemConstants.GUEST_USER_NAME)) {
        this.getPageUserConfigManager().removeGuestPageConfig(currentPage, this.getRequest(), this.getResponse());
      } else {
        this.getPageUserConfigManager().removeUserPageConfig(currentUser.getUsername(), currentPage);
      }
      this.getRequest().getSession().removeAttribute(JpmyportalplusSystemConstants.SESSIONPARAM_CURRENT_CUSTOM_USER_PAGE_CONFIG);
      this.getRequest().getSession().removeAttribute(JpmyportalplusSystemConstants.SESSIONPARAM_CURRENT_CUSTOM_PAGE_CONFIG);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "resetFrames", "Error on resetFrames");
View Full Code Here

      //AGGIORNARE SE L'UTENTE CORRENTE è DIVERSO DA GUEST
      //public static final String SESSIONPARAM_CURRENT_CUSTOM_USER_PAGE_CONFIG = "jpmyportalplus_currentCustomUserPageConfig";
      //AGGIORARE SEMPRE
      //public static final String SESSIONPARAM_CURRENT_CUSTOM_PAGE_CONFIG = "jpmyportalplus_currentCustomPageConfig";
      IPage currentPage = this.getCurrentPage();
      UserDetails currentUser = super.getCurrentUser();
      if (null == currentUser) {
        currentUser = this.getUserManager().getGuestUser();
        this.getRequest().getSession().setAttribute(SystemConstants.SESSIONPARAM_CURRENT_USER, currentUser);
      }
      if (!currentUser.getUsername().equals(SystemConstants.GUEST_USER_NAME)) {
        CustomPageConfig customUserPageConfig = null;
        PageUserConfigBean pageUserConfigBean =
          (PageUserConfigBean) this.getRequest().getSession().getAttribute(JpmyportalplusSystemConstants.SESSIONPARAM_CURRENT_CUSTOM_USER_PAGE_CONFIG);
        if (null == pageUserConfigBean) {
          ApsSystemUtils.getLogger().info("No Page User Config by user " + currentUser.getUsername());
          pageUserConfigBean = this.createNewPageUserConfig(infos, currentUser, currentPage);
          this.getRequest().getSession().setAttribute(JpmyportalplusSystemConstants.SESSIONPARAM_CURRENT_CUSTOM_USER_PAGE_CONFIG, pageUserConfigBean);
          customUserPageConfig = pageUserConfigBean.getConfig().get(currentPage.getCode());
        } else {
          customUserPageConfig = pageUserConfigBean.getConfig().get(currentPage.getCode());
View Full Code Here

    return voidShowlet;
  }

  protected boolean executeUpdateUserConfig(IPage currentPage) throws ApsSystemException {
    try {
      UserDetails currentUser = super.getCurrentUser();
      if (currentUser.getUsername().equals(SystemConstants.GUEST_USER_NAME)) {
        this.getPageUserConfigManager().updateGuestPageConfig(currentPage, this.getUpdateInfos(), this.getRequest(), this.getResponse());
      } else {
        this.getPageUserConfigManager().updateUserPageConfig(currentUser.getUsername(), currentPage, this.getUpdateInfos());
      }
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "executeUpdateUserConfig", "Error on executeUpdateUserConfig");
      return false;
    }
View Full Code Here

 
  @Override
  public int doStartTag() throws JspException {
    ITagCloudManager tagCloudManager = (ITagCloudManager) ApsWebApplicationUtils.getBean(JpcmstagcloudSystemConstants.TAG_CLOUD_MANAGER, this.pageContext);
    try {
      UserDetails currentUser = (UserDetails) this.pageContext.getSession().getAttribute(SystemConstants.SESSIONPARAM_CURRENT_USER);
      Map<ITreeNode, Integer> occurrences = tagCloudManager.getCloudInfos(currentUser);
      if (null != this.getOccurrencesVar()) {
        this.pageContext.setAttribute(this.getOccurrencesVar(), occurrences);
      }
      List<CloudInfoBean> cloudBeans = this.buildCloudsInfoBeans(occurrences);
View Full Code Here

TOP

Related Classes of com.agiletec.aps.system.services.user.UserDetails

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.