Package com.dotmarketing.beans

Examples of com.dotmarketing.beans.UserProxy


    userComment.setCommentUserId(user.getUserId());
   
    Date now = new Date();
    userComment.setDate(now);
   
    UserProxy userProxy = com.dotmarketing.business.APILocator.getUserProxyAPI().getUserProxy(userCommentForm.getUserProxy(),APILocator.getUserAPI().getSystemUser(), false);
    userComment.setUserId(userProxy.getUserId());
   
    userComment.setMethod(userCommentForm.getMethod());
    userComment.setTypeComment(userCommentForm.getTypeComment());
    userComment.setSubject(userCommentForm.getSubject());
    userComment.setComment(userCommentForm.getComment());

    UserCommentsFactory.saveUserComment(userProxy.getInode(),userComment);
   
  }
View Full Code Here


    User user = _getUser(req);
    String referer = req.getParameter("referer");
   
    String userProxyInode = userCategoriesForm.getUserProxy();
    boolean isNonclicktracking = userCategoriesForm.isNonclicktracking();
    UserProxy userProxy = com.dotmarketing.business.APILocator.getUserProxyAPI().getUserProxy(userProxyInode,APILocator.getUserAPI().getSystemUser(), false);
    String[] categories = userCategoriesForm.getCategories();
   
    if(categories != null && InodeUtils.isSet(userProxy.getInode()))
    {
      try
      {
        HibernateUtil.startTransaction();
        userProxy.setNoclicktracking(isNonclicktracking);
        List<Category> myUserCategories = catAPI.getChildren(userProxy, user, false);
        for (Object o : myUserCategories) {
          if(o instanceof Category && catAPI.canUseCategory((Category)o, user, false)){
            catAPI.removeChild(userProxy, (Category)o, user, false);
          }
        }
        for(int i = 0;i < categories.length;i++)
        {
          Category category = catAPI.find(categories[i], user, false);
          if(InodeUtils.isSet(category.getInode()))
          {
            catAPI.addChild(userProxy, category, user, false);
          }         
        }
        HibernateUtil.commitTransaction();
      }
      catch(Exception ex)
      {
        Logger.warn(this,ex.toString());
        HibernateUtil.rollbackTransaction();
      }
     
    } else {
     
      userProxy.setNoclicktracking(isNonclicktracking);
      com.dotmarketing.business.APILocator.getUserProxyAPI().saveUserProxy(userProxy,APILocator.getUserAPI().getSystemUser(), false);
    }
    referer += "&layer=other";
    _sendToReferral(req,res,referer);
    SessionMessages.add(req,"categories");
View Full Code Here

   
    public void _saveUserAdittionalInfo(ActionRequest req, ActionResponse res,PortletConfig config,ActionForm form, User user)
    throws Exception {
      UserAdditionalInfoForm userAdditionalInfoForm = (UserAdditionalInfoForm) form;

    UserProxy userProxy = com.dotmarketing.business.APILocator.getUserProxyAPI().getUserProxy(userAdditionalInfoForm.getUserProxy(),APILocator.getUserAPI().getSystemUser(), false);

    int numberGenericVariables = Config.getIntProperty("MAX_NUMBER_VARIABLES_TO_SHOW");
    for (int i=1; i<=numberGenericVariables; i++) {
      userProxy.setVar(i, userAdditionalInfoForm.getVar(i));
    }
   
    com.dotmarketing.business.APILocator.getUserProxyAPI().saveUserProxy(userProxy,APILocator.getUserAPI().getSystemUser(), false);
    }
View Full Code Here

      //gets the user
      User user = _getUser(req);

      if(cmd!=null && cmd.equals(Constants.DELETE)) {
        String commentId = req.getParameter("commentId");
        UserProxy userProxy = com.dotmarketing.business.APILocator.getUserProxyAPI().getUserProxy(user,APILocator.getUserAPI().getSystemUser(), false);
        UserCommentsFactory.deleteUserComment(userProxy.getInode(), commentId);
        //gets the session object for the messages
        SessionMessages.add(req, "message", "message.comment.delete");
      }
       
      _viewWebAssets(req, user);
