Package com.dotmarketing.viewtools

Examples of com.dotmarketing.viewtools.CommentsWebAPI$CommentsComparator


      Structure contentletStructure = StructureCache.getStructureByInode(contentlet.getStructureInode());
      Identifier contentletIdentifier = APILocator.getIdentifierAPI().find(contentlet);

      /*make sure we have a structure in place before saving */
      CommentsWebAPI cAPI = new CommentsWebAPI();
      cAPI.validateComments(contentlet.getInode());

      Structure commentsStructure = StructureCache.getStructureByVelocityVarName(CommentsWebAPI.commentsVelocityStructureName);

      Contentlet contentletComment = new Contentlet();

View Full Code Here


    eventMap.put("hasPublishPermission", perAPI.doesUserHavePermission(ev, PermissionAPI.PERMISSION_PUBLISH, user, respectFrontendRoles));
    eventMap.put("readPermission", perAPI.doesUserHavePermission(ev, PermissionAPI.PERMISSION_READ, user, respectFrontendRoles));
    eventMap.put("writePermission", perAPI.doesUserHavePermission(ev, PermissionAPI.PERMISSION_WRITE, user, respectFrontendRoles));
    eventMap.put("publishPermission", perAPI.doesUserHavePermission(ev, PermissionAPI.PERMISSION_PUBLISH, user, respectFrontendRoles));
    eventMap.put("isDisconnected", UtilMethods.isSet(ev.getDisconnectedFrom()));
    CommentsWebAPI cAPI = new CommentsWebAPI();
    cAPI.setUser(user);
    cAPI.setRespectFrontendRoles(respectFrontendRoles);
    eventMap.put("commentsCount", cAPI.getCommentsCount(ev.getInode()));
   
    return eventMap;
   
  }
View Full Code Here

      ev.setIdentifier(origIdent);
     
      eventMap.put("categories", categoryMaps);
      eventMap.put("rating", RatingAPI.getAverageRating(ev.getIdentifier()));
      eventMap.put("votes", RatingAPI.getRatingVotesNumber(ev.getIdentifier()));
      CommentsWebAPI cAPI = new CommentsWebAPI();
      cAPI.setUser(user);
      cAPI.setRespectFrontendRoles(respectFrontendRoles);
      eventMap.put("commentsCount", cAPI.getCommentsCount(ev.getInode()));

      eventMap.put("hasReadPermission", perAPI.doesUserHavePermission(ev, PermissionAPI.PERMISSION_READ, user));
      eventMap.put("hasWritePermission", perAPI.doesUserHavePermission(ev, PermissionAPI.PERMISSION_WRITE, user));
      eventMap.put("hasPublishPermission", perAPI.doesUserHavePermission(ev, PermissionAPI.PERMISSION_PUBLISH, user));
      eventMap.put("readPermission", perAPI.doesUserHavePermission(ev, PermissionAPI.PERMISSION_READ, user));
View Full Code Here

            eventMap.put("hasPublishPermission", perAPI.doesUserHavePermission(newEvent, PermissionAPI.PERMISSION_PUBLISH, user, respectFrontendRoles));
            eventMap.put("readPermission", perAPI.doesUserHavePermission(newEvent, PermissionAPI.PERMISSION_READ, user, respectFrontendRoles));
            eventMap.put("writePermission", perAPI.doesUserHavePermission(newEvent, PermissionAPI.PERMISSION_WRITE, user, respectFrontendRoles));
            eventMap.put("publishPermission", perAPI.doesUserHavePermission(newEvent, PermissionAPI.PERMISSION_PUBLISH, user, respectFrontendRoles));
            eventMap.put("isDisconnected", UtilMethods.isSet(newEvent.getDisconnectedFrom()));
            CommentsWebAPI cAPI = new CommentsWebAPI();
            cAPI.setUser(user);
            cAPI.setRespectFrontendRoles(respectFrontendRoles);
            eventMap.put("commentsCount", cAPI.getCommentsCount(newEvent.getInode()));
            HibernateUtil.commitTransaction();
          }catch(Exception e){
            HibernateUtil.rollbackTransaction();
            disconnectEventErrors.add(e.getLocalizedMessage());
          }finally{
View Full Code Here

TOP

Related Classes of com.dotmarketing.viewtools.CommentsWebAPI$CommentsComparator

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.