Class BaseSharingTestCase<T extends com.liferay.portal.kernel.model.ClassedModel>

java.lang.Object
com.liferay.sharing.test.util.BaseSharingTestCase<T>

public abstract class BaseSharingTestCase<T extends com.liferay.portal.kernel.model.ClassedModel> extends Object
  • Field Details

    • aggregateTestRule

      public static final com.liferay.portal.kernel.test.rule.AggregateTestRule aggregateTestRule
  • Constructor Details

    • BaseSharingTestCase

      public BaseSharingTestCase()
  • Method Details

    • setUp

      public void setUp() throws Exception
      Throws:
      Exception
    • testAdminCanShareWithAddDiscussion

      public void testAdminCanShareWithAddDiscussion() throws Exception
      Throws:
      Exception
    • testAdminCanShareWithUpdate

      public void testAdminCanShareWithUpdate() throws Exception
      Throws:
      Exception
    • testAdminCanShareWithView

      public void testAdminCanShareWithView() throws Exception
      Throws:
      Exception
    • testDeletingSharedModelDeletesSharingEntries

      public void testDeletingSharedModelDeletesSharingEntries() throws Exception
      Throws:
      Exception
    • testDeletingSharedModelDoesNotDeleteOtherSharingEntries

      public void testDeletingSharedModelDoesNotDeleteOtherSharingEntries() throws Exception
      Throws:
      Exception
    • testInlinePermissions

      public void testInlinePermissions() throws Exception
      Throws:
      Exception
    • testInlinePermissionsToUserGroup

      public void testInlinePermissionsToUserGroup() throws Exception
      Throws:
      Exception
    • testModelClassNameReturnsPermissionSQL

      public void testModelClassNameReturnsPermissionSQL() throws Exception
      Throws:
      Exception
    • testMovingToRecycleBinSharedModelDoesNotDeleteSharingEntries

      public void testMovingToRecycleBinSharedModelDoesNotDeleteSharingEntries() throws Exception
      Throws:
      Exception
    • testUserWithAddDiscussionAndViewSharingEntryActionCanAddDiscussionPrivateModel

      public void testUserWithAddDiscussionAndViewSharingEntryActionCanAddDiscussionPrivateModel() throws Exception
      Throws:
      Exception
    • testUserWithAddDiscussionAndViewSharingEntryActionCannotUpdatePrivateModel

      public void testUserWithAddDiscussionAndViewSharingEntryActionCannotUpdatePrivateModel() throws Exception
      Throws:
      Exception
    • testUserWithAddDiscussionPermissionCannotShareWithUpdate

      public void testUserWithAddDiscussionPermissionCannotShareWithUpdate() throws Exception
      Throws:
      Exception
    • testUserWithAddDiscussionPermissionCannotShareWithView

      public void testUserWithAddDiscussionPermissionCannotShareWithView() throws Exception
      Throws:
      Exception
    • testUserWithAddDiscussionPermissionCanShareWithAddDiscussion

      public void testUserWithAddDiscussionPermissionCanShareWithAddDiscussion() throws Exception
      Throws:
      Exception
    • testUserWithoutAddDiscussionPermissionCannotShareWithAddDiscussion

      public void testUserWithoutAddDiscussionPermissionCannotShareWithAddDiscussion() throws Exception
      Throws:
      Exception
    • testUserWithoutAddDiscussionSharingEntryActionCannotAddDiscussionPrivateModel

      public void testUserWithoutAddDiscussionSharingEntryActionCannotAddDiscussionPrivateModel() throws Exception
      Throws:
      Exception
    • testUserWithoutSharingCannotViewPrivateModel

      public void testUserWithoutSharingCannotViewPrivateModel() throws Exception
      Throws:
      Exception
    • testUserWithoutUpdatePermissionCannotShareWithUpdate

      public void testUserWithoutUpdatePermissionCannotShareWithUpdate() throws Exception
      Throws:
      Exception
    • testUserWithoutUpdateSharingEntryActionCannotUpdatePrivateModel

      public void testUserWithoutUpdateSharingEntryActionCannotUpdatePrivateModel() throws Exception
      Throws:
      Exception
    • testUserWithoutViewPermissionCannotShareWithView

      public void testUserWithoutViewPermissionCannotShareWithView() throws Exception
      Throws:
      Exception
    • testUserWithoutViewSharingEntryActionCannotViewPrivateModel

      public void testUserWithoutViewSharingEntryActionCannotViewPrivateModel() throws Exception
      Throws:
      Exception
    • testUserWithUpdateAndViewSharingEntryActionCannotAddDiscussionPrivateModel

      public void testUserWithUpdateAndViewSharingEntryActionCannotAddDiscussionPrivateModel() throws Exception
      Throws:
      Exception
    • testUserWithUpdateAndViewSharingEntryActionCanUpdatePrivateModel

      public void testUserWithUpdateAndViewSharingEntryActionCanUpdatePrivateModel() throws Exception
      Throws:
      Exception
    • testUserWithUpdatePermissionCannotShareWithAddDiscussion

      public void testUserWithUpdatePermissionCannotShareWithAddDiscussion() throws Exception
      Throws:
      Exception
    • testUserWithUpdatePermissionCannotShareWithView

      public void testUserWithUpdatePermissionCannotShareWithView() throws Exception
      Throws:
      Exception
    • testUserWithUpdatePermissionCanShareWithUpdate

      public void testUserWithUpdatePermissionCanShareWithUpdate() throws Exception
      Throws:
      Exception
    • testUserWithViewPermissionCannotShareWithAddDiscussion

      public void testUserWithViewPermissionCannotShareWithAddDiscussion() throws Exception
      Throws:
      Exception
    • testUserWithViewPermissionCannotShareWithUpdate

      public void testUserWithViewPermissionCannotShareWithUpdate() throws Exception
      Throws:
      Exception
    • testUserWithViewPermissionCanShareWithView

      public void testUserWithViewPermissionCanShareWithView() throws Exception
      Throws:
      Exception
    • testUserWithViewSharingEntryActionCannotViewPendingModel

      public void testUserWithViewSharingEntryActionCannotViewPendingModel() throws Exception
      Throws:
      Exception
    • testUserWithViewSharingEntryActionCanViewPrivateModel

      public void testUserWithViewSharingEntryActionCanViewPrivateModel() throws Exception
      Throws:
      Exception
    • deleteModel

      protected abstract void deleteModel(T model) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getClassName

      protected abstract String getClassName()
    • getModel

      protected abstract T getModel(com.liferay.portal.kernel.model.User user, com.liferay.portal.kernel.model.Group group) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getModelCount

      protected abstract int getModelCount(com.liferay.portal.kernel.model.Group group) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getModelResourcePermission

      protected abstract com.liferay.portal.kernel.security.permission.resource.ModelResourcePermission<T> getModelResourcePermission()
    • getPendingModel

      protected abstract T getPendingModel(com.liferay.portal.kernel.model.User user, com.liferay.portal.kernel.model.Group group) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getPermissionSQLContributor

      protected abstract com.liferay.portal.security.permission.contributor.PermissionSQLContributor getPermissionSQLContributor()
    • getSharingPermissionChecker

      protected abstract com.liferay.sharing.security.permission.SharingPermissionChecker getSharingPermissionChecker()
    • moveModelToTrash

      protected abstract void moveModelToTrash(T model) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException