diff --git a/ccm-cms/src/main/java/org/librecms/contentsection/ContentItem.java b/ccm-cms/src/main/java/org/librecms/contentsection/ContentItem.java index 40be6ff6a..d3e2d6c39 100644 --- a/ccm-cms/src/main/java/org/librecms/contentsection/ContentItem.java +++ b/ccm-cms/src/main/java/org/librecms/contentsection/ContentItem.java @@ -116,12 +116,12 @@ import static org.librecms.CmsConstants.*; @NamedQuery( name = "ContentItem.findDraftVersion", query = "SELECT i FROM ContentItem i " - + "WHERE i.uuid = ':uuid' " + + "WHERE i.uuid = :uuid " + "AND i.version = 'DRAFT'"), @NamedQuery( name = "ContentItem.findLiveVersion", query = "SELECT i FROM ContentItem i " - + "WHERE i.uuid = ':uuid' " + + "WHERE i.uuid = :uuid " + "AND i.version = 'LIVE'") }) diff --git a/ccm-cms/src/main/java/org/librecms/contentsection/ContentItemManager.java b/ccm-cms/src/main/java/org/librecms/contentsection/ContentItemManager.java index 81414223d..0a87e0438 100644 --- a/ccm-cms/src/main/java/org/librecms/contentsection/ContentItemManager.java +++ b/ccm-cms/src/main/java/org/librecms/contentsection/ContentItemManager.java @@ -180,6 +180,11 @@ public class ContentItemManager { type.getName())); } + if (name == null || name.isEmpty()) { + throw new IllegalArgumentException( + "The name of a content item can't be blank."); + } + final T item; try { item = type.newInstance(); @@ -232,6 +237,15 @@ public class ContentItemManager { */ @Transactional(Transactional.TxType.REQUIRED) public void move(final ContentItem item, final Category targetFolder) { + if (item == null) { + throw new IllegalArgumentException("The item to move can't be null."); + } + + if (targetFolder == null) { + throw new IllegalArgumentException( + "The target folder can't be null."); + } + final ContentItem draftItem = getDraftVersion(item, item.getClass()); final Optional currentFolder = getItemFolder(item); @@ -244,7 +258,10 @@ public class ContentItemManager { } } - categoryManager.addObjectToCategory(draftItem, targetFolder); + categoryManager.addObjectToCategory( + draftItem, + targetFolder, + CmsConstants.CATEGORIZATION_TYPE_FOLDER); } @@ -260,6 +277,15 @@ public class ContentItemManager { */ @SuppressWarnings("unchecked") public void copy(final ContentItem item, final Category targetFolder) { + if (item == null) { + throw new IllegalArgumentException("The item to copy can't be null."); + } + + if (targetFolder == null) { + throw new IllegalArgumentException( + "The target folder to which the item is copied can't be null"); + } + final Optional contentType = typeRepo .findByContentSectionAndClass( item.getContentType().getContentSection(), item. @@ -331,6 +357,10 @@ public class ContentItemManager { final Method readMethod = propertyDescriptor.getReadMethod(); final Method writeMethod = propertyDescriptor.getWriteMethod(); + if (writeMethod == null) { + continue; + } + if (LocalizedString.class.equals(propType)) { final LocalizedString source; final LocalizedString target; @@ -424,8 +454,6 @@ public class ContentItemManager { } } } - - throw new UnsupportedOperationException(); } private boolean propertyIsExcluded(final String name) { @@ -690,13 +718,22 @@ public class ContentItemManager { * something is seriously wrong with the database) this method will * never return {@code null}. */ + @SuppressWarnings("unchecked") public T getDraftVersion(final ContentItem item, final Class type) { - final TypedQuery query = entityManager.createNamedQuery( - "ContentItem.findDraftVersion", type); + if (!ContentItem.class.isAssignableFrom(type)) { + throw new IllegalArgumentException(String.format( + "The provided type \"%s\" does match the type of the provided " + + "item (\"%s\").", + type.getName(), + item.getClass().getName())); + } + + final TypedQuery query = entityManager.createNamedQuery( + "ContentItem.findDraftVersion", ContentItem.class); query.setParameter("uuid", item.getUuid()); - return query.getSingleResult(); + return (T) query.getSingleResult(); } /** diff --git a/ccm-cms/src/main/java/org/librecms/contentsection/ContentItemRepository.java b/ccm-cms/src/main/java/org/librecms/contentsection/ContentItemRepository.java index 81aca4833..3068903c0 100644 --- a/ccm-cms/src/main/java/org/librecms/contentsection/ContentItemRepository.java +++ b/ccm-cms/src/main/java/org/librecms/contentsection/ContentItemRepository.java @@ -25,7 +25,6 @@ import org.libreccm.core.CcmObjectRepository; import java.util.List; import java.util.Optional; -import java.util.stream.Collectors; import javax.enterprise.context.RequestScoped; import javax.inject.Inject; diff --git a/ccm-cms/src/main/java/org/librecms/contenttypes/Article.java b/ccm-cms/src/main/java/org/librecms/contenttypes/Article.java index 1273388ff..1258483bf 100644 --- a/ccm-cms/src/main/java/org/librecms/contenttypes/Article.java +++ b/ccm-cms/src/main/java/org/librecms/contenttypes/Article.java @@ -56,6 +56,11 @@ public class Article extends ContentItem implements Serializable { )) private LocalizedString text; + public Article() { + super(); + text = new LocalizedString(); + } + public LocalizedString getText() { return text; } diff --git a/ccm-cms/src/test/java/org/librecms/contentsection/ContentItemManagerTest.java b/ccm-cms/src/test/java/org/librecms/contentsection/ContentItemManagerTest.java index 462b7f31f..60c3329ca 100644 --- a/ccm-cms/src/test/java/org/librecms/contentsection/ContentItemManagerTest.java +++ b/ccm-cms/src/test/java/org/librecms/contentsection/ContentItemManagerTest.java @@ -19,6 +19,7 @@ package org.librecms.contentsection; 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; @@ -41,16 +42,21 @@ import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.libreccm.categorization.Category; +import org.libreccm.categorization.CategoryRepository; import org.libreccm.security.Shiro; import org.libreccm.tests.categories.IntegrationTest; -import org.libreccm.workflow.Workflow; -import org.libreccm.workflow.WorkflowRepository; +import org.libreccm.workflow.WorkflowTemplate; +import org.libreccm.workflow.WorkflowTemplateRepository; import org.librecms.contenttypes.Article; +import org.librecms.contenttypes.Event; +import org.librecms.lifecycle.LifecycleDefinition; +import org.librecms.lifecycle.LifecycleDefinitionRepository; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Locale; +import java.util.Optional; import java.util.stream.IntStream; import javax.inject.Inject; @@ -74,12 +80,24 @@ public class ContentItemManagerTest { @Inject private ContentSectionRepository sectionRepo; + @Inject + private ContentItemRepository itemRepo; + @Inject private ContentItemManager itemManager; + @Inject + private CategoryRepository categoryRepo; + @Inject private Shiro shiro; + @Inject + private WorkflowTemplateRepository workflowTemplateRepo; + + @Inject + private LifecycleDefinitionRepository lifecycleDefinitionRepo; + @Inject private EntityManager entityManager; @@ -206,20 +224,21 @@ public class ContentItemManagerTest { } @Test - @InSequence(100) + @InSequence(1100) @UsingDataSet("datasets/org/librecms/contentsection/" + "ContentItemManagerTest/data.xml") - @ShouldMatchDataSet(value = "datasets/org/librecms/contentsection/" - + "ContentItemManagerTest/after-create-contentitem.xml", - excludeColumns = {"categorization_id", - "lifecycle_id", - "object_id", - "object_order", - "phase_id", - "task_id", - "uuid", - "workflow_id" - }) + @ShouldMatchDataSet( + value = "datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/after-create-contentitem.xml", + excludeColumns = {"categorization_id", + "lifecycle_id", + "object_id", + "object_order", + "phase_id", + "task_id", + "uuid", + "workflow_id" + }) public void createContentItem() { final ContentSection section = sectionRepo.findByLabel("info"); final Category folder = section.getRootDocumentsFolder(); @@ -247,25 +266,375 @@ public class ContentItemManagerTest { workflowCount, is(3L)); } - // Create content item type not in content section - // Create content item name null - // Create content item name empty - // Create content item folder null - // Create content item folder no a folder - // Create content item with lifecycle and workflow - // Create content item with lifecycle and workflow type not in content section - // Create content item with lifecycle and workflow name null + /** + * Checks if an {@link IllegalArgumentException} is thrown when the content + * type of the item to create is not registered with the provided content + * section. + */ + @Test(expected = IllegalArgumentException.class) + @InSequence(1200) + @UsingDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/data.xml") + @ShouldMatchDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/data.xml") + @ShouldThrowException(IllegalArgumentException.class) + public void createItemTypeNotInSection() { + final ContentSection section = sectionRepo.findByLabel("info"); + final Category folder = section.getRootDocumentsFolder(); + + itemManager.createContentItem("Test", section, folder, Event.class); + } + + @Test(expected = IllegalArgumentException.class) + @InSequence(1300) + @UsingDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/data.xml") + @ShouldMatchDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/data.xml") + @ShouldThrowException(IllegalArgumentException.class) + public void createItemNameIsNull() { + final ContentSection section = sectionRepo.findByLabel("info"); + final Category folder = section.getRootDocumentsFolder(); + + itemManager.createContentItem(null, section, folder, Article.class); + } + + @Test(expected = IllegalArgumentException.class) + @InSequence(1400) + @UsingDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/data.xml") + @ShouldMatchDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/data.xml") + @ShouldThrowException(IllegalArgumentException.class) + public void createItemNameIsEmpty() { + final ContentSection section = sectionRepo.findByLabel("info"); + final Category folder = section.getRootDocumentsFolder(); + + itemManager.createContentItem("", section, folder, Article.class); + } + + @Test(expected = IllegalArgumentException.class) + @InSequence(1500) + @UsingDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/data.xml") + @ShouldMatchDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/data.xml") + @ShouldThrowException(IllegalArgumentException.class) + public void createItemFolderIsNull() { + final ContentSection section = sectionRepo.findByLabel("info"); + + itemManager.createContentItem("Test", section, null, Article.class); + } + + @Test + @InSequence(2100) + @UsingDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/data.xml") + @ShouldMatchDataSet( + value = "datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/" + + "after-create-contentitem-with-lifecycle-and-workflow.xml", + excludeColumns = {"categorization_id", + "lifecycle_id", + "object_id", + "object_order", + "phase_id", + "task_id", + "uuid", + "workflow_id" + }) + public void createContentItemWithLifecycleAndWorkflow() { + final ContentSection section = sectionRepo.findByLabel("info"); + final Category folder = section.getRootDocumentsFolder(); + + final WorkflowTemplate workflowTemplate = workflowTemplateRepo + .findById(-110L); + final LifecycleDefinition lifecycleDefinition = lifecycleDefinitionRepo + .findById(-210L); + + final Article article = itemManager.createContentItem( + "new-article", + section, + folder, + workflowTemplate, + lifecycleDefinition, + Article.class); + + assertThat("DisplayName has not the expected value.", + article.getDisplayName(), is(equalTo("new-article"))); + final Locale locale = new Locale("en"); + assertThat("Name has not the expected value.", + article.getName().getValue(locale), + is(equalTo("new-article"))); + assertThat("lifecycle was not added to content item.", + article.getLifecycle(), is(not(nullValue()))); + assertThat("workflow was not added to content item.", + article.getWorkflow(), is(not(nullValue()))); + + final TypedQuery query = entityManager.createQuery( + "SELECT COUNT(w) FROM Workflow w", Long.class); + final long workflowCount = query.getSingleResult(); + assertThat("Expected three workflows in database.", + workflowCount, is(3L)); + } + + /** + * Checks if an {@link IllegalArgumentException} is thrown when the content + * type of the item to create is not registered with the provided content + * section. + */ + @Test(expected = IllegalArgumentException.class) + @InSequence(2200) + @UsingDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/data.xml") + @ShouldMatchDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/data.xml") + @ShouldThrowException(IllegalArgumentException.class) + public void createItemTypeNotInSectionWithLifecycleAndWorkflow() { + final ContentSection section = sectionRepo.findByLabel("info"); + final Category folder = section.getRootDocumentsFolder(); + + final WorkflowTemplate workflowTemplate = workflowTemplateRepo + .findById(-110L); + final LifecycleDefinition lifecycleDefinition = lifecycleDefinitionRepo + .findById(-210L); + + itemManager.createContentItem("Test", + section, + folder, + workflowTemplate, + lifecycleDefinition, + Event.class); + } + + @Test(expected = IllegalArgumentException.class) + @InSequence(2300) + @UsingDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/data.xml") + @ShouldMatchDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/data.xml") + @ShouldThrowException(IllegalArgumentException.class) + public void createItemNameIsNullWithLifecycleAndWorkflow() { + final ContentSection section = sectionRepo.findByLabel("info"); + final Category folder = section.getRootDocumentsFolder(); + + final WorkflowTemplate workflowTemplate = workflowTemplateRepo + .findById(-110L); + final LifecycleDefinition lifecycleDefinition = lifecycleDefinitionRepo + .findById(-210L); + + itemManager.createContentItem(null, + section, + folder, + workflowTemplate, + lifecycleDefinition, + Article.class); + } + + @Test(expected = IllegalArgumentException.class) + @InSequence(2400) + @UsingDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/data.xml") + @ShouldMatchDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/data.xml") + @ShouldThrowException(IllegalArgumentException.class) + public void createItemNameIsNoWorkflow() { + final ContentSection section = sectionRepo.findByLabel("info"); + final Category folder = section.getRootDocumentsFolder(); + + final LifecycleDefinition lifecycleDefinition = lifecycleDefinitionRepo + .findById(-210L); + + itemManager.createContentItem(null, + section, + folder, + null, + lifecycleDefinition, + Article.class); + } + // Create content item with lifecycle and workflow name empty - // Create content item with lifecycle and workflow folder null - // Create content item with lifecycle and workflow folder no a folder - // Move item - // Move item item null - // Move item folder null - // Move item folder not a folder - // copy item - // copy item item null - // copy item folder null - // copy item folder not a folder + @Test(expected = IllegalArgumentException.class) + @InSequence(2500) + @UsingDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/data.xml") + @ShouldMatchDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/data.xml") + @ShouldThrowException(IllegalArgumentException.class) + public void createItemNoLifecycle() { + final ContentSection section = sectionRepo.findByLabel("info"); + final Category folder = section.getRootDocumentsFolder(); + + final WorkflowTemplate workflowTemplate = workflowTemplateRepo + .findById(-110L); + + itemManager.createContentItem(null, + section, + folder, + workflowTemplate, + null, + Article.class); + } + + @Test(expected = IllegalArgumentException.class) + @InSequence(2600) + @UsingDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/data.xml") + @ShouldMatchDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/data.xml") + @ShouldThrowException(IllegalArgumentException.class) + public void createItemFolderIsNullWithLifecycleAndWorkflow() { + final ContentSection section = sectionRepo.findByLabel("info"); + + final WorkflowTemplate workflowTemplate = workflowTemplateRepo + .findById(-110L); + final LifecycleDefinition lifecycleDefinition = lifecycleDefinitionRepo + .findById(-210L); + + itemManager.createContentItem("Test", + section, + null, + workflowTemplate, + lifecycleDefinition, + Article.class); + } + + @Test + @InSequence(3100) + @UsingDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/move-before.xml") + @ShouldMatchDataSet( + value = "datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/move-after.xml", + excludeColumns = {"categorization_id", + "lifecycle_id", + "object_id", + "object_order", + "phase_id", + "task_id", + "uuid", + "workflow_id" + }) + public void moveItem() { + final Optional item = itemRepo.findById(-10100L); + assertThat(item.isPresent(), is(true)); + + final Category targetFolder = categoryRepo.findById(-2120L); + assertThat(targetFolder, is(not(nullValue()))); + + itemManager.move(item.get(), targetFolder); + } + + @Test(expected = IllegalArgumentException.class) + @InSequence(3200) + @UsingDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/move-before.xml") + @ShouldMatchDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/move-before.xml") + @ShouldThrowException(IllegalArgumentException.class) + public void moveItemNull() { + final Category targetFolder = categoryRepo.findById(-2120L); + assertThat(targetFolder, is(not(nullValue()))); + + itemManager.move(null, targetFolder); + } + + @Test(expected = IllegalArgumentException.class) + @InSequence(3200) + @UsingDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/move-before.xml") + @ShouldMatchDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/move-before.xml") + @ShouldThrowException(IllegalArgumentException.class) + public void moveItemFolderNull() { + final Optional item = itemRepo.findById(-10100L); + assertThat(item.isPresent(), is(true)); + + itemManager.move(item.get(), null); + } + + @Test + @InSequence(4100) + @UsingDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/move-before.xml") + @ShouldMatchDataSet( + value = "datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/copy-to-other-folder-after.xml", + excludeColumns = {"categorization_id", + "lifecycle_id", + "object_id", + "object_order", + "phase_id", + "task_id", + "uuid", + "workflow_id" + }) + public void copyToOtherFolder() { + final Optional item = itemRepo.findById(-10100L); + assertThat(item.isPresent(), is(true)); + + final Category targetFolder = categoryRepo.findById(-2120L); + assertThat(targetFolder, is(not(nullValue()))); + + itemManager.copy(item.get(), targetFolder); + } + + @Test + @InSequence(4200) + @UsingDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/move-before.xml") + @ShouldMatchDataSet( + value = "datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/copy-to-same-folder-after.xml", + excludeColumns = {"categorization_id", + "lifecycle_id", + "object_id", + "object_order", + "phase_id", + "task_id", + "uuid", + "workflow_id" + }) + public void copyToSameFolder() { + final Optional item = itemRepo.findById(-10100L); + assertThat(item.isPresent(), is(true)); + + final Category targetFolder = categoryRepo.findById(-2110L); + assertThat(targetFolder, is(not(nullValue()))); + + itemManager.copy(item.get(), targetFolder); + } + + @Test(expected = IllegalArgumentException.class) + @InSequence(4100) + @UsingDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/move-before.xml") + @ShouldMatchDataSet( + value = "datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/move-before.xml") + @ShouldThrowException(IllegalArgumentException.class) + public void copyItemNull() { + final Category targetFolder = categoryRepo.findById(-2120L); + assertThat(targetFolder, is(not(nullValue()))); + + itemManager.copy(null, targetFolder); + } + + @Test(expected = IllegalArgumentException.class) + @InSequence(4100) + @UsingDataSet("datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/move-before.xml") + @ShouldMatchDataSet( + value = "datasets/org/librecms/contentsection/" + + "ContentItemManagerTest/move-before.xml") + @ShouldThrowException(IllegalArgumentException.class) + public void copyItemToFolderNull() { + final Optional item = itemRepo.findById(-10100L); + assertThat(item.isPresent(), is(true)); + + itemManager.copy(item.get(), null); + } + // publish item (draft) // publish item (live) // publish item null diff --git a/ccm-cms/src/test/java/org/librecms/contentsection/DatasetsTest.java b/ccm-cms/src/test/java/org/librecms/contentsection/DatasetsTest.java index 41c73ee70..0b00f10a6 100644 --- a/ccm-cms/src/test/java/org/librecms/contentsection/DatasetsTest.java +++ b/ccm-cms/src/test/java/org/librecms/contentsection/DatasetsTest.java @@ -50,7 +50,12 @@ public class DatasetsTest extends DatasetsVerifier { "/datasets/org/librecms/contentsection/ContentSectionManagerTest/after-rename.xml", "/datasets/org/librecms/contentsection/ContentItemRepositoryTest/data.xml", "/datasets/org/librecms/contentsection/ContentItemManagerTest/data.xml", - "/datasets/org/librecms/contentsection/ContentItemManagerTest/after-create-contentitem.xml"}); + "/datasets/org/librecms/contentsection/ContentItemManagerTest/after-create-contentitem.xml", + "/datasets/org/librecms/contentsection/ContentItemManagerTest/after-create-contentitem-with-lifecycle-and-workflow.xml", + "/datasets/org/librecms/contentsection/ContentItemManagerTest/move-before.xml", + "/datasets/org/librecms/contentsection/ContentItemManagerTest/move-after.xml", + "/datasets/org/librecms/contentsection/ContentItemManagerTest/copy-to-other-folder-after.xml", + "/datasets/org/librecms/contentsection/ContentItemManagerTest/copy-to-same-folder-after.xml"}); } public DatasetsTest(final String datasetPath) { diff --git a/ccm-cms/src/test/resources/datasets/org/librecms/contentsection/ContentItemManagerTest/after-create-contentitem-with-lifecycle-and-workflow.xml b/ccm-cms/src/test/resources/datasets/org/librecms/contentsection/ContentItemManagerTest/after-create-contentitem-with-lifecycle-and-workflow.xml new file mode 100644 index 000000000..593a90164 --- /dev/null +++ b/ccm-cms/src/test/resources/datasets/org/librecms/contentsection/ContentItemManagerTest/after-create-contentitem-with-lifecycle-and-workflow.xml @@ -0,0 +1,527 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ccm-cms/src/test/resources/datasets/org/librecms/contentsection/ContentItemManagerTest/copy-to-other-folder-after.xml b/ccm-cms/src/test/resources/datasets/org/librecms/contentsection/ContentItemManagerTest/copy-to-other-folder-after.xml new file mode 100644 index 000000000..274cdbccd --- /dev/null +++ b/ccm-cms/src/test/resources/datasets/org/librecms/contentsection/ContentItemManagerTest/copy-to-other-folder-after.xml @@ -0,0 +1,530 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ccm-cms/src/test/resources/datasets/org/librecms/contentsection/ContentItemManagerTest/copy-to-same-folder-after.xml b/ccm-cms/src/test/resources/datasets/org/librecms/contentsection/ContentItemManagerTest/copy-to-same-folder-after.xml new file mode 100644 index 000000000..829565188 --- /dev/null +++ b/ccm-cms/src/test/resources/datasets/org/librecms/contentsection/ContentItemManagerTest/copy-to-same-folder-after.xml @@ -0,0 +1,531 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ccm-cms/src/test/resources/datasets/org/librecms/contentsection/ContentItemManagerTest/move-after.xml b/ccm-cms/src/test/resources/datasets/org/librecms/contentsection/ContentItemManagerTest/move-after.xml new file mode 100644 index 000000000..dda48ec87 --- /dev/null +++ b/ccm-cms/src/test/resources/datasets/org/librecms/contentsection/ContentItemManagerTest/move-after.xml @@ -0,0 +1,506 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ccm-cms/src/test/resources/datasets/org/librecms/contentsection/ContentItemManagerTest/move-before.xml b/ccm-cms/src/test/resources/datasets/org/librecms/contentsection/ContentItemManagerTest/move-before.xml new file mode 100644 index 000000000..2fb8d30c0 --- /dev/null +++ b/ccm-cms/src/test/resources/datasets/org/librecms/contentsection/ContentItemManagerTest/move-before.xml @@ -0,0 +1,505 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +