CCM NG/ccm-cms: ItemAttachmentManager#unattach
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4426 8810af33-2d31-482b-a856-94f89814c4dfpull/2/head
parent
2c1dc748fd
commit
0e8fe19efd
|
|
@ -49,15 +49,22 @@ import static org.librecms.CmsConstants.*;
|
||||||
@Audited
|
@Audited
|
||||||
@NamedQueries({
|
@NamedQueries({
|
||||||
@NamedQuery(
|
@NamedQuery(
|
||||||
name = "ItemAttachment.countByAssetIdAndList",
|
name = "ItemAttachment.countByAssetIdAndList",
|
||||||
query = "SELECT COUNT(i) FROM ItemAttachment i "
|
query = "SELECT COUNT(i) FROM ItemAttachment i "
|
||||||
+ "WHERE i.asset = :asset "
|
+ "WHERE i.asset = :asset "
|
||||||
+ "AND i.attachmentList = :attachmentList")
|
+ "AND i.attachmentList = :attachmentList")
|
||||||
|
,
|
||||||
|
@NamedQuery(
|
||||||
|
name = "ItemAttachment.findByAssetByAndList",
|
||||||
|
query = "SELECT i FROM ItemAttachment i "
|
||||||
|
+ "WHERE i.asset = :asset "
|
||||||
|
+ "AND i.attachmentList = :attachmentList"
|
||||||
|
)
|
||||||
})
|
})
|
||||||
public class ItemAttachment<T extends Asset>
|
public class ItemAttachment<T extends Asset>
|
||||||
implements Comparable<ItemAttachment<?>>,
|
implements Comparable<ItemAttachment<?>>,
|
||||||
Identifiable,
|
Identifiable,
|
||||||
Serializable {
|
Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -9005379413315191984L;
|
private static final long serialVersionUID = -9005379413315191984L;
|
||||||
|
|
||||||
|
|
@ -150,7 +157,7 @@ public class ItemAttachment<T extends Asset>
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int hash = 3;
|
int hash = 3;
|
||||||
hash
|
hash
|
||||||
= 71 * hash + (int) (attachmentId ^ (attachmentId >>> 32));
|
= 71 * hash + (int) (attachmentId ^ (attachmentId >>> 32));
|
||||||
hash = 71 * hash + Objects.hashCode(uuid);
|
hash = 71 * hash + Objects.hashCode(uuid);
|
||||||
hash = 71 * hash + Objects.hashCode(asset);
|
hash = 71 * hash + Objects.hashCode(asset);
|
||||||
hash = 71 * hash + (int) (sortKey ^ (sortKey >>> 32));
|
hash = 71 * hash + (int) (sortKey ^ (sortKey >>> 32));
|
||||||
|
|
@ -195,11 +202,11 @@ public class ItemAttachment<T extends Asset>
|
||||||
|
|
||||||
public String toString(final String data) {
|
public String toString(final String data) {
|
||||||
return String.format("%s{ "
|
return String.format("%s{ "
|
||||||
+ "attachmentId = %d, "
|
+ "attachmentId = %d, "
|
||||||
+ "uuid = %s, "
|
+ "uuid = %s, "
|
||||||
+ "asset = { %s }, "
|
+ "asset = { %s }, "
|
||||||
+ "sortKey = %d%s"
|
+ "sortKey = %d%s"
|
||||||
+ " }",
|
+ " }",
|
||||||
super.toString(),
|
super.toString(),
|
||||||
attachmentId,
|
attachmentId,
|
||||||
uuid,
|
uuid,
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
*/
|
*/
|
||||||
package org.librecms.contentsection;
|
package org.librecms.contentsection;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import org.libreccm.security.AuthorizationRequired;
|
import org.libreccm.security.AuthorizationRequired;
|
||||||
import org.libreccm.security.RequiresPrivilege;
|
import org.libreccm.security.RequiresPrivilege;
|
||||||
import org.librecms.contentsection.privileges.ItemPrivileges;
|
import org.librecms.contentsection.privileges.ItemPrivileges;
|
||||||
|
|
@ -44,18 +45,21 @@ public class ItemAttachmentManager {
|
||||||
@Inject
|
@Inject
|
||||||
private AssetRepository assetRepo;
|
private AssetRepository assetRepo;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private AssetManager assetManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the provided {@link Asset} to the provided {@link AttachmentList}.
|
* Adds the provided {@link Asset} to the provided {@link AttachmentList}.
|
||||||
*
|
*
|
||||||
* @param asset The {@link Asset} to add.
|
* @param asset The {@link Asset} to add.
|
||||||
* @param attachmentList The attachment list to which the asset is added.
|
* @param attachmentList The attachment list to which the asset is added.
|
||||||
*/
|
*/
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
@AuthorizationRequired
|
@AuthorizationRequired
|
||||||
public void attachAsset(
|
public void attachAsset(
|
||||||
final Asset asset,
|
final Asset asset,
|
||||||
@RequiresPrivilege(ItemPrivileges.EDIT)
|
@RequiresPrivilege(ItemPrivileges.EDIT)
|
||||||
final AttachmentList attachmentList) {
|
final AttachmentList attachmentList) {
|
||||||
|
|
||||||
if (asset == null) {
|
if (asset == null) {
|
||||||
throw new IllegalArgumentException("Can't attach asset null.");
|
throw new IllegalArgumentException("Can't attach asset null.");
|
||||||
|
|
@ -63,7 +67,7 @@ public class ItemAttachmentManager {
|
||||||
|
|
||||||
if (attachmentList == null) {
|
if (attachmentList == null) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
"Can't attach an asset to attachment list null.");
|
"Can't attach an asset to attachment list null.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// For shared assets (we assume that every asset already in the database
|
// For shared assets (we assume that every asset already in the database
|
||||||
|
|
@ -72,7 +76,7 @@ public class ItemAttachmentManager {
|
||||||
saveNonSharedAsset(asset);
|
saveNonSharedAsset(asset);
|
||||||
} else {
|
} else {
|
||||||
final TypedQuery<Long> countQuery = entityManager.createNamedQuery(
|
final TypedQuery<Long> countQuery = entityManager.createNamedQuery(
|
||||||
"ItemAttachment.countByAssetIdAndList", Long.class);
|
"ItemAttachment.countByAssetIdAndList", Long.class);
|
||||||
countQuery.setParameter("asset", asset);
|
countQuery.setParameter("asset", asset);
|
||||||
countQuery.setParameter("attachmentList", attachmentList);
|
countQuery.setParameter("attachmentList", attachmentList);
|
||||||
|
|
||||||
|
|
@ -99,6 +103,7 @@ public class ItemAttachmentManager {
|
||||||
@Transactional(Transactional.TxType.REQUIRES_NEW)
|
@Transactional(Transactional.TxType.REQUIRES_NEW)
|
||||||
private void saveNonSharedAsset(final Asset asset) {
|
private void saveNonSharedAsset(final Asset asset) {
|
||||||
assetRepo.save(asset);
|
assetRepo.save(asset);
|
||||||
|
entityManager.flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -106,22 +111,45 @@ public class ItemAttachmentManager {
|
||||||
* {@link AttachmentList}. If the asset is a non shared asset the asset is
|
* {@link AttachmentList}. If the asset is a non shared asset the asset is
|
||||||
* deleted.
|
* deleted.
|
||||||
*
|
*
|
||||||
* @param asset The {@link Asset} to remove.
|
* @param asset The {@link Asset} to remove.
|
||||||
* @param attachmentList The attachment list to which the asset is removed
|
* @param attachmentList The attachment list to which the asset is removed
|
||||||
* from.
|
* from.
|
||||||
*/
|
*/
|
||||||
public void unattachAsset(final Asset asset,
|
public void unattachAsset(final Asset asset,
|
||||||
final AttachmentList attachmentList) {
|
final AttachmentList attachmentList) {
|
||||||
throw new UnsupportedOperationException("Not implemented yet");
|
final TypedQuery<Long> countQuery = entityManager.createNamedQuery(
|
||||||
|
"ItemAttachment.countByAssetIdAndList", Long.class);
|
||||||
|
countQuery.setParameter("asset", asset);
|
||||||
|
countQuery.setParameter("attachmentList", attachmentList);
|
||||||
|
|
||||||
|
final long count = countQuery.getSingleResult();
|
||||||
|
|
||||||
|
if (count == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final TypedQuery<ItemAttachment> query = entityManager
|
||||||
|
.createNamedQuery("ItemAttachment.findByAssetByAndList",
|
||||||
|
ItemAttachment.class);
|
||||||
|
query.setParameter("asset", asset);
|
||||||
|
query.setParameter("attachmentList", attachmentList);
|
||||||
|
|
||||||
|
final List<ItemAttachment> attachments = query.getResultList();
|
||||||
|
attachments.forEach((attachment) -> entityManager.remove(attachment));
|
||||||
|
|
||||||
|
if (!assetManager.isShared(asset)) {
|
||||||
|
// assetRepo.delete(asset);
|
||||||
|
entityManager.remove(asset);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Moves the {@link Asset} one position up in the provided
|
* Moves the {@link Asset} one position up in the provided
|
||||||
* {@link AttachmentList}.
|
* {@link AttachmentList}.
|
||||||
*
|
*
|
||||||
* @param asset The asset to move up. If the asset is not part of
|
* @param asset The asset to move up. If the asset is not part of the
|
||||||
* the provided {@link AttachmentList} an
|
* provided {@link AttachmentList} an {@link IllegalArgumentException} is
|
||||||
* {@link IllegalArgumentException} is thrown.
|
* thrown.
|
||||||
* @param attachmentList The attachment list in which the item is moved.
|
* @param attachmentList The attachment list in which the item is moved.
|
||||||
*/
|
*/
|
||||||
public void moveUp(final Asset asset,
|
public void moveUp(final Asset asset,
|
||||||
|
|
@ -133,9 +161,9 @@ public class ItemAttachmentManager {
|
||||||
* Moves the {@link Asset} one position down in the provided
|
* Moves the {@link Asset} one position down in the provided
|
||||||
* {@link AttachmentList}.
|
* {@link AttachmentList}.
|
||||||
*
|
*
|
||||||
* @param asset The asset to move down. If the asset is not part of
|
* @param asset The asset to move down. If the asset is not part of the
|
||||||
* the provided {@link AttachmentList} an
|
* provided {@link AttachmentList} an {@link IllegalArgumentException} is
|
||||||
* {@link IllegalArgumentException} is thrown.
|
* thrown.
|
||||||
* @param attachmentList The attachment list in which the item is moved.
|
* @param attachmentList The attachment list in which the item is moved.
|
||||||
*/
|
*/
|
||||||
public void moveDown(final Asset asset,
|
public void moveDown(final Asset asset,
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,9 @@ public class DatasetsTest extends DatasetsVerifier {
|
||||||
|
|
||||||
"/datasets/org/librecms/contentsection/ItemAttachmentManagerTest/data.xml",
|
"/datasets/org/librecms/contentsection/ItemAttachmentManagerTest/data.xml",
|
||||||
"/datasets/org/librecms/contentsection/ItemAttachmentManagerTest/after-attach-shared.xml",
|
"/datasets/org/librecms/contentsection/ItemAttachmentManagerTest/after-attach-shared.xml",
|
||||||
"/datasets/org/librecms/contentsection/ItemAttachmentManagerTest/after-attach-nonshared.xml",});
|
"/datasets/org/librecms/contentsection/ItemAttachmentManagerTest/after-attach-nonshared.xml",
|
||||||
|
"/datasets/org/librecms/contentsection/ItemAttachmentManagerTest/after-unattach-nonshared.xml",
|
||||||
|
"/datasets/org/librecms/contentsection/ItemAttachmentManagerTest/after-unattach-nonshared.xml",});
|
||||||
}
|
}
|
||||||
|
|
||||||
public DatasetsTest(final String datasetPath) {
|
public DatasetsTest(final String datasetPath) {
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ import static org.junit.Assert.*;
|
||||||
@org.junit.experimental.categories.Category(IntegrationTest.class)
|
@org.junit.experimental.categories.Category(IntegrationTest.class)
|
||||||
@RunWith(Arquillian.class)
|
@RunWith(Arquillian.class)
|
||||||
@PersistenceTest
|
@PersistenceTest
|
||||||
@Transactional(TransactionMode.COMMIT)
|
//@Transactional(TransactionMode.COMMIT)
|
||||||
@CreateSchema({"create_ccm_cms_schema.sql"})
|
@CreateSchema({"create_ccm_cms_schema.sql"})
|
||||||
public class ItemAttachmentManagerTest {
|
public class ItemAttachmentManagerTest {
|
||||||
|
|
||||||
|
|
@ -105,60 +105,60 @@ public class ItemAttachmentManagerTest {
|
||||||
@Deployment
|
@Deployment
|
||||||
public static WebArchive createDeployment() {
|
public static WebArchive createDeployment() {
|
||||||
return ShrinkWrap
|
return ShrinkWrap
|
||||||
.create(WebArchive.class,
|
.create(WebArchive.class,
|
||||||
"LibreCCM-org.librecms.assets.AssetManagerTest.war")
|
"LibreCCM-org.librecms.assets.AssetManagerTest.war")
|
||||||
.addPackage(org.libreccm.auditing.CcmRevision.class.getPackage())
|
.addPackage(org.libreccm.auditing.CcmRevision.class.getPackage()).
|
||||||
.addPackage(org.libreccm.categorization.Categorization.class
|
addPackage(org.libreccm.categorization.Categorization.class
|
||||||
.getPackage())
|
.getPackage())
|
||||||
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
|
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
|
||||||
.addPackage(org.libreccm.configuration.Configuration.class
|
.addPackage(org.libreccm.configuration.Configuration.class
|
||||||
.getPackage())
|
.getPackage())
|
||||||
.addPackage(org.libreccm.core.CcmCore.class.getPackage())
|
.addPackage(org.libreccm.core.CcmCore.class.getPackage())
|
||||||
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
|
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
|
||||||
.getPackage())
|
.getPackage())
|
||||||
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
|
.addPackage(org.libreccm.jpa.utils.MimeTypeConverter.class
|
||||||
.getPackage())
|
.getPackage())
|
||||||
.addPackage(org.libreccm.l10n.LocalizedString.class
|
.addPackage(org.libreccm.l10n.LocalizedString.class
|
||||||
.getPackage())
|
.getPackage())
|
||||||
.addPackage(org.libreccm.security.Permission.class.getPackage())
|
.addPackage(org.libreccm.security.Permission.class.getPackage())
|
||||||
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
|
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
|
||||||
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
|
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
|
||||||
.addPackage(com.arsdigita.bebop.Component.class.getPackage())
|
.addPackage(com.arsdigita.bebop.Component.class.getPackage())
|
||||||
.addPackage(com.arsdigita.bebop.util.BebopConstants.class
|
.addPackage(com.arsdigita.bebop.util.BebopConstants.class
|
||||||
.getPackage())
|
.getPackage())
|
||||||
.addClass(com.arsdigita.kernel.KernelConfig.class)
|
.addClass(com.arsdigita.kernel.KernelConfig.class)
|
||||||
.addClass(com.arsdigita.runtime.CCMResourceManager.class)
|
.addClass(com.arsdigita.runtime.CCMResourceManager.class)
|
||||||
.addClass(
|
.addClass(
|
||||||
com.arsdigita.ui.admin.applications.AbstractAppInstanceForm.class)
|
com.arsdigita.ui.admin.applications.AbstractAppInstanceForm.class).
|
||||||
.addClass(
|
addClass(
|
||||||
com.arsdigita.ui.admin.applications.AbstractAppSettingsPane.class)
|
com.arsdigita.ui.admin.applications.AbstractAppSettingsPane.class).
|
||||||
.addClass(
|
addClass(
|
||||||
com.arsdigita.ui.admin.applications.DefaultApplicationInstanceForm.class)
|
com.arsdigita.ui.admin.applications.DefaultApplicationInstanceForm.class).
|
||||||
.addClass(
|
addClass(
|
||||||
com.arsdigita.ui.admin.applications.DefaultApplicationSettingsPane.class)
|
com.arsdigita.ui.admin.applications.DefaultApplicationSettingsPane.class).
|
||||||
.addClass(com.arsdigita.cms.dispatcher.ItemResolver.class)
|
addClass(com.arsdigita.cms.dispatcher.ItemResolver.class)
|
||||||
.addPackage(com.arsdigita.util.Lockable.class.getPackage())
|
.addPackage(com.arsdigita.util.Lockable.class.getPackage())
|
||||||
.addPackage(com.arsdigita.web.BaseServlet.class.getPackage())
|
.addPackage(com.arsdigita.web.BaseServlet.class.getPackage())
|
||||||
.addPackage(org.librecms.Cms.class.getPackage())
|
.addPackage(org.librecms.Cms.class.getPackage())
|
||||||
.addPackage(org.librecms.assets.BinaryAsset.class.getPackage())
|
.addPackage(org.librecms.assets.BinaryAsset.class.getPackage())
|
||||||
.addPackage(org.librecms.contentsection.Asset.class.getPackage())
|
.addPackage(org.librecms.contentsection.Asset.class.getPackage()).
|
||||||
.addPackage(org.librecms.lifecycle.Lifecycle.class.getPackage())
|
addPackage(org.librecms.lifecycle.Lifecycle.class.getPackage())
|
||||||
.addPackage(org.librecms.contentsection.ContentSection.class
|
.addPackage(org.librecms.contentsection.ContentSection.class
|
||||||
.getPackage())
|
.getPackage())
|
||||||
.addPackage(org.librecms.contenttypes.Article.class.getPackage()).
|
.addPackage(org.librecms.contenttypes.Article.class.getPackage()).
|
||||||
addClass(com.arsdigita.kernel.security.SecurityConfig.class)
|
addClass(com.arsdigita.kernel.security.SecurityConfig.class)
|
||||||
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
|
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
|
||||||
.getPackage())
|
.getPackage())
|
||||||
// .addAsLibraries(getModuleDependencies())
|
// .addAsLibraries(getModuleDependencies())
|
||||||
.addAsLibraries(getCcmCoreDependencies())
|
.addAsLibraries(getCcmCoreDependencies())
|
||||||
.addAsResource("configs/shiro.ini", "shiro.ini")
|
.addAsResource("configs/shiro.ini", "shiro.ini")
|
||||||
.addAsResource(
|
.addAsResource(
|
||||||
"configs/org/librecms/contentsection/ContentItemManagerTest/log4j2.xml",
|
"configs/org/librecms/contentsection/ContentItemManagerTest/log4j2.xml",
|
||||||
"log4j2.xml")
|
"log4j2.xml")
|
||||||
.addAsResource("test-persistence.xml",
|
.addAsResource("test-persistence.xml",
|
||||||
"META-INF/persistence.xml")
|
"META-INF/persistence.xml")
|
||||||
.addAsWebInfResource("test-web.xml", "web.xml")
|
.addAsWebInfResource("test-web.xml", "web.xml")
|
||||||
.addAsWebInfResource(EmptyAsset.INSTANCE, "WEB-INF/beans.xml");
|
.addAsWebInfResource(EmptyAsset.INSTANCE, "WEB-INF/beans.xml");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -193,13 +193,13 @@ public class ItemAttachmentManagerTest {
|
||||||
@Test
|
@Test
|
||||||
@InSequence(100)
|
@InSequence(100)
|
||||||
@UsingDataSet("datasets/org/librecms/contentsection/"
|
@UsingDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
@ShouldMatchDataSet(
|
@ShouldMatchDataSet(
|
||||||
value = "datasets/org/librecms/contentsection/"
|
value = "datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/after-attach-nonshared.xml",
|
+ "ItemAttachmentManagerTest/after-attach-nonshared.xml",
|
||||||
excludeColumns = {"timestamp",
|
excludeColumns = {"timestamp",
|
||||||
"uuid",
|
"uuid",
|
||||||
"attachment_id"})
|
"attachment_id"})
|
||||||
public void attachNonSharedAsset() throws MimeTypeParseException {
|
public void attachNonSharedAsset() throws MimeTypeParseException {
|
||||||
final Optional<ContentItem> item = itemRepo.findById(-510L);
|
final Optional<ContentItem> item = itemRepo.findById(-510L);
|
||||||
assertThat(item.isPresent(), is(true));
|
assertThat(item.isPresent(), is(true));
|
||||||
|
|
@ -222,13 +222,13 @@ public class ItemAttachmentManagerTest {
|
||||||
@Test
|
@Test
|
||||||
@InSequence(100)
|
@InSequence(100)
|
||||||
@UsingDataSet("datasets/org/librecms/contentsection/"
|
@UsingDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
@ShouldMatchDataSet(
|
@ShouldMatchDataSet(
|
||||||
value = "datasets/org/librecms/contentsection/"
|
value = "datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/after-attach-shared.xml",
|
+ "ItemAttachmentManagerTest/after-attach-shared.xml",
|
||||||
excludeColumns = {"timestamp",
|
excludeColumns = {"timestamp",
|
||||||
"uuid",
|
"uuid",
|
||||||
"attachment_id"})
|
"attachment_id"})
|
||||||
public void attachSharedAsset() throws MimeTypeParseException {
|
public void attachSharedAsset() throws MimeTypeParseException {
|
||||||
final Optional<ContentItem> item = itemRepo.findById(-510L);
|
final Optional<ContentItem> item = itemRepo.findById(-510L);
|
||||||
assertThat(item.isPresent(), is(true));
|
assertThat(item.isPresent(), is(true));
|
||||||
|
|
@ -248,9 +248,9 @@ public class ItemAttachmentManagerTest {
|
||||||
@Test
|
@Test
|
||||||
@InSequence(110)
|
@InSequence(110)
|
||||||
@UsingDataSet("datasets/org/librecms/contentsection/"
|
@UsingDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
public void attachAssetAlreadyAttached() {
|
public void attachAssetAlreadyAttached() {
|
||||||
final Optional<ContentItem> item = itemRepo.findById(-510L);
|
final Optional<ContentItem> item = itemRepo.findById(-510L);
|
||||||
assertThat(item.isPresent(), is(true));
|
assertThat(item.isPresent(), is(true));
|
||||||
|
|
@ -270,9 +270,9 @@ public class ItemAttachmentManagerTest {
|
||||||
@Test(expected = IllegalArgumentException.class)
|
@Test(expected = IllegalArgumentException.class)
|
||||||
@InSequence(120)
|
@InSequence(120)
|
||||||
@UsingDataSet("datasets/org/librecms/contentsection/"
|
@UsingDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
@ShouldThrowException(IllegalArgumentException.class)
|
@ShouldThrowException(IllegalArgumentException.class)
|
||||||
public void attachAssetNull() {
|
public void attachAssetNull() {
|
||||||
final Optional<ContentItem> item = itemRepo.findById(-510L);
|
final Optional<ContentItem> item = itemRepo.findById(-510L);
|
||||||
|
|
@ -293,9 +293,9 @@ public class ItemAttachmentManagerTest {
|
||||||
@Test(expected = IllegalArgumentException.class)
|
@Test(expected = IllegalArgumentException.class)
|
||||||
@InSequence(130)
|
@InSequence(130)
|
||||||
@UsingDataSet("datasets/org/librecms/contentsection/"
|
@UsingDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
@ShouldThrowException(IllegalArgumentException.class)
|
@ShouldThrowException(IllegalArgumentException.class)
|
||||||
public void attachAssetToListNull() {
|
public void attachAssetToListNull() {
|
||||||
final AttachmentList list = null;
|
final AttachmentList list = null;
|
||||||
|
|
@ -305,18 +305,55 @@ public class ItemAttachmentManagerTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tries to unattach several {@link Asset} using
|
* Tries to unattach a shared {@link Asset} using
|
||||||
* {@link ItemAttachmentManager#unattachAsset(org.librecms.contentsection.Asset, org.librecms.contentsection.AttachmentList)}
|
* {@link ItemAttachmentManager#unattachAsset(org.librecms.contentsection.Asset, org.librecms.contentsection.AttachmentList)}.
|
||||||
* and verifies that non shared assets are deleted.
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
@InSequence(210)
|
@InSequence(210)
|
||||||
@UsingDataSet("datasets/org/librecms/contentsection/"
|
@UsingDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
@ShouldMatchDataSet(
|
||||||
+ "ItemAttachmentManagerTest/after-unattach.xml")
|
value = "datasets/org/librecms/contentsection/"
|
||||||
public void unattachAsset() {
|
+ "ItemAttachmentManagerTest/"
|
||||||
fail("Not implemented yet");
|
+ "after-unattach-shared.xml",
|
||||||
|
excludeColumns = {"timestamp"})
|
||||||
|
public void unattachSharedAsset() {
|
||||||
|
final Asset asset = assetRepo.findById(-610L);
|
||||||
|
final Optional<ContentItem> item = itemRepo.findById(-510L);
|
||||||
|
|
||||||
|
assertThat(asset, is(not(nullValue())));
|
||||||
|
assertThat(item.isPresent(), is(true));
|
||||||
|
|
||||||
|
final AttachmentList list = item.get().getAttachments().get(0);
|
||||||
|
|
||||||
|
attachmentManager.unattachAsset(asset, list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tries to unattach a non shared {@link Asset} using
|
||||||
|
* {@link ItemAttachmentManager#unattachAsset(org.librecms.contentsection.Asset, org.librecms.contentsection.AttachmentList)}
|
||||||
|
* and verifies that assets has been unattached <strong>and</strong>
|
||||||
|
* deleted.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
@InSequence(220)
|
||||||
|
@UsingDataSet("datasets/org/librecms/contentsection/"
|
||||||
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
|
@ShouldMatchDataSet(
|
||||||
|
value = "datasets/org/librecms/contentsection/"
|
||||||
|
+ "ItemAttachmentManagerTest/"
|
||||||
|
+ "after-unattach-nonshared.xml",
|
||||||
|
excludeColumns = {"timestamp"})
|
||||||
|
public void unattachNonSharedAsset() {
|
||||||
|
final Asset asset = assetRepo.findById(-720L);
|
||||||
|
final Optional<ContentItem> item = itemRepo.findById(-510L);
|
||||||
|
|
||||||
|
assertThat(asset, is(not(nullValue())));
|
||||||
|
assertThat(item.isPresent(), is(true));
|
||||||
|
|
||||||
|
final AttachmentList list = item.get().getAttachments().get(0);
|
||||||
|
|
||||||
|
attachmentManager.unattachAsset(asset, list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -328,9 +365,9 @@ public class ItemAttachmentManagerTest {
|
||||||
@Test
|
@Test
|
||||||
@InSequence(220)
|
@InSequence(220)
|
||||||
@UsingDataSet("datasets/org/librecms/contentsection/"
|
@UsingDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
public void unattachAssetNotAttached() {
|
public void unattachAssetNotAttached() {
|
||||||
fail("Not implemented yet");
|
fail("Not implemented yet");
|
||||||
}
|
}
|
||||||
|
|
@ -344,9 +381,9 @@ public class ItemAttachmentManagerTest {
|
||||||
@Test(expected = IllegalArgumentException.class)
|
@Test(expected = IllegalArgumentException.class)
|
||||||
@InSequence(230)
|
@InSequence(230)
|
||||||
@UsingDataSet("datasets/org/librecms/contentsection/"
|
@UsingDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
@ShouldThrowException(IllegalArgumentException.class)
|
@ShouldThrowException(IllegalArgumentException.class)
|
||||||
public void unattachAssetNull() {
|
public void unattachAssetNull() {
|
||||||
fail("Not implemented yet");
|
fail("Not implemented yet");
|
||||||
|
|
@ -361,9 +398,9 @@ public class ItemAttachmentManagerTest {
|
||||||
@Test(expected = IllegalArgumentException.class)
|
@Test(expected = IllegalArgumentException.class)
|
||||||
@InSequence(240)
|
@InSequence(240)
|
||||||
@UsingDataSet("datasets/org/librecms/contentsection/"
|
@UsingDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
@ShouldThrowException(IllegalArgumentException.class)
|
@ShouldThrowException(IllegalArgumentException.class)
|
||||||
public void unattachAssetFromListNull() {
|
public void unattachAssetFromListNull() {
|
||||||
fail("Not implemented yet");
|
fail("Not implemented yet");
|
||||||
|
|
@ -377,9 +414,9 @@ public class ItemAttachmentManagerTest {
|
||||||
@Test
|
@Test
|
||||||
@InSequence(300)
|
@InSequence(300)
|
||||||
@UsingDataSet("datasets/org/librecms/contentsection/"
|
@UsingDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/after-move-up.xml")
|
+ "ItemAttachmentManagerTest/after-move-up.xml")
|
||||||
public void moveUp() {
|
public void moveUp() {
|
||||||
fail("Not implemented yet");
|
fail("Not implemented yet");
|
||||||
}
|
}
|
||||||
|
|
@ -392,9 +429,9 @@ public class ItemAttachmentManagerTest {
|
||||||
@Test
|
@Test
|
||||||
@InSequence(310)
|
@InSequence(310)
|
||||||
@UsingDataSet("datasets/org/librecms/contentsection/"
|
@UsingDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
public void moveUpLast() {
|
public void moveUpLast() {
|
||||||
fail("Not implemented yet");
|
fail("Not implemented yet");
|
||||||
}
|
}
|
||||||
|
|
@ -408,9 +445,9 @@ public class ItemAttachmentManagerTest {
|
||||||
@Test(expected = IllegalArgumentException.class)
|
@Test(expected = IllegalArgumentException.class)
|
||||||
@InSequence(320)
|
@InSequence(320)
|
||||||
@UsingDataSet("datasets/org/librecms/contentsection/"
|
@UsingDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
@ShouldThrowException(IllegalArgumentException.class)
|
@ShouldThrowException(IllegalArgumentException.class)
|
||||||
public void moveUpNull() {
|
public void moveUpNull() {
|
||||||
fail("Not implemented yet");
|
fail("Not implemented yet");
|
||||||
|
|
@ -424,9 +461,9 @@ public class ItemAttachmentManagerTest {
|
||||||
@Test
|
@Test
|
||||||
@InSequence(400)
|
@InSequence(400)
|
||||||
@UsingDataSet("datasets/org/librecms/contentsection/"
|
@UsingDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/after-move-down.xml")
|
+ "ItemAttachmentManagerTest/after-move-down.xml")
|
||||||
public void moveDown() {
|
public void moveDown() {
|
||||||
fail("Not implemented yet");
|
fail("Not implemented yet");
|
||||||
}
|
}
|
||||||
|
|
@ -439,9 +476,9 @@ public class ItemAttachmentManagerTest {
|
||||||
@Test
|
@Test
|
||||||
@InSequence(410)
|
@InSequence(410)
|
||||||
@UsingDataSet("datasets/org/librecms/contentsection/"
|
@UsingDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
public void moveDownFirst() {
|
public void moveDownFirst() {
|
||||||
fail("Not implemented yet");
|
fail("Not implemented yet");
|
||||||
}
|
}
|
||||||
|
|
@ -455,9 +492,9 @@ public class ItemAttachmentManagerTest {
|
||||||
@Test(expected = IllegalArgumentException.class)
|
@Test(expected = IllegalArgumentException.class)
|
||||||
@InSequence(420)
|
@InSequence(420)
|
||||||
@UsingDataSet("datasets/org/librecms/contentsection/"
|
@UsingDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
@ShouldMatchDataSet("datasets/org/librecms/contentsection/"
|
||||||
+ "ItemAttachmentManagerTest/data.xml")
|
+ "ItemAttachmentManagerTest/data.xml")
|
||||||
@ShouldThrowException(IllegalArgumentException.class)
|
@ShouldThrowException(IllegalArgumentException.class)
|
||||||
public void moveDownNull() {
|
public void moveDownNull() {
|
||||||
fail("Not implemented yet");
|
fail("Not implemented yet");
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,9 @@
|
||||||
<property name="qualifiedTableNames">true</property>
|
<property name="qualifiedTableNames">true</property>
|
||||||
</extension>
|
</extension>
|
||||||
|
|
||||||
<!--<extension qualifier="persistence-script">
|
<extension qualifier="persistence-script">
|
||||||
<property name="scriptsToExecuteAfterTest">scripts/pgsql-cleanup.sql</property>
|
<property name="scriptsToExecuteAfterTest">scripts/pgsql-cleanup.sql</property>
|
||||||
</extension>-->
|
</extension>
|
||||||
|
|
||||||
|
|
||||||
</arquillian>
|
</arquillian>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
<ccm_core.ccm_revisions id="0"
|
<ccm_core.ccm_revisions id="0"
|
||||||
timestamp="1451602800" />
|
timestamp="1451602800" />
|
||||||
|
<ccm_core.ccm_revisions id="1"
|
||||||
|
timestamp="1451602800" />
|
||||||
|
|
||||||
<ccm_core.ccm_objects object_id="-100"
|
<ccm_core.ccm_objects object_id="-100"
|
||||||
display_name="info"
|
display_name="info"
|
||||||
|
|
@ -31,9 +33,6 @@
|
||||||
<ccm_core.ccm_objects object_id="-710"
|
<ccm_core.ccm_objects object_id="-710"
|
||||||
display_name="asset510-1a"
|
display_name="asset510-1a"
|
||||||
uuid="cdc1bea7-7d3e-4019-a73c-d00e41efc9d0" />
|
uuid="cdc1bea7-7d3e-4019-a73c-d00e41efc9d0" />
|
||||||
<ccm_core.ccm_objects object_id="-720"
|
|
||||||
display_name="asset510-1b"
|
|
||||||
uuid="71479eae-28bd-446e-82a9-21581192d298" />
|
|
||||||
|
|
||||||
<ccm_core.ccm_objects_aud object_id="-510"
|
<ccm_core.ccm_objects_aud object_id="-510"
|
||||||
rev="0"
|
rev="0"
|
||||||
|
|
@ -58,7 +57,11 @@
|
||||||
<ccm_core.ccm_objects_aud object_id="-720"
|
<ccm_core.ccm_objects_aud object_id="-720"
|
||||||
rev="0"
|
rev="0"
|
||||||
revtype="0"
|
revtype="0"
|
||||||
|
revend="1"
|
||||||
display_name="asset510-1b" />
|
display_name="asset510-1b" />
|
||||||
|
<ccm_core.ccm_objects_aud object_id="-720"
|
||||||
|
rev="1"
|
||||||
|
revtype="2" />
|
||||||
|
|
||||||
<ccm_core.categories object_id="-200"
|
<ccm_core.categories object_id="-200"
|
||||||
unique_id="82014239-9c06-486d-ae8c-4ae47f52a699"
|
unique_id="82014239-9c06-486d-ae8c-4ae47f52a699"
|
||||||
|
|
@ -131,7 +134,6 @@
|
||||||
<ccm_cms.assets object_id="-620" />
|
<ccm_cms.assets object_id="-620" />
|
||||||
<ccm_cms.assets object_id="-630" />
|
<ccm_cms.assets object_id="-630" />
|
||||||
<ccm_cms.assets object_id="-710" />
|
<ccm_cms.assets object_id="-710" />
|
||||||
<ccm_cms.assets object_id="-720" />
|
|
||||||
|
|
||||||
<ccm_cms.assets_aud object_id="-610"
|
<ccm_cms.assets_aud object_id="-610"
|
||||||
rev="0" />
|
rev="0" />
|
||||||
|
|
@ -143,6 +145,8 @@
|
||||||
rev="0" />
|
rev="0" />
|
||||||
<ccm_cms.assets_aud object_id="-720"
|
<ccm_cms.assets_aud object_id="-720"
|
||||||
rev="0" />
|
rev="0" />
|
||||||
|
<ccm_cms.assets_aud object_id="-720"
|
||||||
|
rev="1" />
|
||||||
|
|
||||||
<ccm_cms.asset_titles asset_id="-610"
|
<ccm_cms.asset_titles asset_id="-610"
|
||||||
localized_value="sharedAsset1"
|
localized_value="sharedAsset1"
|
||||||
|
|
@ -156,9 +160,6 @@
|
||||||
<ccm_cms.asset_titles asset_id="-710"
|
<ccm_cms.asset_titles asset_id="-710"
|
||||||
localized_value="asset-510-1a"
|
localized_value="asset-510-1a"
|
||||||
locale="en" />
|
locale="en" />
|
||||||
<ccm_cms.asset_titles asset_id="-720"
|
|
||||||
localized_value="asset-510-1b"
|
|
||||||
locale="en" />
|
|
||||||
|
|
||||||
<ccm_cms.asset_titles_aud asset_id="-610"
|
<ccm_cms.asset_titles_aud asset_id="-610"
|
||||||
rev="0"
|
rev="0"
|
||||||
|
|
@ -183,6 +184,12 @@
|
||||||
<ccm_cms.asset_titles_aud asset_id="-720"
|
<ccm_cms.asset_titles_aud asset_id="-720"
|
||||||
rev="0"
|
rev="0"
|
||||||
revtype="0"
|
revtype="0"
|
||||||
|
revend="1"
|
||||||
|
localized_value="asset-510-1b"
|
||||||
|
locale="en" />
|
||||||
|
<ccm_cms.asset_titles_aud asset_id="-720"
|
||||||
|
rev="1"
|
||||||
|
revtype="2"
|
||||||
localized_value="asset-510-1b"
|
localized_value="asset-510-1b"
|
||||||
locale="en" />
|
locale="en" />
|
||||||
|
|
||||||
|
|
@ -202,10 +209,6 @@
|
||||||
filename="asset-510-1a.pdf"
|
filename="asset-510-1a.pdf"
|
||||||
mime_type="application/pdf"
|
mime_type="application/pdf"
|
||||||
data_size="0" />
|
data_size="0" />
|
||||||
<ccm_cms.binary_assets object_id="-720"
|
|
||||||
filename="asset-510-1b.pdf"
|
|
||||||
mime_type="application/pdf"
|
|
||||||
data_size="0" />
|
|
||||||
|
|
||||||
<ccm_cms.binary_assets_aud object_id="-610"
|
<ccm_cms.binary_assets_aud object_id="-610"
|
||||||
rev="0"
|
rev="0"
|
||||||
|
|
@ -232,12 +235,13 @@
|
||||||
filename="asset-510-1b.pdf"
|
filename="asset-510-1b.pdf"
|
||||||
mime_type="application/pdf"
|
mime_type="application/pdf"
|
||||||
data_size="0" />
|
data_size="0" />
|
||||||
|
<ccm_cms.binary_assets_aud object_id="-720"
|
||||||
|
rev="1" />
|
||||||
|
|
||||||
<ccm_cms.files object_id="-610" />
|
<ccm_cms.files object_id="-610" />
|
||||||
<ccm_cms.files object_id="-620" />
|
<ccm_cms.files object_id="-620" />
|
||||||
<ccm_cms.files object_id="-630" />
|
<ccm_cms.files object_id="-630" />
|
||||||
<ccm_cms.files object_id="-710" />
|
<ccm_cms.files object_id="-710" />
|
||||||
<ccm_cms.files object_id="-720" />
|
|
||||||
|
|
||||||
<ccm_cms.files_aud object_id="-610"
|
<ccm_cms.files_aud object_id="-610"
|
||||||
rev="0" />
|
rev="0" />
|
||||||
|
|
@ -249,6 +253,8 @@
|
||||||
rev="0" />
|
rev="0" />
|
||||||
<ccm_cms.files_aud object_id="-720"
|
<ccm_cms.files_aud object_id="-720"
|
||||||
rev="0" />
|
rev="0" />
|
||||||
|
<ccm_cms.files_aud object_id="-720"
|
||||||
|
rev="1" />
|
||||||
|
|
||||||
<ccm_core.categorizations categorization_id="-30100"
|
<ccm_core.categorizations categorization_id="-30100"
|
||||||
category_id="-200"
|
category_id="-200"
|
||||||
|
|
@ -313,17 +319,18 @@
|
||||||
name="list2"
|
name="list2"
|
||||||
uuid="a0c2ba42-d506-48c0-b7cc-d32b2a031a50"
|
uuid="a0c2ba42-d506-48c0-b7cc-d32b2a031a50"
|
||||||
item_id="-510" />
|
item_id="-510" />
|
||||||
|
<ccm_cms.attachment_lists_aud list_id="-510010"
|
||||||
|
rev="1"
|
||||||
|
revtype="1"
|
||||||
|
name="list1"
|
||||||
|
uuid="209e3f76-1523-4601-84bd-dbae91f4f26d"
|
||||||
|
item_id="-510" />
|
||||||
|
|
||||||
<ccm_cms.attachments attachment_id="-510110"
|
<ccm_cms.attachments attachment_id="-510110"
|
||||||
sort_key="1"
|
sort_key="1"
|
||||||
uuid="de1d8531-df11-4808-9679-9ffa7537ebd1"
|
uuid="de1d8531-df11-4808-9679-9ffa7537ebd1"
|
||||||
asset_id="-710"
|
asset_id="-710"
|
||||||
attachment_list_id="-510010" />
|
attachment_list_id="-510010" />
|
||||||
<ccm_cms.attachments attachment_id="-510120"
|
|
||||||
sort_key="2"
|
|
||||||
uuid="5a34deae-9e3a-41e8-abd8-6a7d10dd9e7d"
|
|
||||||
asset_id="-720"
|
|
||||||
attachment_list_id="-510010" />
|
|
||||||
<ccm_cms.attachments attachment_id="-510130"
|
<ccm_cms.attachments attachment_id="-510130"
|
||||||
sort_key="3"
|
sort_key="3"
|
||||||
uuid="9e34627c-2da9-45fe-aae3-48801bd27cbe"
|
uuid="9e34627c-2da9-45fe-aae3-48801bd27cbe"
|
||||||
|
|
@ -345,6 +352,7 @@
|
||||||
<ccm_cms.attachments_aud attachment_id="-510120"
|
<ccm_cms.attachments_aud attachment_id="-510120"
|
||||||
rev="0"
|
rev="0"
|
||||||
revtype="0"
|
revtype="0"
|
||||||
|
revend="1"
|
||||||
sort_key="2"
|
sort_key="2"
|
||||||
uuid="5a34deae-9e3a-41e8-abd8-6a7d10dd9e7d"
|
uuid="5a34deae-9e3a-41e8-abd8-6a7d10dd9e7d"
|
||||||
asset_id="-720"
|
asset_id="-720"
|
||||||
|
|
@ -370,6 +378,9 @@
|
||||||
uuid="395c43dc-4aea-43e3-a2de-13e10f3a63f7"
|
uuid="395c43dc-4aea-43e3-a2de-13e10f3a63f7"
|
||||||
asset_id="-630"
|
asset_id="-630"
|
||||||
attachment_list_id="-510030" />
|
attachment_list_id="-510030" />
|
||||||
|
<ccm_cms.attachments_aud attachment_id="-510120"
|
||||||
|
rev="1"
|
||||||
|
revtype="2" />
|
||||||
|
|
||||||
</dataset>
|
</dataset>
|
||||||
|
|
||||||
|
|
@ -0,0 +1,402 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<dataset>
|
||||||
|
|
||||||
|
<ccm_core.ccm_revisions id="0"
|
||||||
|
timestamp="1451602800" />
|
||||||
|
<ccm_core.ccm_revisions id="1"
|
||||||
|
timestamp="1451602800" />
|
||||||
|
|
||||||
|
<ccm_core.ccm_objects object_id="-100"
|
||||||
|
display_name="info"
|
||||||
|
uuid="963bcae7-3aeb-4b62-891c-e16c4defa1f2" />
|
||||||
|
<ccm_core.ccm_objects object_id="-200"
|
||||||
|
display_name="info_root"
|
||||||
|
uuid="82014239-9c06-486d-ae8c-4ae47f52a699" />
|
||||||
|
<ccm_core.ccm_objects object_id="-300"
|
||||||
|
display_name="info_assets"
|
||||||
|
uuid="b163f73c-9ac2-44d7-a037-de621f5ca828" />
|
||||||
|
<ccm_core.ccm_objects object_id="-400"
|
||||||
|
display_name="org.librecms.contenttypes.Article"
|
||||||
|
uuid="bd061ab6-9c4f-45ff-ab69-f521008eeac3" />
|
||||||
|
<ccm_core.ccm_objects object_id="-510"
|
||||||
|
display_name="article1"
|
||||||
|
uuid="aed4b402-1180-46c6-b42d-7245f4dca248" />
|
||||||
|
<ccm_core.ccm_objects object_id="-610"
|
||||||
|
display_name="sharedAsset1"
|
||||||
|
uuid="3be6e343-1fc3-47a8-8a39-c729e11b485f" />
|
||||||
|
<ccm_core.ccm_objects object_id="-620"
|
||||||
|
display_name="sharedAsset2"
|
||||||
|
uuid="e6cb989b-021b-4a55-b095-63239a9425b2" />
|
||||||
|
<ccm_core.ccm_objects object_id="-630"
|
||||||
|
display_name="sharedAsset3"
|
||||||
|
uuid="2f66baca-7e5a-4556-a4c5-f9285d71293d" />
|
||||||
|
<ccm_core.ccm_objects object_id="-710"
|
||||||
|
display_name="asset510-1a"
|
||||||
|
uuid="cdc1bea7-7d3e-4019-a73c-d00e41efc9d0" />
|
||||||
|
<ccm_core.ccm_objects object_id="-720"
|
||||||
|
display_name="asset510-1b"
|
||||||
|
uuid="71479eae-28bd-446e-82a9-21581192d298" />
|
||||||
|
|
||||||
|
<ccm_core.ccm_objects_aud object_id="-510"
|
||||||
|
rev="0"
|
||||||
|
revtype="0"
|
||||||
|
display_name="article1" />
|
||||||
|
<ccm_core.ccm_objects_aud object_id="-610"
|
||||||
|
rev="0"
|
||||||
|
revtype="0"
|
||||||
|
display_name="sharedAsset1" />
|
||||||
|
<ccm_core.ccm_objects_aud object_id="-620"
|
||||||
|
rev="0"
|
||||||
|
revtype="0"
|
||||||
|
display_name="sharedAsset2" />
|
||||||
|
<ccm_core.ccm_objects_aud object_id="-630"
|
||||||
|
rev="0"
|
||||||
|
revtype="0"
|
||||||
|
display_name="sharedAsset3" />
|
||||||
|
<ccm_core.ccm_objects_aud object_id="-710"
|
||||||
|
rev="0"
|
||||||
|
revtype="0"
|
||||||
|
display_name="asset510-1a" />
|
||||||
|
<ccm_core.ccm_objects_aud object_id="-720"
|
||||||
|
rev="0"
|
||||||
|
revtype="0"
|
||||||
|
display_name="asset510-1b" />
|
||||||
|
<ccm_core.ccm_objects_aud object_id="-610"
|
||||||
|
rev="1"
|
||||||
|
revtype="1"
|
||||||
|
display_name="sharedAsset1" />
|
||||||
|
|
||||||
|
<ccm_core.categories object_id="-200"
|
||||||
|
unique_id="82014239-9c06-486d-ae8c-4ae47f52a699"
|
||||||
|
name="info_root"
|
||||||
|
enabled="true"
|
||||||
|
visible="true"
|
||||||
|
abstract_category="false"
|
||||||
|
category_order="1" />
|
||||||
|
<ccm_core.categories object_id="-300"
|
||||||
|
unique_id="b163f73c-9ac2-44d7-a037-de621f5ca828"
|
||||||
|
name="info_assets"
|
||||||
|
enabled="true"
|
||||||
|
visible="true"
|
||||||
|
abstract_category="false"
|
||||||
|
category_order="1"/>
|
||||||
|
|
||||||
|
<ccm_core.category_titles object_id="-200"
|
||||||
|
locale="en"
|
||||||
|
localized_value="info_root" />
|
||||||
|
<ccm_core.category_titles object_id="-300"
|
||||||
|
locale="en"
|
||||||
|
localized_value="info_assets" />
|
||||||
|
|
||||||
|
<ccm_core.resources object_id="-100"
|
||||||
|
created="2016-07-15" />
|
||||||
|
|
||||||
|
<ccm_core.applications object_id="-100"
|
||||||
|
application_type="org.librecms.contentsection.ContentSection"
|
||||||
|
primary_url="info" />
|
||||||
|
|
||||||
|
<ccm_cms.folders object_id="-200"
|
||||||
|
type="DOCUMENTS_FOLDER" />
|
||||||
|
<ccm_cms.folders object_id="-300"
|
||||||
|
type="ASSETS_FOLDER" />
|
||||||
|
|
||||||
|
<ccm_cms.content_sections object_id="-100"
|
||||||
|
label="info"
|
||||||
|
root_documents_folder_id="-200"
|
||||||
|
root_assets_folder_id="-300" />
|
||||||
|
|
||||||
|
<ccm_cms.folder_content_section_map folder_id="-200"
|
||||||
|
content_section_id="-100" />
|
||||||
|
<ccm_cms.folder_content_section_map folder_id="-300"
|
||||||
|
content_section_id="-100" />
|
||||||
|
|
||||||
|
<ccm_cms.content_types object_id="-400"
|
||||||
|
content_item_class="org.librecms.contenttypes.Article"
|
||||||
|
content_section_id="-100" />
|
||||||
|
|
||||||
|
<ccm_cms.content_items object_id="-510"
|
||||||
|
item_uuid="aed4b402-1180-46c6-b42d-7245f4dca248"
|
||||||
|
version="DRAFT"
|
||||||
|
content_type_id="-400" />
|
||||||
|
|
||||||
|
<ccm_cms.articles object_id="-510" />
|
||||||
|
|
||||||
|
<ccm_cms.article_texts
|
||||||
|
object_id="-510"
|
||||||
|
locale="en"
|
||||||
|
localized_value="Quisque varius turpis et nibh rhoncus consequat. In sapien metus, fermentum quis." />
|
||||||
|
|
||||||
|
<ccm_cms.article_texts_aud
|
||||||
|
rev="0"
|
||||||
|
object_id="-510"
|
||||||
|
localized_value="Quisque varius turpis et nibh rhoncus consequat. In sapien metus, fermentum quis."
|
||||||
|
locale="en"
|
||||||
|
revtype="0" />
|
||||||
|
|
||||||
|
<ccm_cms.assets object_id="-610" />
|
||||||
|
<ccm_cms.assets object_id="-620" />
|
||||||
|
<ccm_cms.assets object_id="-630" />
|
||||||
|
<ccm_cms.assets object_id="-710" />
|
||||||
|
<ccm_cms.assets object_id="-720" />
|
||||||
|
|
||||||
|
<ccm_cms.assets_aud object_id="-610"
|
||||||
|
rev="0" />
|
||||||
|
<ccm_cms.assets_aud object_id="-620"
|
||||||
|
rev="0" />
|
||||||
|
<ccm_cms.assets_aud object_id="-630"
|
||||||
|
rev="0" />
|
||||||
|
<ccm_cms.assets_aud object_id="-710"
|
||||||
|
rev="0" />
|
||||||
|
<ccm_cms.assets_aud object_id="-720"
|
||||||
|
rev="0" />
|
||||||
|
<ccm_cms.assets_aud object_id="-610"
|
||||||
|
rev="1" />
|
||||||
|
|
||||||
|
<ccm_cms.asset_titles asset_id="-610"
|
||||||
|
localized_value="sharedAsset1"
|
||||||
|
locale="en" />
|
||||||
|
<ccm_cms.asset_titles asset_id="-620"
|
||||||
|
localized_value="sharedAsset2"
|
||||||
|
locale="en" />
|
||||||
|
<ccm_cms.asset_titles asset_id="-630"
|
||||||
|
localized_value="sharedAsset3"
|
||||||
|
locale="en" />
|
||||||
|
<ccm_cms.asset_titles asset_id="-710"
|
||||||
|
localized_value="asset-510-1a"
|
||||||
|
locale="en" />
|
||||||
|
<ccm_cms.asset_titles asset_id="-720"
|
||||||
|
localized_value="asset-510-1b"
|
||||||
|
locale="en" />
|
||||||
|
|
||||||
|
<ccm_cms.asset_titles_aud asset_id="-610"
|
||||||
|
rev="0"
|
||||||
|
revtype="0"
|
||||||
|
localized_value="sharedAsset1"
|
||||||
|
locale="en" />
|
||||||
|
<ccm_cms.asset_titles_aud asset_id="-620"
|
||||||
|
rev="0"
|
||||||
|
revtype="0"
|
||||||
|
localized_value="sharedAsset2"
|
||||||
|
locale="en" />
|
||||||
|
<ccm_cms.asset_titles_aud asset_id="-630"
|
||||||
|
rev="0"
|
||||||
|
revtype="0"
|
||||||
|
localized_value="sharedAsset3"
|
||||||
|
locale="en" />
|
||||||
|
<ccm_cms.asset_titles_aud asset_id="-710"
|
||||||
|
rev="0"
|
||||||
|
revtype="0"
|
||||||
|
localized_value="asset-510-1a"
|
||||||
|
locale="en" />
|
||||||
|
<ccm_cms.asset_titles_aud asset_id="-720"
|
||||||
|
rev="0"
|
||||||
|
revtype="0"
|
||||||
|
localized_value="asset-510-1b"
|
||||||
|
locale="en" />
|
||||||
|
|
||||||
|
<ccm_cms.binary_assets object_id="-610"
|
||||||
|
filename="shared-asset-1.pdf"
|
||||||
|
mime_type="application/pdf"
|
||||||
|
data_size="0" />
|
||||||
|
<ccm_cms.binary_assets object_id="-620"
|
||||||
|
filename="shared-asset-2.pdf"
|
||||||
|
mime_type="application/pdf"
|
||||||
|
data_size="0" />
|
||||||
|
<ccm_cms.binary_assets object_id="-630"
|
||||||
|
filename="shared-asset-3.pdf"
|
||||||
|
mime_type="application/pdf"
|
||||||
|
data_size="0" />
|
||||||
|
<ccm_cms.binary_assets object_id="-710"
|
||||||
|
filename="asset-510-1a.pdf"
|
||||||
|
mime_type="application/pdf"
|
||||||
|
data_size="0" />
|
||||||
|
<ccm_cms.binary_assets object_id="-720"
|
||||||
|
filename="asset-510-1b.pdf"
|
||||||
|
mime_type="application/pdf"
|
||||||
|
data_size="0" />
|
||||||
|
|
||||||
|
<ccm_cms.binary_assets_aud object_id="-610"
|
||||||
|
rev="0"
|
||||||
|
filename="shared-asset-1.pdf"
|
||||||
|
mime_type="application/pdf"
|
||||||
|
data_size="0" />
|
||||||
|
<ccm_cms.binary_assets_aud object_id="-620"
|
||||||
|
rev="0"
|
||||||
|
filename="shared-asset-2.pdf"
|
||||||
|
mime_type="application/pdf"
|
||||||
|
data_size="0" />
|
||||||
|
<ccm_cms.binary_assets_aud object_id="-630"
|
||||||
|
rev="0"
|
||||||
|
filename="shared-asset-3.pdf"
|
||||||
|
mime_type="application/pdf"
|
||||||
|
data_size="0" />
|
||||||
|
<ccm_cms.binary_assets_aud object_id="-710"
|
||||||
|
rev="0"
|
||||||
|
filename="asset-510-1a.pdf"
|
||||||
|
mime_type="application/pdf"
|
||||||
|
data_size="0" />
|
||||||
|
<ccm_cms.binary_assets_aud object_id="-720"
|
||||||
|
rev="0"
|
||||||
|
filename="asset-510-1b.pdf"
|
||||||
|
mime_type="application/pdf"
|
||||||
|
data_size="0" />
|
||||||
|
<ccm_cms.binary_assets_aud object_id="-610"
|
||||||
|
rev="1"
|
||||||
|
filename="shared-asset-1.pdf"
|
||||||
|
mime_type="application/pdf"
|
||||||
|
data_size="0" />
|
||||||
|
|
||||||
|
<ccm_cms.files object_id="-610" />
|
||||||
|
<ccm_cms.files object_id="-620" />
|
||||||
|
<ccm_cms.files object_id="-630" />
|
||||||
|
<ccm_cms.files object_id="-710" />
|
||||||
|
<ccm_cms.files object_id="-720" />
|
||||||
|
|
||||||
|
<ccm_cms.files_aud object_id="-610"
|
||||||
|
rev="0" />
|
||||||
|
<ccm_cms.files_aud object_id="-620"
|
||||||
|
rev="0" />
|
||||||
|
<ccm_cms.files_aud object_id="-630"
|
||||||
|
rev="0" />
|
||||||
|
<ccm_cms.files_aud object_id="-710"
|
||||||
|
rev="0" />
|
||||||
|
<ccm_cms.files_aud object_id="-720"
|
||||||
|
rev="0" />
|
||||||
|
<ccm_cms.files_aud object_id="-610"
|
||||||
|
rev="1" />
|
||||||
|
|
||||||
|
<ccm_core.categorizations categorization_id="-30100"
|
||||||
|
category_id="-200"
|
||||||
|
object_id="-510"
|
||||||
|
category_order="1"
|
||||||
|
object_order="1"
|
||||||
|
category_index="false"
|
||||||
|
type="folder" />
|
||||||
|
<ccm_core.categorizations categorization_id="-30300"
|
||||||
|
category_id="-300"
|
||||||
|
object_id="-610"
|
||||||
|
category_order="1"
|
||||||
|
object_order="1"
|
||||||
|
category_index="false"
|
||||||
|
type="folder" />
|
||||||
|
<ccm_core.categorizations categorization_id="-30340"
|
||||||
|
category_id="-300"
|
||||||
|
object_id="-620"
|
||||||
|
category_order="1"
|
||||||
|
object_order="2"
|
||||||
|
category_index="false"
|
||||||
|
type="folder" />
|
||||||
|
<ccm_core.categorizations categorization_id="-30500"
|
||||||
|
category_id="-300"
|
||||||
|
object_id="-630"
|
||||||
|
category_order="1"
|
||||||
|
object_order="1"
|
||||||
|
category_index="false"
|
||||||
|
type="folder" />
|
||||||
|
|
||||||
|
<ccm_cms.attachment_lists list_id="-510010"
|
||||||
|
name="list1"
|
||||||
|
list_order="1"
|
||||||
|
uuid="209e3f76-1523-4601-84bd-dbae91f4f26d"
|
||||||
|
item_id="-510" />
|
||||||
|
<ccm_cms.attachment_lists list_id="-510020"
|
||||||
|
name="list1"
|
||||||
|
list_order="2"
|
||||||
|
uuid="57850f9c-e191-4f6f-9537-d5c2d2f118ec"
|
||||||
|
item_id="-510" />
|
||||||
|
<ccm_cms.attachment_lists list_id="-510030"
|
||||||
|
name="list2"
|
||||||
|
list_order="3"
|
||||||
|
uuid="a0c2ba42-d506-48c0-b7cc-d32b2a031a50"
|
||||||
|
item_id="-510" />
|
||||||
|
|
||||||
|
<ccm_cms.attachment_lists_aud list_id="-510010"
|
||||||
|
rev="0"
|
||||||
|
revtype="0"
|
||||||
|
name="list1"
|
||||||
|
uuid="209e3f76-1523-4601-84bd-dbae91f4f26d"
|
||||||
|
item_id="-510" />
|
||||||
|
<ccm_cms.attachment_lists_aud list_id="-510020"
|
||||||
|
rev="0"
|
||||||
|
revtype="0"
|
||||||
|
name="list1"
|
||||||
|
uuid="57850f9c-e191-4f6f-9537-d5c2d2f118ec"
|
||||||
|
item_id="-510" />
|
||||||
|
<ccm_cms.attachment_lists_aud list_id="-510030"
|
||||||
|
rev="0"
|
||||||
|
revtype="0"
|
||||||
|
name="list2"
|
||||||
|
uuid="a0c2ba42-d506-48c0-b7cc-d32b2a031a50"
|
||||||
|
item_id="-510" />
|
||||||
|
<ccm_cms.attachment_lists_aud list_id="-510010"
|
||||||
|
rev="1"
|
||||||
|
revtype="1"
|
||||||
|
name="list1"
|
||||||
|
uuid="209e3f76-1523-4601-84bd-dbae91f4f26d"
|
||||||
|
item_id="-510" />
|
||||||
|
|
||||||
|
<ccm_cms.attachments attachment_id="-510110"
|
||||||
|
sort_key="1"
|
||||||
|
uuid="de1d8531-df11-4808-9679-9ffa7537ebd1"
|
||||||
|
asset_id="-710"
|
||||||
|
attachment_list_id="-510010" />
|
||||||
|
<ccm_cms.attachments attachment_id="-510120"
|
||||||
|
sort_key="2"
|
||||||
|
uuid="5a34deae-9e3a-41e8-abd8-6a7d10dd9e7d"
|
||||||
|
asset_id="-720"
|
||||||
|
attachment_list_id="-510010" />
|
||||||
|
<!--<ccm_cms.attachments attachment_id="-510130"
|
||||||
|
sort_key="3"
|
||||||
|
uuid="9e34627c-2da9-45fe-aae3-48801bd27cbe"
|
||||||
|
asset_id="-610"
|
||||||
|
attachment_list_id="-510010" />-->
|
||||||
|
<ccm_cms.attachments attachment_id="-510140"
|
||||||
|
sort_key="1"
|
||||||
|
uuid="6b5f86db-dd35-4674-a089-2a0b999a17c7"
|
||||||
|
asset_id="-620"
|
||||||
|
attachment_list_id="-510020" />
|
||||||
|
|
||||||
|
<ccm_cms.attachments_aud attachment_id="-510110"
|
||||||
|
rev="0"
|
||||||
|
revtype="0"
|
||||||
|
sort_key="1"
|
||||||
|
uuid="de1d8531-df11-4808-9679-9ffa7537ebd1"
|
||||||
|
asset_id="-710"
|
||||||
|
attachment_list_id="-510010" />
|
||||||
|
<ccm_cms.attachments_aud attachment_id="-510120"
|
||||||
|
rev="0"
|
||||||
|
revtype="0"
|
||||||
|
sort_key="2"
|
||||||
|
uuid="5a34deae-9e3a-41e8-abd8-6a7d10dd9e7d"
|
||||||
|
asset_id="-720"
|
||||||
|
attachment_list_id="-510010" />
|
||||||
|
<ccm_cms.attachments_aud attachment_id="-510130"
|
||||||
|
rev="0"
|
||||||
|
revtype="0"
|
||||||
|
revend="1"
|
||||||
|
sort_key="3"
|
||||||
|
uuid="9e34627c-2da9-45fe-aae3-48801bd27cbe"
|
||||||
|
asset_id="-610"
|
||||||
|
attachment_list_id="-510010" />
|
||||||
|
<ccm_cms.attachments_aud attachment_id="-510140"
|
||||||
|
rev="0"
|
||||||
|
revtype="0"
|
||||||
|
sort_key="1"
|
||||||
|
uuid="6b5f86db-dd35-4674-a089-2a0b999a17c7"
|
||||||
|
asset_id="-620"
|
||||||
|
attachment_list_id="-510020" />
|
||||||
|
<ccm_cms.attachments_aud attachment_id="-510150"
|
||||||
|
rev="0"
|
||||||
|
revtype="0"
|
||||||
|
sort_key="1"
|
||||||
|
uuid="395c43dc-4aea-43e3-a2de-13e10f3a63f7"
|
||||||
|
asset_id="-630"
|
||||||
|
attachment_list_id="-510030" />
|
||||||
|
<ccm_cms.attachments_aud attachment_id="-510130"
|
||||||
|
rev="1"
|
||||||
|
revtype="2" />
|
||||||
|
|
||||||
|
|
||||||
|
</dataset>
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue