From 2948e65c3a77da8439c35c152bc2d7d341218302 Mon Sep 17 00:00:00 2001 From: jensp Date: Wed, 13 Jul 2016 16:38:26 +0000 Subject: [PATCH] CCM NG: ContentSectionManager git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4195 8810af33-2d31-482b-a856-94f89814c4df --- ccm-cms/pom.xml | 6 +- .../contentsection/ContentSection.java | 47 ++-- .../contentsection/ContentSectionManager.java | 216 ++++++++++++++++++ .../ContentSectionRepository.java | 20 ++ .../contentsection/ContentSectionSetup.java | 62 ++--- .../src/test/java/org/librecms/CmsTest.java | 9 - .../ContentSectionManagerTest.java | 152 ++++++++++++ 7 files changed, 454 insertions(+), 58 deletions(-) create mode 100644 ccm-cms/src/main/java/org/librecms/contentsection/ContentSectionManager.java create mode 100644 ccm-cms/src/test/java/org/librecms/contentsection/ContentSectionManagerTest.java diff --git a/ccm-cms/pom.xml b/ccm-cms/pom.xml index 7c82893cf..8ccd5a5b5 100644 --- a/ccm-cms/pom.xml +++ b/ccm-cms/pom.xml @@ -131,10 +131,10 @@ org.apache.maven.plugins maven-compiler-plugin - 3.3 + 3.5.1 - 1.7 - 1.7 + 1.8 + 1.8 true true ${project.build.sourceEncoding} diff --git a/ccm-cms/src/main/java/org/librecms/contentsection/ContentSection.java b/ccm-cms/src/main/java/org/librecms/contentsection/ContentSection.java index 858be2036..5c3d3fbe4 100644 --- a/ccm-cms/src/main/java/org/librecms/contentsection/ContentSection.java +++ b/ccm-cms/src/main/java/org/librecms/contentsection/ContentSection.java @@ -23,12 +23,16 @@ import org.libreccm.security.Role; import org.libreccm.web.CcmApplication; import java.io.Serializable; +import java.util.Collections; +import java.util.List; import java.util.Locale; import java.util.Objects; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.JoinColumn; +import javax.persistence.JoinTable; +import javax.persistence.ManyToMany; import javax.persistence.OneToOne; import javax.persistence.Table; @@ -43,6 +47,16 @@ import static org.librecms.CmsConstants.*; public class ContentSection extends CcmApplication implements Serializable { private static final long serialVersionUID = -671718122153931727L; + + protected static final String ROOT = "root"; + protected static final String ASSETS = "assets"; + protected static final String ALERT_RECIPIENT = "alert_recipient"; + protected static final String AUTHOR = "author"; + protected static final String EDITOR = "editor"; + protected static final String MANAGER = "manager"; + protected static final String PUBLISHER = "publisher"; + protected static final String CONTENT_READER = "content_reader"; + @Column(name = "LABEL", length = 512) private String label; @@ -67,13 +81,16 @@ public class ContentSection extends CcmApplication implements Serializable { @Column(name = "XML_GENERATOR_CLASS", length = 1024) private String xmlGeneratorClass; - @OneToOne - @JoinColumn(name = "STAFF_ROLE_ID") - private Role staffRole; //ToDo: Check if this is still necessary - - @OneToOne - @JoinColumn(name = "VIEWERS_ROLE_ID") - private Role viewersRole; //ToDo: Check if this is still necessary + @ManyToMany + @JoinTable(name = "CONTENT_SECTION_ROLES", + schema = DB_SCHEMA, + joinColumns = { + @JoinColumn(name = "SECTION_ID") + }, + inverseJoinColumns = { + @JoinColumn(name = "ROLE_ID") + }) + private List roles; @Column(name = "DEFAULT_LOCALE") private Locale defaultLocale; @@ -134,20 +151,20 @@ public class ContentSection extends CcmApplication implements Serializable { this.xmlGeneratorClass = xmlGeneratorClass; } - public Role getStaffRole() { - return staffRole; + public List getRoles() { + return Collections.unmodifiableList(roles); } - public void setStaffRole(final Role staffRole) { - this.staffRole = staffRole; + protected void setRoles(final List roles) { + this.roles = roles; } - public Role getViewersRole() { - return viewersRole; + protected void addRole(final Role role) { + roles.add(role); } - public void setViewersRole(final Role viewersRole) { - this.viewersRole = viewersRole; + protected void removeRole(final Role role) { + roles.remove(role); } public Locale getDefaultLocale() { diff --git a/ccm-cms/src/main/java/org/librecms/contentsection/ContentSectionManager.java b/ccm-cms/src/main/java/org/librecms/contentsection/ContentSectionManager.java new file mode 100644 index 000000000..7338fc215 --- /dev/null +++ b/ccm-cms/src/main/java/org/librecms/contentsection/ContentSectionManager.java @@ -0,0 +1,216 @@ +/* + * Copyright (C) 2016 LibreCCM Foundation. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ +package org.librecms.contentsection; + +import org.libreccm.categorization.Category; +import org.libreccm.categorization.CategoryRepository; +import org.libreccm.core.CoreConstants; +import org.libreccm.security.AuthorizationRequired; +import org.libreccm.security.PermissionManager; +import org.libreccm.security.RequiresPrivilege; +import org.libreccm.security.Role; +import org.libreccm.security.RoleManager; +import org.libreccm.security.RoleRepository; + +import javax.enterprise.context.RequestScoped; +import javax.inject.Inject; +import javax.transaction.Transactional; + +import static org.librecms.CmsConstants.*; +import static org.librecms.contentsection.ContentSection.*; + +/** + * Provides several functions for managing content sections. + * + * @author Jens Pelzetter + */ +@RequestScoped +public class ContentSectionManager { + + @Inject + private ContentSectionRepository sectionRepo; + + @Inject + private CategoryRepository categoryRepo; + + @Inject + private RoleRepository roleRepo; + + @Inject + private RoleManager roleManager; + + @Inject + private PermissionManager permissionManager; + + /** + * Creates a new content section including the default roles. + * + * @param name The name of the new content section. + * + * @return The new content section. + */ + @AuthorizationRequired + @RequiresPrivilege(CoreConstants.ADMIN_PRIVILEGE) + @Transactional(Transactional.TxType.REQUIRED) + public ContentSection createContentSection(final String name) { + final ContentSection section = new ContentSection(); + section.setLabel(name); + + final Category rootFolder = new Category(); + rootFolder.setName(String.format("%s_root", name)); + + final Category rootAssetFolder = new Category(); + rootFolder.setName(String.format("%s_assets", name)); + + section.setRootDocumentFolder(rootFolder); + section.setRootAssetsFolder(rootAssetFolder); + + sectionRepo.save(section); + categoryRepo.save(rootFolder); + categoryRepo.save(rootAssetFolder); + + addRoleToContentSection(section, + String.format("%s_" + ALERT_RECIPIENT, name)); + addRoleToContentSection(section, + String.format("%s_" + AUTHOR, name), + PRIVILEGE_ITEMS_CATEGORIZE, + PRIVILEGE_ITEMS_CREATE_NEW, + PRIVILEGE_ITEMS_EDIT, + PRIVILEGE_ITEMS_VIEW_PUBLISHED, + PRIVILEGE_ITEMS_PREVIEW); + addRoleToContentSection(section, + String.format("%s_" + EDITOR, name), + PRIVILEGE_ITEMS_CATEGORIZE, + PRIVILEGE_ITEMS_CREATE_NEW, + PRIVILEGE_ITEMS_EDIT, + PRIVILEGE_ITEMS_APPROVE, + PRIVILEGE_ITEMS_DELETE, + PRIVILEGE_ITEMS_VIEW_PUBLISHED, + PRIVILEGE_ITEMS_PREVIEW); + addRoleToContentSection(section, + String.format("%s_" + MANAGER, name), + PRIVILEGE_ADMINISTER_ROLES, + PRIVILEGE_ADMINISTER_WORKFLOW, + PRIVILEGE_ADMINISTER_LIFECYLES, + PRIVILEGE_ADMINISTER_CATEGORIES, + PRIVILEGE_ADMINISTER_CONTENT_TYPES, + PRIVILEGE_ITEMS_CATEGORIZE, + PRIVILEGE_ITEMS_CREATE_NEW, + PRIVILEGE_ITEMS_EDIT, + PRIVILEGE_ITEMS_APPROVE, + PRIVILEGE_ITEMS_PUBLISH, + PRIVILEGE_ITEMS_DELETE, + PRIVILEGE_ITEMS_VIEW_PUBLISHED, + PRIVILEGE_ITEMS_PREVIEW); + addRoleToContentSection(section, + String.format("%s_" + PUBLISHER, name), + PRIVILEGE_ITEMS_CATEGORIZE, + PRIVILEGE_ITEMS_CREATE_NEW, + PRIVILEGE_ITEMS_EDIT, + PRIVILEGE_ITEMS_APPROVE, + PRIVILEGE_ITEMS_PUBLISH, + PRIVILEGE_ITEMS_DELETE, + PRIVILEGE_ITEMS_VIEW_PUBLISHED, + PRIVILEGE_ITEMS_PREVIEW); + addRoleToContentSection(section, + String.format("%s_" + CONTENT_READER, name), + PRIVILEGE_ITEMS_VIEW_PUBLISHED); + + return section; + } + + /** + * Renames a content section and all roles associated with it (roles + * starting with the name of the content section). + * + * @param section The section to rename. + * + * @@param name The new name of the content section. + */ + @AuthorizationRequired + @RequiresPrivilege(CoreConstants.ADMIN_PRIVILEGE) + @Transactional(Transactional.TxType.REQUIRED) + public void renameContentSection(final ContentSection section, + final String name) { + final String oldName = section.getLabel(); + + section.setLabel(name); + + section.getRoles().forEach(r -> renameSectionRole(r, oldName, name)); + } + + private void renameSectionRole(final Role role, + final String oldName, + final String newName) { + if (role.getName().startsWith(oldName, 0)) { + final String suffix = role.getName().substring(oldName.length()); + role.setName(String.join("", newName, suffix)); + + roleRepo.save(role); + } + } + + @AuthorizationRequired + @RequiresPrivilege(CoreConstants.ADMIN_PRIVILEGE) + @Transactional(Transactional.TxType.REQUIRED) + public void addRoleToContentSection(final ContentSection section, + final String roleName, + final String... privileges) { + final Role role = new Role(); + role.setName(String.join("_", section.getLabel(), roleName)); + roleRepo.save(role); + + final Category rootFolder = section.getRootDocumentsFolder(); + for (String privilege : privileges) { + permissionManager.grantPrivilege(privilege, role, rootFolder); + } + + section.addRole(role); + sectionRepo.save(section); + } + + @AuthorizationRequired + @RequiresPrivilege(CoreConstants.ADMIN_PRIVILEGE) + @Transactional(Transactional.TxType.REQUIRED) + public void removeRoleFromContentSection( + final ContentSection contentSection, + final Role role) { + + contentSection.removeRole(role); + sectionRepo.save(contentSection); + roleRepo.delete(role); + } + + @AuthorizationRequired + @RequiresPrivilege(CoreConstants.ADMIN_PRIVILEGE) + @Transactional(Transactional.TxType.REQUIRED) + public void addTypeToSection(final ContentType type, + final ContentSection section) { + throw new UnsupportedOperationException(); + } + + @AuthorizationRequired + @RequiresPrivilege(CoreConstants.ADMIN_PRIVILEGE) + @Transactional(Transactional.TxType.REQUIRED) + public void removeTypeToSection(final ContentType type, + final ContentSection section) { + throw new UnsupportedOperationException(); + } + +} diff --git a/ccm-cms/src/main/java/org/librecms/contentsection/ContentSectionRepository.java b/ccm-cms/src/main/java/org/librecms/contentsection/ContentSectionRepository.java index 94615e5b9..d3652cd1e 100644 --- a/ccm-cms/src/main/java/org/librecms/contentsection/ContentSectionRepository.java +++ b/ccm-cms/src/main/java/org/librecms/contentsection/ContentSectionRepository.java @@ -19,8 +19,12 @@ package org.librecms.contentsection; import org.libreccm.core.AbstractEntityRepository; +import org.libreccm.core.CoreConstants; +import org.libreccm.security.AuthorizationRequired; +import org.libreccm.security.RequiresPrivilege; import javax.enterprise.context.RequestScoped; +import javax.transaction.Transactional; /** * @@ -39,5 +43,21 @@ public class ContentSectionRepository public boolean isNew(final ContentSection section) { return section.getObjectId() == 0; } + + @AuthorizationRequired + @RequiresPrivilege(CoreConstants.ADMIN_PRIVILEGE) + @Transactional(Transactional.TxType.REQUIRED) + @Override + public void save(final ContentSection section) { + super.save(section); + } + + @AuthorizationRequired + @RequiresPrivilege(CoreConstants.ADMIN_PRIVILEGE) + @Transactional(Transactional.TxType.REQUIRED) + @Override + public void delete(final ContentSection section) { + super.delete(section); + } } diff --git a/ccm-cms/src/main/java/org/librecms/contentsection/ContentSectionSetup.java b/ccm-cms/src/main/java/org/librecms/contentsection/ContentSectionSetup.java index 99babb9eb..2e724efea 100644 --- a/ccm-cms/src/main/java/org/librecms/contentsection/ContentSectionSetup.java +++ b/ccm-cms/src/main/java/org/librecms/contentsection/ContentSectionSetup.java @@ -26,6 +26,7 @@ import org.libreccm.security.Role; import org.libreccm.web.AbstractCcmApplicationSetup; import static org.librecms.CmsConstants.*; +import static org.librecms.contentsection.ContentSection.*; /** * @@ -45,28 +46,28 @@ public class ContentSectionSetup extends AbstractCcmApplicationSetup { @Override public void setup() { - final String contentSectionNames; + final String sectionNames; if (getIntegrationProps().containsKey(INITIAL_CONTENT_SECTIONS)) { - contentSectionNames = getIntegrationProps().getProperty( + sectionNames = getIntegrationProps().getProperty( INITIAL_CONTENT_SECTIONS); } else { - contentSectionNames = "info"; + sectionNames = "info"; } - for (final String contentSectionName : contentSectionNames.split(",")) { + for (final String contentSectionName : sectionNames.split(",")) { createContentSection(contentSectionName); } } - private void createContentSection(final String contentSectionName) { + private void createContentSection(final String sectionName) { final ContentSection section = new ContentSection(); - section.setLabel(contentSectionName); + section.setLabel(sectionName); final Category rootFolder = new Category(); - rootFolder.setName(String.format("%s_root", contentSectionName)); + rootFolder.setName(String.format("%s_" + ROOT, sectionName)); final Category rootAssetFolder = new Category(); - rootFolder.setName(String.format("%s_assets", contentSectionName)); + rootFolder.setName(String.format("%s_" + ASSETS, sectionName)); section.setRootDocumentFolder(rootFolder); section.setRootAssetsFolder(rootAssetFolder); @@ -76,17 +77,17 @@ public class ContentSectionSetup extends AbstractCcmApplicationSetup { getEntityManager().persist(rootAssetFolder); final Role alertRecipient = createRole(String.format( - "%s_alert_recipient", contentSectionName)); - final Role author = createRole(String.format("%s_author", - contentSectionName)); - final Role editor = createRole(String.format("%s_editor", - contentSectionName)); - final Role manager = createRole(String.format("%s_manager", - contentSectionName)); - final Role publisher = createRole(String.format("%s_publisher", - contentSectionName)); - final Role contentReader = createRole(String.format("%s_content_reader", - contentSectionName)); + "%s_" + ALERT_RECIPIENT, sectionName)); + final Role author = createRole(String.format("%s_" + AUTHOR, + sectionName)); + final Role editor = createRole(String.format("%s_" + EDITOR, + sectionName)); + final Role manager = createRole(String.format("%s_" + MANAGER, + sectionName)); + final Role publisher = createRole(String.format("%s_" + PUBLISHER, + sectionName)); + final Role contentReader = createRole(String.format( + "%s_" + CONTENT_READER, sectionName)); grantPermissions(author, rootFolder, @@ -96,8 +97,8 @@ public class ContentSectionSetup extends AbstractCcmApplicationSetup { PRIVILEGE_ITEMS_VIEW_PUBLISHED, PRIVILEGE_ITEMS_PREVIEW); - grantPermissions(editor, - rootFolder, + grantPermissions(editor, + rootFolder, PRIVILEGE_ITEMS_CATEGORIZE, PRIVILEGE_ITEMS_CREATE_NEW, PRIVILEGE_ITEMS_EDIT, @@ -105,9 +106,9 @@ public class ContentSectionSetup extends AbstractCcmApplicationSetup { PRIVILEGE_ITEMS_DELETE, PRIVILEGE_ITEMS_VIEW_PUBLISHED, PRIVILEGE_ITEMS_PREVIEW); - + grantPermissions(manager, - rootFolder, + rootFolder, PRIVILEGE_ADMINISTER_ROLES, PRIVILEGE_ADMINISTER_WORKFLOW, PRIVILEGE_ADMINISTER_LIFECYLES, @@ -121,9 +122,9 @@ public class ContentSectionSetup extends AbstractCcmApplicationSetup { PRIVILEGE_ITEMS_DELETE, PRIVILEGE_ITEMS_VIEW_PUBLISHED, PRIVILEGE_ITEMS_PREVIEW); - - grantPermissions(editor, - rootFolder, + + grantPermissions(publisher, + rootFolder, PRIVILEGE_ITEMS_CATEGORIZE, PRIVILEGE_ITEMS_CREATE_NEW, PRIVILEGE_ITEMS_EDIT, @@ -132,11 +133,10 @@ public class ContentSectionSetup extends AbstractCcmApplicationSetup { PRIVILEGE_ITEMS_DELETE, PRIVILEGE_ITEMS_VIEW_PUBLISHED, PRIVILEGE_ITEMS_PREVIEW); - - grantPermissions(contentReader, - rootFolder, - PRIVILEGE_ITEMS_VIEW_PUBLISHED); - + + grantPermissions(contentReader, + rootFolder, + PRIVILEGE_ITEMS_VIEW_PUBLISHED); getEntityManager().persist(alertRecipient); getEntityManager().persist(author); diff --git a/ccm-cms/src/test/java/org/librecms/CmsTest.java b/ccm-cms/src/test/java/org/librecms/CmsTest.java index 3f5d2aa7e..b048586b4 100644 --- a/ccm-cms/src/test/java/org/librecms/CmsTest.java +++ b/ccm-cms/src/test/java/org/librecms/CmsTest.java @@ -3,18 +3,12 @@ */ package org.librecms; -import org.librecms.Cms; - -import static org.hamcrest.CoreMatchers.*; import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.ShouldThrowException; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.junit.InSequence; import org.jboss.arquillian.persistence.CreateSchema; import org.jboss.arquillian.persistence.PersistenceTest; -import org.jboss.arquillian.persistence.ShouldMatchDataSet; -import org.jboss.arquillian.persistence.UsingDataSet; import org.jboss.arquillian.transaction.api.annotation.TransactionMode; import org.jboss.arquillian.transaction.api.annotation.Transactional; import org.jboss.shrinkwrap.api.ShrinkWrap; @@ -32,13 +26,10 @@ import org.junit.runner.RunWith; import org.libreccm.tests.categories.IntegrationTest; import java.io.File; -import java.util.List; -import javax.inject.Inject; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; -import static org.junit.Assert.*; @Category(IntegrationTest.class) @RunWith(Arquillian.class) diff --git a/ccm-cms/src/test/java/org/librecms/contentsection/ContentSectionManagerTest.java b/ccm-cms/src/test/java/org/librecms/contentsection/ContentSectionManagerTest.java new file mode 100644 index 000000000..7ee524528 --- /dev/null +++ b/ccm-cms/src/test/java/org/librecms/contentsection/ContentSectionManagerTest.java @@ -0,0 +1,152 @@ +/* + * Copyright (C) 2016 LibreCCM Foundation. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ +package org.librecms.contentsection; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit.Arquillian; +import org.jboss.arquillian.junit.InSequence; +import org.jboss.arquillian.persistence.CreateSchema; +import org.jboss.arquillian.persistence.PersistenceTest; +import org.jboss.arquillian.persistence.ShouldMatchDataSet; +import org.jboss.arquillian.persistence.UsingDataSet; +import org.jboss.arquillian.transaction.api.annotation.TransactionMode; +import org.jboss.arquillian.transaction.api.annotation.Transactional; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.asset.EmptyAsset; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.jboss.shrinkwrap.resolver.api.maven.Maven; +import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.experimental.categories.Category; +import org.junit.runner.RunWith; +import org.libreccm.tests.categories.IntegrationTest; +import org.librecms.Cms; + +import java.io.File; + +import static org.junit.Assert.*; + +/** + * + * @author Jens Pelzetter + */ +@Category(IntegrationTest.class) +@RunWith(Arquillian.class) +@PersistenceTest +@Transactional(TransactionMode.COMMIT) +@CreateSchema({"create_ccm_cms_schema.sql"}) +public class ContentSectionManagerTest { + + public ContentSectionManagerTest() { + } + + @BeforeClass + public static void setUpClass() { + } + + @AfterClass + public static void tearDownClass() { + } + + @Before + public void setUp() { + } + + @After + public void tearDown() { + } + + @Deployment + public static WebArchive createDeployment() { + final PomEquippedResolveStage pom = Maven + .resolver() + .loadPomFromFile("pom.xml"); + final PomEquippedResolveStage dependencies = pom + .importCompileAndRuntimeDependencies(); + final File[] libs = dependencies.resolve().withTransitivity().asFile(); + + for (File lib : libs) { + System.err.printf("Adding file '%s' to test archive...%n", + lib.getName()); + } + + return ShrinkWrap + .create(WebArchive.class, + "LibreCCM-org.libreccm.cms.CmsTest.war") + .addPackage(Cms.class.getPackage()) + .addAsLibraries(libs) + .addAsResource("test-persistence.xml", + "META-INF/persistence.xml") + .addAsWebInfResource("test-web.xml", "WEB-INF/web.xml") + .addAsWebInfResource(EmptyAsset.INSTANCE, "WEB-INF/beans.xml"); + + } + + @Test + @UsingDataSet("datasets/org/librecms/contentsection/" + + "ContentSectionManagerTest/data.xml") + @ShouldMatchDataSet( + value = "datasets/org/librecms/contentsection/" + + "ContentSectionManagerTest/after-create.xml", + excludeColumns = {"section_id"}) + @InSequence(100) + public void createSection() { + } + + @Test + @UsingDataSet("datasets/org/librecms/contentsection/" + + "ContentSectionManagerTest/data.xml") + @ShouldMatchDataSet( + value = "datasets/org/librecms/contentsection/" + + "ContentSectionManagerTest/after-rename.xml", + excludeColumns = {"section_id"}) + @InSequence(200) + public void renameSection() { + + } + + @Test + @UsingDataSet("datasets/org/librecms/contentsection/" + + "ContentSectionManagerTest/data.xml") + @ShouldMatchDataSet( + value = "datasets/org/librecms/contentsection/" + + "ContentSectionManagerTest/after-add-role.xml", + excludeColumns = {"section_id"}) + @InSequence(300) + public void addRole() { + + } + + @Test + @UsingDataSet("datasets/org/librecms/contentsection/" + + "ContentSectionManagerTest/data.xml") + @ShouldMatchDataSet( + value = "datasets/org/librecms/contentsection/" + + "ContentSectionManagerTest/after-remove-role.xml", + excludeColumns = {"section_id"}) + @InSequence(300) + public void removeRole() { + + } + +}