Examples of UserProxy


Examples of com.dotmarketing.beans.UserProxy

        String user_Id = (String) map.get("user_id");
        String tagName = (String) map.get("tagname");
        String firstName = (String) map.get("firstname");
        String lastName = (String) map.get("lastname");
        user = APILocator.getUserAPI().loadUserById(user_Id,APILocator.getUserAPI().getSystemUser(),false);
        UserProxy userProxy = com.dotmarketing.business.APILocator.getUserProxyAPI().getUserProxy(user,APILocator.getUserAPI().getSystemUser(), false);

        String[] match = new String[6];
        match[0] = (user_Id==null)?"":user_Id;
        match[1] = (tagName==null)?"":tagName;
        match[2] = (firstName==null)?"":firstName;
View Full Code Here

Examples of com.dotmarketing.beans.UserProxy

  }

  public static boolean isSubscribed(MailingList list, User s){

    UserProxy up;
    try {
      up = com.dotmarketing.business.APILocator.getUserProxyAPI().getUserProxy(s,APILocator.getUserAPI().getSystemUser(), false);
    } catch (Exception e) {
      Logger.error(EmailFactory.class, e.getMessage(), e);
      throw new DotRuntimeException(e.getMessage(), e);
View Full Code Here

Examples of com.dotmarketing.beans.UserProxy

      finalMessageStr = finalMessageStr.replaceAll("(?i)(<|(&lt;))varMiddleName(\")?( )*/*( )*(>|(&gt;))", (user.getMiddleName()!=null) ? user.getMiddleName() : "");

      finalMessageStr = finalMessageStr.replaceAll("(?i)(<|(&lt;))/varLastName(>|(&gt;))", "");
      finalMessageStr = finalMessageStr.replaceAll("(?i)(<|(&lt;))varLastName(\")?( )*/*( )*(>|(&gt;))", (user.getLastName()!=null) ? user.getLastName() : "");

      UserProxy userproxy;
      try {
        userproxy = com.dotmarketing.business.APILocator.getUserProxyAPI().getUserProxy(user,APILocator.getUserAPI().getSystemUser(), false);
      } catch (Exception e) {
        Logger.error(EmailFactory.class, e.getMessage(), e);
        throw new DotRuntimeException(e.getMessage(), e);
     
      finalMessageStr = finalMessageStr.replaceAll("(?i)(<|(&lt;))/varLastMessage(>|(&gt;))", "");
      finalMessageStr = finalMessageStr.replaceAll("(?i)(<|(&lt;))varLastMessage(\")?( )*/*( )*(>|(&gt;))", (userproxy.getLastMessage()!=null) ? userproxy.getLastMessage() : "");

      finalMessageStr = finalMessageStr.replaceAll("(?i)(<|(&lt;))/varAddress1(>|(&gt;))", "");
      finalMessageStr = finalMessageStr.replaceAll("(?i)(<|(&lt;))varAddress1(\")?( )*/*( )*(>|(&gt;))", (address.getStreet1()!=null) ? address.getStreet1() : "");

      finalMessageStr = finalMessageStr.replaceAll("(?i)(<|(&lt;))/varAddress2(>|(&gt;))", "");
View Full Code Here

Examples of com.dotmarketing.beans.UserProxy

   * @param user User
   * @return List
   */
  public List getCommentsByUser(User user) {

    UserProxy up;
    try {
      up = com.dotmarketing.business.APILocator.getUserProxyAPI().getUserProxy(user,APILocator.getUserAPI().getSystemUser(), false);
    } catch (Exception e) {
      Logger.error(this, e.getMessage(), e);
      throw new DotRuntimeException(e.getMessage(), e);
   

    return UserCommentsFactory.getUserCommentsByProxyInode(up.getInode());

  }
View Full Code Here

Examples of com.dotmarketing.beans.UserProxy

    String result = "";

    try {
      User user = APILocator.getUserAPI().loadByUserByEmail(email, APILocator.getUserAPI().getSystemUser(), false);
      if (user != null) {
        UserProxy userProxy = com.dotmarketing.business.APILocator.getUserProxyAPI().getUserProxy(user,APILocator.getUserAPI().getSystemUser(), false);

        ChallengeQuestion challengeQuestion = ChallengeQuestionFactory.getChallengeQuestionById(Long
            .parseLong(userProxy.getChallengeQuestionId()));

        if (challengeQuestion != null)
          result = challengeQuestion.getChallengeQuestionText();
      } else {
        return null;
View Full Code Here

Examples of com.dotmarketing.beans.UserProxy

        Logger.error(CampaignReportingServlet.class,e1.getMessage(),e1);
      }
      if(wasError) return;
     
      User user;
      UserProxy sub;
      try {
        user = APILocator.getUserAPI().loadByUserByEmail(r.getEmail(), APILocator.getUserAPI().getSystemUser(), false);
        sub = com.dotmarketing.business.APILocator.getUserProxyAPI().getUserProxy(user,APILocator.getUserAPI().getSystemUser(), false);
      } catch (Exception e) {
        Logger.error(CampaignReportingServlet.class,e.getMessage(), e);
        return;
      }
     
      if (InodeUtils.isSet(sub.getInode())) {
        sub.setLastResult(200);
        sub.setLastMessage("Opened Email");
        try {
          com.dotmarketing.business.APILocator.getUserProxyAPI().saveUserProxy(sub,APILocator.getUserAPI().getSystemUser(), false);
        } catch (Exception e) {
          Logger.error(this, "Unable to save userProxy : " + e.getMessage(), e);
        }
View Full Code Here

Examples of com.dotmarketing.beans.UserProxy

          + nsue.getMessage(), nsue);
    }

    boolean clickstreamEnabled = false;
    if (user != null) {
      UserProxy userProxy = null;
      try {
        userProxy = com.dotmarketing.business.APILocator.getUserProxyAPI().getUserProxy(user,APILocator.getUserAPI().getSystemUser(), false);
      } catch (Exception e) {
        e.printStackTrace();
      }
      if (!userProxy.isNoclicktracking()) {
        clickstreamEnabled = true;
      }
    }else{
      clickstreamEnabled = true;
View Full Code Here

Examples of com.dotmarketing.beans.UserProxy

        }
   
        Logger.debug(VelocityServlet.class, "Recording the ClickStream");
        if(Config.getBooleanProperty("ENABLE_CLICKSTREAM_TRACKING", false)) {
          if (user != null) {
            UserProxy userProxy = com.dotmarketing.business.APILocator.getUserProxyAPI().getUserProxy(user,
                APILocator.getUserAPI().getSystemUser(), false);
            if (!userProxy.isNoclicktracking()) {
              ClickstreamFactory.addRequest((HttpServletRequest) request, ((HttpServletResponse) response), host);
            }
          } else {
            ClickstreamFactory.addRequest((HttpServletRequest) request, ((HttpServletResponse) response), host);
          }
View Full Code Here

Examples of com.dotmarketing.beans.UserProxy

          Company company = PublicCompanyFactory.getDefaultCompany();
         
        request.setAttribute("email", user.getEmailAddress());
         
        String email = UtilMethods.isSet(request.getParameter("email"))?request.getParameter("email"):user.getEmailAddress();
          UserProxy userProxy = com.dotmarketing.business.APILocator.getUserProxyAPI().getUserProxy(user,APILocator.getUserAPI().getSystemUser(), false);
          String challengeQuestionAnswer = request.getParameter("challengeQuestionAnswer");
         
          if (userProxy.getChallengeQuestionAnswer().equalsIgnoreCase(challengeQuestionAnswer)) {
       
        String pass = PublicEncryptionFactory.getRandomPassword();
        user.setPassword(PublicEncryptionFactory.digestString(pass));
        APILocator.getUserAPI().save(user,APILocator.getUserAPI().getSystemUser(),false);
        Host host = hostWebAPI.getCurrentHost(request);
View Full Code Here

Examples of com.dotmarketing.beans.UserProxy

    }
   
    //Getting the user from the session
    User user = (User) request.getSession().getAttribute(WebKeys.CMS_USER);
    String userId = user.getUserId();
    UserProxy userProxy = com.dotmarketing.business.APILocator.getUserProxyAPI().getUserProxy(user,APILocator.getUserAPI().getSystemUser(), false);

    //Delete the old categories
    InodeFactory.deleteChildrenOfClass(userProxy,Category.class);

    //Save the new categories
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.