Package com.dotmarketing.portlets.user.struts

Examples of com.dotmarketing.portlets.user.struts.UserCommentsForm


      ActionRequest req, ActionResponse res)
  throws Exception
  {
    ActionRequestImpl reqImpl = (ActionRequestImpl)req;
    HttpServletRequest httpReq = reqImpl.getHttpServletRequest();
    UserCommentsForm userCommentForm = (UserCommentsForm) form;
   
    String referer = req.getParameter("referer");
   
    String cmd = req.getParameter(Constants.CMD);   
    User user = _getUser(req);
View Full Code Here


 
  public void _deleteWebAsset(ActionRequest req, ActionResponse res, PortletConfig config, ActionForm form, User user) throws Exception
  {
    try
    {
      UserCommentsForm userCommentForm = (UserCommentsForm) form;
      String userCommentInodeString = req.getParameter("commentId");
      //long userCommentInode = Long.parseLong(userCommentInodeString);
      UserComment userComment = UserCommentsFactory.getComment(userCommentInodeString);
      String userProxyInode = userCommentForm.getUserProxy();
      UserCommentsFactory.deleteUserComment(userProxyInode,userComment);
    }
    catch(Exception ex)
    {
      Logger.debug(this,ex.toString());
View Full Code Here

    }
  }
 
  public void _saveWebAsset(ActionRequest req, ActionResponse res, PortletConfig config, ActionForm form, User user) throws Exception
  {
    UserCommentsForm userCommentForm = (UserCommentsForm) form;
    UserComment userComment = new UserComment();
    BeanUtils.copyProperties(userComment,userCommentForm);
   
    //Copy additional fields
    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

TOP

Related Classes of com.dotmarketing.portlets.user.struts.UserCommentsForm

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.