View Full Code Here

    UserManagerForm userForm = new UserManagerForm();
    try {
      BeanUtils.copyProperties(userForm, form);

      UserProxy userProxy = com.dotmarketing.business.APILocator.getUserProxyAPI().getUserProxy(userForm.getUserID(),APILocator.getUserAPI().getSystemUser(), false);
      if (!userForm.getPrefix().equals("other"))
        userProxy.setPrefix(userForm.getPrefix());
      else
        userProxy.setPrefix(userForm.getOtherPrefix());

      userProxy.setSuffix(userForm.getSuffix());
      userProxy.setTitle(userForm.getTitle());
      userProxy.setSchool(userForm.getSchool());
      userProxy.setGraduation_year(userForm.getGraduation_year());
      userProxy.setCompany(userForm.getCompany());
      userProxy.setWebsite(userForm.getWebsite());
      userProxy.setHowHeard(userForm.getHowHeard());
      userProxy.setChapterOfficer(userForm.getChapterOfficer());

      HibernateUtil.saveOrUpdate(userProxy);

    } catch (IllegalAccessException e) {
      // TODO Auto-generated catch block
View Full Code Here

    return results;
  }

  public void deleteSubscribers (String mailingListInode, String[] inodes) {
    for (String inode : inodes) {
      UserProxy currentUser;
      try {
        currentUser = com.dotmarketing.business.APILocator.getUserProxyAPI().getUserProxy(inode,APILocator.getUserAPI().getSystemUser(), false);
      } catch (Exception e) {
        Logger.error(this, e.getMessage(), e);
        throw new DotRuntimeException(e.getMessage(), e);
View Full Code Here

    MailingListFactory.deleteAllSubscribersFromMailingList(ml);
 

  public void deleteUnsubscribers (String mailingListInode, String[] inodes) {
    for (String inode : inodes) {
      UserProxy currentUser;
      try {
        currentUser = com.dotmarketing.business.APILocator.getUserProxyAPI().getUserProxy(inode,APILocator.getUserAPI().getSystemUser(), false);
      } catch (Exception e) {
        Logger.error(this, e.getMessage(), e);
        throw new DotRuntimeException(e.getMessage(), e);
View Full Code Here

    MailingListFactory.deleteAllUnsubscribersFromMailingList(ml);
 

  public void deleteBounces (String mailingListInode, String[] inodes) {
    for (String inode : inodes) {
      UserProxy currentUser;
      try {
        currentUser = com.dotmarketing.business.APILocator.getUserProxyAPI().getUserProxy(inode,APILocator.getUserAPI().getSystemUser(), false);
      } catch (Exception e) {
        Logger.error(this, e.getMessage(), e);
        throw new DotReindexStateException(e.getMessage(), e);
View Full Code Here

   * @return List<Map<String, Object>>
   */
  public List<Map<String, Object>> addUserToMailingList(String mlInode, String userid){
    List<Map<String, Object>> list = new ArrayList<Map<String,Object>> ();
    User user;
    UserProxy userproxy;
    try {
      user = APILocator.getUserAPI().loadUserById(userid,APILocator.getUserAPI().getSystemUser(),false);
      userproxy = com.dotmarketing.business.APILocator.getUserProxyAPI().getUserProxy(userid,APILocator.getUserAPI().getSystemUser(), false);
    } catch (NoSuchUserException e) {
      Logger.warn(this, "User doesn't Exist");
View Full Code Here

   * @param user
   * @return List<Map<String, Object>>
   */
  public List<Map<String, Object>> deleteUserFromMailingList(String mlInode, String userid ){
    List<Map<String, Object>> list = new ArrayList<Map<String,Object>> ();
    UserProxy userproxy;
    User user;
    try {
      user = APILocator.getUserAPI().loadUserById(userid,APILocator.getUserAPI().getSystemUser(),false);
      userproxy = com.dotmarketing.business.APILocator.getUserProxyAPI().getUserProxy(userid,APILocator.getUserAPI().getSystemUser(), false);
    } catch (NoSuchUserException e) {
View Full Code Here

TOP

Related Classes of com.dotmarketing.beans.UserProxy

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.