@Override
  public boolean hasPermission(PermissionChecker permissionChecker, long classPK, String actionId)
      throws Exception {

    BookmarksFolder folder = BookmarksFolderLocalServiceUtil.getFolder(classPK);

    return BookmarksFolderPermissionChecker.contains(permissionChecker, folder, actionId);
  }
  @Override
  public int getTrashContainerModelsCount(long classPK) throws PortalException {

    BookmarksFolder folder = BookmarksFolderLocalServiceUtil.getFolder(classPK);

    return BookmarksFolderLocalServiceUtil.getFoldersCount(
        folder.getGroupId(), classPK, WorkflowConstants.STATUS_IN_TRASH);
  }
  @Override
  public AssetRenderer getAssetRenderer(long classPK, int type) throws PortalException {

    BookmarksFolder folder = BookmarksFolderLocalServiceUtil.getFolder(classPK);

    BookmarksFolderAssetRenderer bookmarksFolderAssetRenderer =
        new BookmarksFolderAssetRenderer(folder);

    bookmarksFolderAssetRenderer.setAssetRendererType(type);
    bookmarksFolderAssetRenderer.setServletContext(_servletContext);

    return bookmarksFolderAssetRenderer;
  }
  @Override
  public List<TrashRenderer> getTrashContainerModelTrashRenderers(long classPK, int start, int end)
      throws PortalException {

    List<TrashRenderer> trashRenderers = new ArrayList<TrashRenderer>();

    BookmarksFolder folder = BookmarksFolderLocalServiceUtil.getFolder(classPK);

    List<BookmarksFolder> folders =
        BookmarksFolderLocalServiceUtil.getFolders(
            folder.getGroupId(), classPK, WorkflowConstants.STATUS_IN_TRASH, start, end);

    for (BookmarksFolder curFolder : folders) {
      TrashHandler trashHandler =
          TrashHandlerRegistryUtil.getTrashHandler(BookmarksFolder.class.getName());

      TrashRenderer trashRenderer = trashHandler.getTrashRenderer(curFolder.getPrimaryKey());

      trashRenderers.add(trashRenderer);
    }

    return trashRenderers;
  }
  @Override
  public ContainerModel getContainerModel(long containerModelId) throws PortalException {

    return BookmarksFolderLocalServiceUtil.getFolder(containerModelId);
  }