CCM NG/ccm-cms: AssetManager current status

git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4409 8810af33-2d31-482b-a856-94f89814c4df
pull/2/head
jensp 2016-10-25 18:54:02 +00:00
parent 0e4b8ed5c2
commit f2f6f6c3f6
8 changed files with 618 additions and 454 deletions

View File

@ -57,7 +57,7 @@ import static org.librecms.CmsConstants.*;
public class AssetManager { public class AssetManager {
private static final Logger LOGGER = LogManager. private static final Logger LOGGER = LogManager.
getLogger(AssetManager.class); getLogger(AssetManager.class);
@Inject @Inject
private EntityManager entityManager; private EntityManager entityManager;
@ -78,21 +78,22 @@ public class AssetManager {
* Creates a new, non shared {@link Asset} and adds it to the provided * Creates a new, non shared {@link Asset} and adds it to the provided
* {@link AttachmentList}. * {@link AttachmentList}.
* *
* @param <T> Type variable for the type of the new {@link Asset}. * @param <T> Type variable for the type of the new {@link Asset}.
* @param name The name of the new {@link Asset}. * @param name The name of the new {@link Asset}.
* @param attachments The {@link AttachmentList} to which the new * @param attachments The {@link AttachmentList} to which the new
* {@link Asset} is added. * {@link Asset} is added.
* @param type The type of the new {@link Asset}. Must be a subclass of the * @param type The type of the new {@link Asset}. Must be a subclass
* {@link Asset} class. * of the {@link Asset} class.
*
* @return The new {@link Asset}. * @return The new {@link Asset}.
*/ */
@AuthorizationRequired @AuthorizationRequired
@Transactional(Transactional.TxType.REQUIRED) @Transactional(Transactional.TxType.REQUIRED)
public <T extends Asset> T createAsset( public <T extends Asset> T createAsset(
final String name, final String name,
@RequiresPrivilege(ItemPrivileges.EDIT) @RequiresPrivilege(ItemPrivileges.EDIT)
final AttachmentList attachments, final AttachmentList attachments,
final Class<T> type) { final Class<T> type) {
throw new UnsupportedOperationException("Not implemented yet."); throw new UnsupportedOperationException("Not implemented yet.");
} }
@ -103,20 +104,21 @@ public class AssetManager {
* a content section. Otherwise an {@link IllegalArgumentException} is * a content section. Otherwise an {@link IllegalArgumentException} is
* thrown. * thrown.
* *
* @param <T> Type variable for the type of the {@link Asset} to create. * @param <T> Type variable for the type of the {@link Asset} to create.
* @param name The name of the new {@link Asset}. * @param name The name of the new {@link Asset}.
* @param folder The {@link Folder} in which the {@link Asset} is created. * @param folder The {@link Folder} in which the {@link Asset} is created.
* @param type The type of the new {@link Asset}. Must be a subclass of the * @param type The type of the new {@link Asset}. Must be a subclass of
* {@link Asset} class. * the {@link Asset} class.
*
* @return The new {@link Asset}. * @return The new {@link Asset}.
*/ */
@AuthorizationRequired @AuthorizationRequired
@Transactional(Transactional.TxType.REQUIRED) @Transactional(Transactional.TxType.REQUIRED)
public <T extends Asset> T createAsset( public <T extends Asset> T createAsset(
final String name, final String name,
@RequiresPrivilege(AssetPrivileges.CREATE_NEW) @RequiresPrivilege(AssetPrivileges.CREATE_NEW)
final Folder folder, final Folder folder,
final Class<T> type) { final Class<T> type) {
throw new UnsupportedOperationException("Not implemented yet."); throw new UnsupportedOperationException("Not implemented yet.");
} }
@ -134,15 +136,16 @@ public class AssetManager {
* folder is provided and the caller does not add the created asset to an * folder is provided and the caller does not add the created asset to an
* {@link AttachmentList} the asset will become orphaned can't be accessed. * {@link AttachmentList} the asset will become orphaned can't be accessed.
* *
* @param <T> Type variable for the type of the {@link Asset}. * @param <T> Type variable for the type of the {@link Asset}.
* @param name The name of the new {@link Asset}. * @param name The name of the new {@link Asset}.
* @param folder Optional folder in which the new {@link Asset} is placed. * @param folder Optional folder in which the new {@link Asset} is placed.
* @param type The type of the new {@link Asset}. Must be a subclass of the * @param type The type of the new {@link Asset}. Must be a subclass of
* {@link Asset} class. * the {@link Asset} class.
*
* @return The new {@link Asset}. Note: If no {@link Folder} is provided and * @return The new {@link Asset}. Note: If no {@link Folder} is provided and
* the and the returned {@link Asset} is not added to an * the and the returned {@link Asset} is not added to an
* {@link AttachmentList} the new {@code Asset} will become orphaned and * {@link AttachmentList} the new {@code Asset} will become orphaned
* can't be accessed by any method. * and can't be accessed by any method.
*/ */
@Transactional(Transactional.TxType.REQUIRED) @Transactional(Transactional.TxType.REQUIRED)
public <T extends Asset> T createAsset(final String name, public <T extends Asset> T createAsset(final String name,
@ -158,30 +161,37 @@ public class AssetManager {
@Transactional(Transactional.TxType.REQUIRED) @Transactional(Transactional.TxType.REQUIRED)
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN) @RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
public void cleanOrphanedAssets() { public void cleanOrphanedAssets() {
throw new UnsupportedOperationException("Not implemented yet."); final List<Asset> assets = assetRepo.findAll();
final List<Asset> orphaned = assets.stream()
.filter(asset -> asset.getCategories().isEmpty()
&& asset.getItemAttachments().isEmpty())
.collect(Collectors.toList());
orphaned.forEach(orphan -> assetRepo.delete(orphan));
} }
/** /**
* Moves an {@link Asset} to an folder. * Moves an {@link Asset} to an folder.
* *
* @param asset The {@link Asset} to move. * @param asset The {@link Asset} to move.
* @param targetFolder The folder to which the {@link Asset} is moved. Must * @param targetFolder The folder to which the {@link Asset} is moved. Must
* be an asset folder. * be an asset folder.
*/ */
@AuthorizationRequired @AuthorizationRequired
@Transactional(Transactional.TxType.REQUIRED) @Transactional(Transactional.TxType.REQUIRED)
public void move( public void move(
@RequiresPrivilege(AssetPrivileges.EDIT) @RequiresPrivilege(AssetPrivileges.EDIT)
final Asset asset, final Asset asset,
@RequiresPrivilege(AssetPrivileges.CREATE_NEW) @RequiresPrivilege(AssetPrivileges.CREATE_NEW)
final Folder targetFolder) { final Folder targetFolder) {
throw new UnsupportedOperationException("Not implemented yet."); throw new UnsupportedOperationException("Not implemented yet.");
} }
/** /**
* Copies an {@link Asset}. * Copies an {@link Asset}.
* *
* @param asset The {@link Asset} to copy. * @param asset The {@link Asset} to copy.
* @param targetFolder The folder to which the {@link Asset} is copied. * @param targetFolder The folder to which the {@link Asset} is copied.
*/ */
@Transactional(Transactional.TxType.REQUIRED) @Transactional(Transactional.TxType.REQUIRED)
@ -197,8 +207,9 @@ public class AssetManager {
* member of at least one {@link AttachmentList}. * member of at least one {@link AttachmentList}.
* *
* @param asset The {@link Asset} to check for usage. * @param asset The {@link Asset} to check for usage.
*
* @return {@code true} if the {@link Asset} is in use, {@link false} if * @return {@code true} if the {@link Asset} is in use, {@link false} if
* not. * not.
*/ */
@Transactional(Transactional.TxType.REQUIRED) @Transactional(Transactional.TxType.REQUIRED)
public boolean isAssetInUse(final Asset asset) { public boolean isAssetInUse(final Asset asset) {
@ -211,8 +222,9 @@ public class AssetManager {
* with the name of the asset. The path is relative to the content section. * with the name of the asset. The path is relative to the content section.
* *
* @param asset The {@link Assset} for which the path is generated. * @param asset The {@link Assset} for which the path is generated.
*
* @return The path of the {@link Asset}. If the {@link Asset} is a non * @return The path of the {@link Asset}. If the {@link Asset} is a non
* shared asset the path is empty. * shared asset the path is empty.
* *
* @see #getAssetPath(org.librecms.assets.Asset, boolean) * @see #getAssetPath(org.librecms.assets.Asset, boolean)
*/ */
@ -223,22 +235,24 @@ public class AssetManager {
/** /**
* Returns the path of an item as String. * Returns the path of an item as String.
* *
* @param asset The {@link Asset} for which the path is generated. * @param asset The {@link Asset} for which the path is
* generated.
* @param withContentSection Whether to include the content section into the * @param withContentSection Whether to include the content section into the
* path or not. * path or not.
*
* @return The path of the asset. For non shared assets this is an empty * @return The path of the asset. For non shared assets this is an empty
* string. * string.
* *
* @see #getAssetPath(org.librecms.assets.Asset) * @see #getAssetPath(org.librecms.assets.Asset)
*/ */
public String getAssetPath(final Asset asset, public String getAssetPath(final Asset asset,
final boolean withContentSection) { final boolean withContentSection) {
final List<Categorization> result = asset.getCategories().stream() final List<Categorization> result = asset.getCategories().stream()
.filter(categorization -> { .filter(categorization -> {
return CATEGORIZATION_TYPE_FOLDER.equals( return CATEGORIZATION_TYPE_FOLDER.equals(
categorization.getType()); categorization.getType());
}) })
.collect(Collectors.toList()); .collect(Collectors.toList());
if (result.isEmpty()) { if (result.isEmpty()) {
return ""; return "";
@ -247,17 +261,17 @@ public class AssetManager {
tokens.add(asset.getDisplayName()); tokens.add(asset.getDisplayName());
Category current = result.get(0).getCategory(); Category current = result.get(0).getCategory();
tokens.add(current.getName());
while (current.getParentCategory() != null) { while (current.getParentCategory() != null) {
current = current.getParentCategory();
tokens.add(current.getName()); tokens.add(current.getName());
current = current.getParentCategory();
} }
Collections.reverse(tokens); Collections.reverse(tokens);
final String path = String.join("/", tokens); final String path = String.join("/", tokens);
if (withContentSection) { if (withContentSection) {
final String sectionName = ((Folder) result.get(0).getCategory()). final String sectionName
= ((Folder) result.get(0).getCategory()).
getSection().getDisplayName(); getSection().getDisplayName();
return String.format("%s:/%s", sectionName, path); return String.format("%s:/%s", sectionName, path);
} else { } else {
@ -270,29 +284,71 @@ public class AssetManager {
* Creates a list of the folder in which an asset is placed. * Creates a list of the folder in which an asset is placed.
* *
* @param asset * @param asset
*
* @return A list of the folders which form the path of the asset. For non * @return A list of the folders which form the path of the asset. For non
* shared assets an empty list is returned. * shared assets an empty list is returned.
*/ */
public List<Folder> getAssetFolders(final Asset asset) { public List<Folder> getAssetFolders(final Asset asset) {
throw new UnsupportedOperationException("Not implemented yet."); final List<Categorization> result = asset.getCategories().stream()
.filter(categorization -> {
return CATEGORIZATION_TYPE_FOLDER.equals(categorization
.getType());
})
.collect(Collectors.toList());
final List<Folder> folders = new ArrayList<>();
if (!result.isEmpty()) {
Category current = result.get(0).getCategory();
if (current instanceof Folder) {
folders.add((Folder) current);
} else {
throw new IllegalArgumentException(String.format(
"The asset %s is assigned to the category %s with the"
+ "categorization type \"%s\", but the Category is not"
+ "a folder. This is no supported.",
asset.getUuid(),
current.getUuid(),
CATEGORIZATION_TYPE_FOLDER));
}
while (current.getParentCategory() != null) {
current = current.getParentCategory();
if (current instanceof Folder) {
folders.add((Folder) current);
} else {
throw new IllegalArgumentException(String.format(
"The asset %s is assigned to the category %s with the"
+ "categorization type \"%s\", but the Category is not"
+ "a folder. This is no supported.",
asset.getUuid(),
current.getUuid(),
CATEGORIZATION_TYPE_FOLDER));
}
}
}
Collections.reverse(folders);
return folders;
} }
/** /**
* Gets the folder in which an asset is placed. * Gets the folder in which an asset is placed.
* *
* @param asset The asset. * @param asset The asset.
*
* @return The folder in which the asset is placed. If the asset is a non * @return The folder in which the asset is placed. If the asset is a non
* shared asset an empty {@link Optional} is returned. * shared asset an empty {@link Optional} is returned.
*/ */
public Optional<Folder> getAssetFolder(final Asset asset) { public Optional<Folder> getAssetFolder(final Asset asset) {
return asset.getCategories().stream() return asset.getCategories().stream()
.filter(categorization -> { .filter(categorization -> {
return CATEGORIZATION_TYPE_FOLDER.equals( return CATEGORIZATION_TYPE_FOLDER.equals(
categorization.getType()); categorization.getType());
}) })
.map(categorization -> { .map(categorization -> {
return (Folder) categorization.getCategory(); return (Folder) categorization.getCategory();
}) })
.findFirst(); .findFirst();
} }
} }

View File

@ -61,6 +61,9 @@ public class AssetRepository
@Inject @Inject
private CategoryManager categoryManager; private CategoryManager categoryManager;
@Inject
private AssetManager assetManager;
@Override @Override
public Long getEntityId(final Asset asset) { public Long getEntityId(final Asset asset) {
return asset.getObjectId(); return asset.getObjectId();
@ -96,9 +99,9 @@ public class AssetRepository
public void save( public void save(
@RequiresPrivilege(AssetPrivileges.EDIT) @RequiresPrivilege(AssetPrivileges.EDIT)
final Asset asset) { final Asset asset) {
} }
/** /**
* Deletes an <strong>unused</strong> Asset. If the {@link Asset} is in use * Deletes an <strong>unused</strong> Asset. If the {@link Asset} is in use
* (linked to at least one ContentItem) an {@link AssetInUseException} is * (linked to at least one ContentItem) an {@link AssetInUseException} is
@ -116,7 +119,10 @@ public class AssetRepository
@RequiresPrivilege(AssetPrivileges.DELETE) @RequiresPrivilege(AssetPrivileges.DELETE)
final Asset asset) { final Asset asset) {
if (asset.getItemAttachments().isEmpty()) { if (assetManager.isAssetInUse(asset)) {
throw new AssetInUseException(String.format("Asset %s is in use.",
asset.getUuid()));
} else {
final List<Category> categories = asset.getCategories() final List<Category> categories = asset.getCategories()
.stream() .stream()
.map(categorization -> categorization.getCategory()) .map(categorization -> categorization.getCategory())
@ -131,9 +137,6 @@ public class AssetRepository
} }
ccmObjectRepo.delete(asset); ccmObjectRepo.delete(asset);
} else {
throw new AssetInUseException(String.format("Asset %s is in use.",
asset.getUuid()));
} }
} }

View File

@ -99,61 +99,61 @@ public class AssetManagerTest {
@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.Asset.class.getPackage()) .addPackage(org.librecms.assets.Asset.class.getPackage())
.addPackage(org.librecms.attachments.AttachmentList.class .addPackage(org.librecms.attachments.AttachmentList.class
.getPackage()) .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");
} }
/** /**
@ -188,10 +188,10 @@ public class AssetManagerTest {
@InSequence(100) @InSequence(100)
@UsingDataSet("datasets/org/librecms/assets/AssetManagerTest/data.xml") @UsingDataSet("datasets/org/librecms/assets/AssetManagerTest/data.xml")
@ShouldMatchDataSet( @ShouldMatchDataSet(
value = "datasets/org/librecms/assets/AssetManagerTest/" value = "datasets/org/librecms/assets/AssetManagerTest/"
+ "after-create-nonshared.xml", + "after-create-nonshared.xml",
excludeColumns = {"object_id", excludeColumns = {"object_id",
"uuid"}) "uuid"})
public void createNonSharedAssets() { public void createNonSharedAssets() {
fail(); fail();
} }
@ -264,10 +264,10 @@ public class AssetManagerTest {
@InSequence(200) @InSequence(200)
@UsingDataSet("datasets/org/librecms/assets/AssetManagerTest/data.xml") @UsingDataSet("datasets/org/librecms/assets/AssetManagerTest/data.xml")
@ShouldMatchDataSet( @ShouldMatchDataSet(
value = "datasets/org/librecms/assets/AssetManagerTest/" value = "datasets/org/librecms/assets/AssetManagerTest/"
+ "after-create-shared.xml", + "after-create-shared.xml",
excludeColumns = {"object_id", excludeColumns = {"object_id",
"uuid"}) "uuid"})
public void createSharedAssets() { public void createSharedAssets() {
fail(); fail();
} }
@ -340,12 +340,12 @@ public class AssetManagerTest {
@InSequence(300) @InSequence(300)
@UsingDataSet("datasets/org/librecms/assets/AssetManagerTest/data.xml") @UsingDataSet("datasets/org/librecms/assets/AssetManagerTest/data.xml")
@ShouldMatchDataSet( @ShouldMatchDataSet(
value = "datasets/org/librecms/assets/AssetManagerTest/" value = "datasets/org/librecms/assets/AssetManagerTest/"
+ "after-clean-orphaned.xml", + "after-clean-orphaned.xml",
excludeColumns = {"object_id", excludeColumns = {"timestamp"},
"uuid"}) orderBy = {"asset_titles_aud.asset_id"})
public void cleanOrphanedAssets() { public void cleanOrphanedAssets() {
fail(); assetManager.cleanOrphanedAssets();
} }
/** /**
@ -356,10 +356,10 @@ public class AssetManagerTest {
@InSequence(400) @InSequence(400)
@UsingDataSet("datasets/org/librecms/assets/AssetManagerTest/data.xml") @UsingDataSet("datasets/org/librecms/assets/AssetManagerTest/data.xml")
@ShouldMatchDataSet( @ShouldMatchDataSet(
value = "datasets/org/librecms/assets/AssetManagerTest/" value = "datasets/org/librecms/assets/AssetManagerTest/"
+ "after-move-to-other-folder.xml", + "after-move-to-other-folder.xml",
excludeColumns = {"object_id", excludeColumns = {"object_id",
"uuid"}) "uuid"})
public void moveAssetToOtherFolder() { public void moveAssetToOtherFolder() {
fail(); fail();
} }
@ -372,10 +372,10 @@ public class AssetManagerTest {
@InSequence(410) @InSequence(410)
@UsingDataSet("datasets/org/librecms/assets/AssetManagerTest/data.xml") @UsingDataSet("datasets/org/librecms/assets/AssetManagerTest/data.xml")
@ShouldMatchDataSet( @ShouldMatchDataSet(
value = "datasets/org/librecms/assets/AssetManagerTest/" value = "datasets/org/librecms/assets/AssetManagerTest/"
+ "after-move-to-other-contentsection.xml", + "after-move-to-other-contentsection.xml",
excludeColumns = {"object_id", excludeColumns = {"object_id",
"uuid"}) "uuid"})
public void moveAssetToFolderInOtherContentSection() { public void moveAssetToFolderInOtherContentSection() {
fail(); fail();
} }
@ -433,10 +433,10 @@ public class AssetManagerTest {
@InSequence(500) @InSequence(500)
@UsingDataSet("datasets/org/librecms/assets/AssetManagerTest/data.xml") @UsingDataSet("datasets/org/librecms/assets/AssetManagerTest/data.xml")
@ShouldMatchDataSet( @ShouldMatchDataSet(
value = "datasets/org/librecms/assets/AssetManagerTest/" value = "datasets/org/librecms/assets/AssetManagerTest/"
+ "after-copy-to-other-folder.xml", + "after-copy-to-other-folder.xml",
excludeColumns = {"object_id", excludeColumns = {"object_id",
"uuid"}) "uuid"})
public void copyAssetToOtherFolder() { public void copyAssetToOtherFolder() {
fail(); fail();
} }
@ -449,10 +449,10 @@ public class AssetManagerTest {
@InSequence(510) @InSequence(510)
@UsingDataSet("datasets/org/librecms/assets/AssetManagerTest/data.xml") @UsingDataSet("datasets/org/librecms/assets/AssetManagerTest/data.xml")
@ShouldMatchDataSet( @ShouldMatchDataSet(
value = "datasets/org/librecms/assets/AssetManagerTest/" value = "datasets/org/librecms/assets/AssetManagerTest/"
+ "after-copy-to-same-folder.xml", + "after-copy-to-same-folder.xml",
excludeColumns = {"object_id", excludeColumns = {"object_id",
"uuid"}) "uuid"})
public void copyAssetToSameFolder() { public void copyAssetToSameFolder() {
fail(); fail();
} }
@ -466,10 +466,10 @@ public class AssetManagerTest {
@InSequence(520) @InSequence(520)
@UsingDataSet("datasets/org/librecms/assets/AssetManagerTest/data.xml") @UsingDataSet("datasets/org/librecms/assets/AssetManagerTest/data.xml")
@ShouldMatchDataSet( @ShouldMatchDataSet(
value = "datasets/org/librecms/assets/AssetManagerTest/" value = "datasets/org/librecms/assets/AssetManagerTest/"
+ "after-copy-to-other-contentsection.xml", + "after-copy-to-other-contentsection.xml",
excludeColumns = {"object_id", excludeColumns = {"object_id",
"uuid"}) "uuid"})
public void copyAssetToOtherContentSection() { public void copyAssetToOtherContentSection() {
fail(); fail();
} }
@ -571,15 +571,15 @@ public class AssetManagerTest {
assertThat(catalog, is(not(nullValue()))); assertThat(catalog, is(not(nullValue())));
assertThat(assetManager.getAssetPath(header), assertThat(assetManager.getAssetPath(header),
is(equalTo("/media/header.png"))); is(equalTo("/media/images/header.png")));
assertThat(assetManager.getAssetPath(phb), assertThat(assetManager.getAssetPath(phb),
is(equalTo("/media/the-phb.png"))); is(equalTo("/media/images/the-phb.png")));
assertThat(assetManager.getAssetPath(servicesHeader), assertThat(assetManager.getAssetPath(servicesHeader),
is(equalTo("/media/services-header.png"))); is(equalTo("/media/services-header.png")));
assertThat(assetManager.getAssetPath(product1Datasheet), assertThat(assetManager.getAssetPath(product1Datasheet),
is(equalTo(""))); is(equalTo("")));
assertThat(assetManager.getAssetPath(catalog), assertThat(assetManager.getAssetPath(catalog),
is(equalTo("/media/catalog.pdf"))); is(equalTo("/media/downloads/catalog.pdf")));
} }
/** /**
@ -605,15 +605,15 @@ public class AssetManagerTest {
assertThat(catalog, is(not(nullValue()))); assertThat(catalog, is(not(nullValue())));
assertThat(assetManager.getAssetPath(header, true), assertThat(assetManager.getAssetPath(header, true),
is(equalTo("info:/media/header.png"))); is(equalTo("info:/media/images/header.png")));
assertThat(assetManager.getAssetPath(phb, true), assertThat(assetManager.getAssetPath(phb, true),
is(equalTo("info:/media/the-phb.png"))); is(equalTo("info:/media/images/the-phb.png")));
assertThat(assetManager.getAssetPath(servicesHeader, true), assertThat(assetManager.getAssetPath(servicesHeader, true),
is(equalTo("info:/media/services-header.png"))); is(equalTo("info:/media/services-header.png")));
assertThat(assetManager.getAssetPath(product1Datasheet, true), assertThat(assetManager.getAssetPath(product1Datasheet, true),
is(equalTo(""))); is(equalTo("")));
assertThat(assetManager.getAssetPath(catalog, true), assertThat(assetManager.getAssetPath(catalog, true),
is(equalTo("info:/media/catalog.pdf"))); is(equalTo("info:/media/downloads/catalog.pdf")));
} }
/** /**
@ -639,18 +639,23 @@ public class AssetManagerTest {
assertThat(catalog, is(not(nullValue()))); assertThat(catalog, is(not(nullValue())));
final Folder media = folderRepo.findById(-400L); final Folder media = folderRepo.findById(-400L);
final Folder images = folderRepo.findById(-410L);
final Folder downloads = folderRepo.findById(-420L);
assertThat(media, is(not(nullValue()))); assertThat(media, is(not(nullValue())));
assertThat(images, is(not(nullValue())));
assertThat(downloads, is(not(nullValue())));
final Optional<Folder> headerFolder = assetManager final Optional<Folder> headerFolder = assetManager
.getAssetFolder(header); .getAssetFolder(header);
final Optional<Folder> phbFolder = assetManager final Optional<Folder> phbFolder = assetManager
.getAssetFolder(phb); .getAssetFolder(phb);
final Optional<Folder> servicesHeaderFolder = assetManager final Optional<Folder> servicesHeaderFolder = assetManager
.getAssetFolder(servicesHeader); .getAssetFolder(servicesHeader);
final Optional<Folder> product1DatasheetFolder = assetManager final Optional<Folder> product1DatasheetFolder = assetManager
.getAssetFolder(product1Datasheet); .getAssetFolder(product1Datasheet);
final Optional<Folder> catalogFolder = assetManager final Optional<Folder> catalogFolder = assetManager
.getAssetFolder(catalog); .getAssetFolder(catalog);
assertThat(headerFolder.isPresent(), is(true)); assertThat(headerFolder.isPresent(), is(true));
assertThat(phbFolder.isPresent(), is(true)); assertThat(phbFolder.isPresent(), is(true));
@ -658,10 +663,10 @@ public class AssetManagerTest {
assertThat(product1DatasheetFolder.isPresent(), is(false)); assertThat(product1DatasheetFolder.isPresent(), is(false));
assertThat(catalogFolder.isPresent(), is(true)); assertThat(catalogFolder.isPresent(), is(true));
assertThat(headerFolder.get(), is(equalTo(media))); assertThat(headerFolder.get(), is(equalTo(images)));
assertThat(phbFolder.get(), is(equalTo(media))); assertThat(phbFolder.get(), is(equalTo(images)));
assertThat(servicesHeaderFolder.get(), is(equalTo(media))); assertThat(servicesHeaderFolder.get(), is(equalTo(media)));
assertThat(catalogFolder.get(), is(equalTo(media))); assertThat(catalogFolder.get(), is(equalTo(downloads)));
} }
/** /**
@ -688,18 +693,22 @@ public class AssetManagerTest {
final Folder infoAssets = folderRepo.findById(-300L); final Folder infoAssets = folderRepo.findById(-300L);
final Folder media = folderRepo.findById(-400L); final Folder media = folderRepo.findById(-400L);
final Folder images = folderRepo.findById(-410L);
final Folder downloads = folderRepo.findById(-420L);
assertThat(infoAssets, is(not(nullValue()))); assertThat(infoAssets, is(not(nullValue())));
assertThat(media, is(not(nullValue()))); assertThat(media, is(not(nullValue())));
assertThat(images, is(not(nullValue())));
assertThat(downloads, is(not(nullValue())));
final List<Folder> headerFolders = assetManager.getAssetFolders(header); final List<Folder> headerFolders = assetManager.getAssetFolders(header);
final List<Folder> phbFolders = assetManager.getAssetFolders(phb); final List<Folder> phbFolders = assetManager.getAssetFolders(phb);
final List<Folder> servicesHeaderFolders = assetManager.getAssetFolders( final List<Folder> servicesHeaderFolders = assetManager.getAssetFolders(
phb); servicesHeader);
final List<Folder> product1DatasheetFolders = assetManager. final List<Folder> product1DatasheetFolders = assetManager.
getAssetFolders(product1Datasheet); getAssetFolders(product1Datasheet);
final List<Folder> catalogFolders = assetManager. final List<Folder> catalogFolders = assetManager.
getAssetFolders(catalog); getAssetFolders(catalog);
assertThat(headerFolders, is(not(nullValue()))); assertThat(headerFolders, is(not(nullValue())));
assertThat(phbFolders, is(not(nullValue()))); assertThat(phbFolders, is(not(nullValue())));
@ -713,23 +722,26 @@ public class AssetManagerTest {
assertThat(product1DatasheetFolders.isEmpty(), is(true)); assertThat(product1DatasheetFolders.isEmpty(), is(true));
assertThat(catalogFolders.isEmpty(), is(false)); assertThat(catalogFolders.isEmpty(), is(false));
assertThat(headerFolders.size(), is(2)); assertThat(headerFolders.size(), is(3));
assertThat(phbFolders.size(), is(2)); assertThat(phbFolders.size(), is(3));
assertThat(servicesHeaderFolders.size(), is(2)); assertThat(servicesHeaderFolders.size(), is(2));
assertThat(product1DatasheetFolders.size(), is(0)); assertThat(product1DatasheetFolders.size(), is(0));
assertThat(catalogFolders.size(), is(2)); assertThat(catalogFolders.size(), is(3));
assertThat(headerFolders.get(0), is(equalTo(infoAssets))); assertThat(headerFolders.get(0), is(equalTo(infoAssets)));
assertThat(headerFolders.get(1), is(equalTo(media))); assertThat(headerFolders.get(1), is(equalTo(media)));
assertThat(headerFolders.get(2), is(equalTo(images)));
assertThat(phbFolders.get(0), is(equalTo(infoAssets))); assertThat(phbFolders.get(0), is(equalTo(infoAssets)));
assertThat(phbFolders.get(1), is(equalTo(media))); assertThat(phbFolders.get(1), is(equalTo(media)));
assertThat(phbFolders.get(2), is(equalTo(images)));
assertThat(servicesHeaderFolders.get(0), is(equalTo(infoAssets))); assertThat(servicesHeaderFolders.get(0), is(equalTo(infoAssets)));
assertThat(servicesHeaderFolders.get(1), is(equalTo(media))); assertThat(servicesHeaderFolders.get(1), is(equalTo(media)));
assertThat(catalogFolders.get(0), is(equalTo(infoAssets))); assertThat(catalogFolders.get(0), is(equalTo(infoAssets)));
assertThat(catalogFolders.get(1), is(equalTo(media))); assertThat(catalogFolders.get(1), is(equalTo(media)));
assertThat(catalogFolders.get(2), is(equalTo(downloads)));
} }

View File

@ -10,6 +10,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"
@ -23,6 +25,12 @@
<ccm_core.ccm_objects object_id="-400" <ccm_core.ccm_objects object_id="-400"
display_name="media" display_name="media"
uuid="f8546369-4d06-47ea-9138-345d29ab8d68" /> uuid="f8546369-4d06-47ea-9138-345d29ab8d68" />
<ccm_core.ccm_objects object_id="-410"
display_name="images"
uuid="713d857d-dd0e-4fc5-85d6-d85d25279a10" />
<ccm_core.ccm_objects object_id="-420"
display_name="downloads"
uuid="9d89913d-759e-4de9-b2fb-c6f58e55de09" />
<ccm_core.ccm_objects object_id="-500" <ccm_core.ccm_objects object_id="-500"
display_name="data" display_name="data"
uuid="18fbc7f4-ce7e-45d6-8dad-02887164b99d" /> uuid="18fbc7f4-ce7e-45d6-8dad-02887164b99d" />
@ -44,9 +52,6 @@
<ccm_core.ccm_objects object_id="-1100" <ccm_core.ccm_objects object_id="-1100"
display_name="catalog.pdf" display_name="catalog.pdf"
uuid="cee702ad-79f7-4f78-b93d-46932d958c1c" /> uuid="cee702ad-79f7-4f78-b93d-46932d958c1c" />
<ccm_core.ccm_objects object_id="-1150"
display_name="orphan.png"
uuid="978849a8-6f2d-4746-bec0-05eccf53fc30" />
<ccm_core.ccm_objects object_id="-1200" <ccm_core.ccm_objects object_id="-1200"
display_name="org.librecms.contenttypes.Article" display_name="org.librecms.contenttypes.Article"
uuid="bd061ab6-9c4f-45ff-ab69-f521008eeac3" /> uuid="bd061ab6-9c4f-45ff-ab69-f521008eeac3" />
@ -94,6 +99,9 @@
rev="0" rev="0"
revtype="0" revtype="0"
display_name="orphan.png" /> display_name="orphan.png" />
<ccm_core.ccm_objects_aud object_id="-1150"
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"
@ -111,13 +119,31 @@
category_order="1"/> category_order="1"/>
<ccm_core.categories object_id="-400" <ccm_core.categories object_id="-400"
unique_id="f8546369-4d06-47ea-9138-345d29ab8d68" unique_id="f8546369-4d06-47ea-9138-345d29ab8d68"
parent_category_id="-300"
name="media" name="media"
enabled="true" enabled="true"
visible="true" visible="true"
abstract_category="false" abstract_category="false"
category_order="1"/> category_order="1"/>
<ccm_core.categories object_id="-410"
unique_id="713d857d-dd0e-4fc5-85d6-d85d25279a10"
parent_category_id="-400"
name="images"
enabled="true"
visible="true"
abstract_category="false"
category_order="1" />
<ccm_core.categories object_id="-420"
unique_id="9d89913d-759e-4de9-b2fb-c6f58e55de09"
parent_category_id="-400"
name="downloads"
enabled="true"
visible="true"
abstract_category="false"
category_order="1" />
<ccm_core.categories object_id="-500" <ccm_core.categories object_id="-500"
unique_id="18fbc7f4-ce7e-45d6-8dad-02887164b99d" unique_id="18fbc7f4-ce7e-45d6-8dad-02887164b99d"
parent_category_id="-300"
name="data" name="data"
enabled="true" enabled="true"
visible="true" visible="true"
@ -139,6 +165,7 @@
category_order="1" /> category_order="1" />
<ccm_core.categories object_id="-1600" <ccm_core.categories object_id="-1600"
unique_id="ec3f0d51-5d9b-440e-bb5a-5fac7da94af1" unique_id="ec3f0d51-5d9b-440e-bb5a-5fac7da94af1"
parent_category_id="-1500"
name="media" name="media"
enabled="true" enabled="true"
visible="true" visible="true"
@ -146,6 +173,7 @@
category_order="1" /> category_order="1" />
<ccm_core.categories object_id="-1700" <ccm_core.categories object_id="-1700"
unique_id="80086df3-d682-42bb-9939-8cc04a300575" unique_id="80086df3-d682-42bb-9939-8cc04a300575"
parent_category_id="-1500"
name="data" name="data"
enabled="true" enabled="true"
visible="true" visible="true"
@ -161,6 +189,12 @@
<ccm_core.category_titles object_id="-400" <ccm_core.category_titles object_id="-400"
locale="en" locale="en"
localized_value="media" /> localized_value="media" />
<ccm_core.category_titles object_id="-410"
locale="en"
localized_value="images" />
<ccm_core.category_titles object_id="-420"
locale="en"
localized_value="downloads" />
<ccm_core.category_titles object_id="-500" <ccm_core.category_titles object_id="-500"
locale="en" locale="en"
localized_value="data" /> localized_value="data" />
@ -196,6 +230,10 @@
type="ASSETS_FOLDER" /> type="ASSETS_FOLDER" />
<ccm_cms.folders object_id="-400" <ccm_cms.folders object_id="-400"
type="ASSETS_FOLDER" /> type="ASSETS_FOLDER" />
<ccm_cms.folders object_id="-410"
type="ASSETS_FOLDER" />
<ccm_cms.folders object_id="-420"
type="ASSETS_FOLDER" />
<ccm_cms.folders object_id="-500" <ccm_cms.folders object_id="-500"
type="ASSETS_FOLDER" /> type="ASSETS_FOLDER" />
<ccm_cms.folders object_id="-1400" <ccm_cms.folders object_id="-1400"
@ -222,6 +260,10 @@
content_section_id="-100" /> content_section_id="-100" />
<ccm_cms.folder_content_section_map folder_id="-400" <ccm_cms.folder_content_section_map folder_id="-400"
content_section_id="-100" /> content_section_id="-100" />
<ccm_cms.folder_content_section_map folder_id="-410"
content_section_id="-100" />
<ccm_cms.folder_content_section_map folder_id="-420"
content_section_id="-100" />
<ccm_cms.folder_content_section_map folder_id="-500" <ccm_cms.folder_content_section_map folder_id="-500"
content_section_id="-100" /> content_section_id="-100" />
<ccm_cms.folder_content_section_map folder_id="-1400" <ccm_cms.folder_content_section_map folder_id="-1400"
@ -247,7 +289,6 @@
<ccm_cms.assets object_id="-900" /> <ccm_cms.assets object_id="-900" />
<ccm_cms.assets object_id="-1000" /> <ccm_cms.assets object_id="-1000" />
<ccm_cms.assets object_id="-1100" /> <ccm_cms.assets object_id="-1100" />
<ccm_cms.assets object_id="-1150" />
<ccm_cms.assets_aud object_id="-700" <ccm_cms.assets_aud object_id="-700"
rev="0" /> rev="0" />
@ -261,6 +302,9 @@
rev="0" /> rev="0" />
<ccm_cms.assets_aud object_id="-1150" <ccm_cms.assets_aud object_id="-1150"
rev="0" /> rev="0" />
<ccm_cms.assets_aud object_id="-1150"
rev="1" />
<ccm_cms.asset_titles asset_id="-700" <ccm_cms.asset_titles asset_id="-700"
localized_value="header.png" localized_value="header.png"
@ -275,10 +319,7 @@
localized_value="product1-datasheet.pdf" localized_value="product1-datasheet.pdf"
locale="en" /> locale="en" />
<ccm_cms.asset_titles asset_id="-1100" <ccm_cms.asset_titles asset_id="-1100"
localized_value="catelog.pdf" localized_value="catalog.pdf"
locale="en" />
<ccm_cms.asset_titles asset_id="-1150"
localized_value="orphan.pdf"
locale="en" /> locale="en" />
<ccm_cms.binary_assets object_id="-700" <ccm_cms.binary_assets object_id="-700"
@ -301,10 +342,6 @@
filename="catalog.pdf" filename="catalog.pdf"
mime_type="application/pdf" mime_type="application/pdf"
data_size="0"/> data_size="0"/>
<ccm_cms.binary_assets object_id="-1150"
filename="orphan.png"
mime_type="image/png"
data_size="0"/>
<ccm_cms.binary_assets_aud object_id="-700" <ccm_cms.binary_assets_aud object_id="-700"
rev="0" rev="0"
@ -336,6 +373,9 @@
filename="orphan.png" filename="orphan.png"
mime_type="image/png" mime_type="image/png"
data_size="0" /> data_size="0" />
<ccm_cms.binary_assets_aud object_id="-1150"
rev="1" />
<ccm_cms.images object_id="-700" <ccm_cms.images object_id="-700"
height="0" height="0"
@ -346,9 +386,6 @@
<ccm_cms.images object_id="-900" <ccm_cms.images object_id="-900"
height="0" height="0"
width="0" /> width="0" />
<ccm_cms.images object_id="-1150"
height="0"
width="0" />
<ccm_cms.images_aud object_id="-700" <ccm_cms.images_aud object_id="-700"
rev="0" rev="0"
@ -366,6 +403,9 @@
rev="0" rev="0"
height="0" height="0"
width="0" /> width="0" />
<ccm_cms.images_aud object_id="-1150"
rev="1" />
<ccm_cms.files object_id="-1000" /> <ccm_cms.files object_id="-1000" />
<ccm_cms.files object_id="-1100" /> <ccm_cms.files object_id="-1100" />
@ -375,32 +415,40 @@
<ccm_cms.files_aud object_id="-1100" <ccm_cms.files_aud object_id="-1100"
rev="0" /> rev="0" />
<ccm_cms.asset_titles_aud asset_id="-700"
<ccm_cms.asset_titles_aud asset_id="-1100"
rev="0" rev="0"
revtype="0" revtype="0"
localized_value="header.png" localized_value="catalog.pdf"
locale="en" /> locale="en" />
<ccm_cms.asset_titles_aud asset_id="-800" <ccm_cms.asset_titles_aud asset_id="-1150"
rev="0" rev="0"
revtype="0" revtype="0"
localized_value="the-phb.png" localized_value="orphan.pdf"
locale="en" />
<ccm_cms.asset_titles_aud asset_id="-1150"
rev="1"
revtype="2" />
<ccm_cms.asset_titles_aud asset_id="-1000"
rev="0"
revtype="0"
localized_value="product1-datasheet.pdf"
locale="en" /> locale="en" />
<ccm_cms.asset_titles_aud asset_id="-900" <ccm_cms.asset_titles_aud asset_id="-900"
rev="0" rev="0"
revtype="0" revtype="0"
localized_value="services-header.png" localized_value="services-header.png"
locale="en" /> locale="en" />
<ccm_cms.asset_titles_aud asset_id="-1000" <ccm_cms.asset_titles_aud asset_id="-800"
rev="0" rev="0"
revtype="0" revtype="0"
localized_value="product1-datasheet.pdf" localized_value="the-phb.png"
locale="en" /> locale="en" />
<ccm_cms.asset_titles_aud asset_id="-1100" <ccm_cms.asset_titles_aud asset_id="-700"
rev="0" rev="0"
revtype="0" revtype="0"
localized_value="catelog.pdf" localized_value="header.png"
locale="en" /> locale="en" />
<ccm_cms.content_items_aud object_id="-600" <ccm_cms.content_items_aud object_id="-600"
rev="0" rev="0"
@ -454,14 +502,14 @@
category_index="false" category_index="false"
type="folder" /> type="folder" />
<ccm_core.categorizations categorization_id="-30200" <ccm_core.categorizations categorization_id="-30200"
category_id="-400" category_id="-410"
object_id="-700" object_id="-700"
category_order="1" category_order="1"
object_order="2" object_order="2"
category_index="false" category_index="false"
type="folder" /> type="folder" />
<ccm_core.categorizations categorization_id="-30300" <ccm_core.categorizations categorization_id="-30300"
category_id="-400" category_id="-410"
object_id="-800" object_id="-800"
category_order="1" category_order="1"
object_order="3" object_order="3"
@ -475,7 +523,7 @@
category_index="false" category_index="false"
type="folder" /> type="folder" />
<ccm_core.categorizations categorization_id="-30600" <ccm_core.categorizations categorization_id="-30600"
category_id="-400" category_id="-420"
object_id="-1100" object_id="-1100"
category_order="1" category_order="1"
object_order="6" object_order="6"

View File

@ -23,6 +23,12 @@
<ccm_core.ccm_objects object_id="-400" <ccm_core.ccm_objects object_id="-400"
display_name="media" display_name="media"
uuid="f8546369-4d06-47ea-9138-345d29ab8d68" /> uuid="f8546369-4d06-47ea-9138-345d29ab8d68" />
<ccm_core.ccm_objects object_id="-410"
display_name="images"
uuid="713d857d-dd0e-4fc5-85d6-d85d25279a10" />
<ccm_core.ccm_objects object_id="-420"
display_name="downloads"
uuid="9d89913d-759e-4de9-b2fb-c6f58e55de09" />
<ccm_core.ccm_objects object_id="-500" <ccm_core.ccm_objects object_id="-500"
display_name="data" display_name="data"
uuid="18fbc7f4-ce7e-45d6-8dad-02887164b99d" /> uuid="18fbc7f4-ce7e-45d6-8dad-02887164b99d" />
@ -111,13 +117,31 @@
category_order="1"/> category_order="1"/>
<ccm_core.categories object_id="-400" <ccm_core.categories object_id="-400"
unique_id="f8546369-4d06-47ea-9138-345d29ab8d68" unique_id="f8546369-4d06-47ea-9138-345d29ab8d68"
parent_category_id="-300"
name="media" name="media"
enabled="true" enabled="true"
visible="true" visible="true"
abstract_category="false" abstract_category="false"
category_order="1"/> category_order="1"/>
<ccm_core.categories object_id="-410"
unique_id="713d857d-dd0e-4fc5-85d6-d85d25279a10"
parent_category_id="-400"
name="images"
enabled="true"
visible="true"
abstract_category="false"
category_order="1" />
<ccm_core.categories object_id="-420"
unique_id="9d89913d-759e-4de9-b2fb-c6f58e55de09"
parent_category_id="-400"
name="downloads"
enabled="true"
visible="true"
abstract_category="false"
category_order="1" />
<ccm_core.categories object_id="-500" <ccm_core.categories object_id="-500"
unique_id="18fbc7f4-ce7e-45d6-8dad-02887164b99d" unique_id="18fbc7f4-ce7e-45d6-8dad-02887164b99d"
parent_category_id="-300"
name="data" name="data"
enabled="true" enabled="true"
visible="true" visible="true"
@ -139,6 +163,7 @@
category_order="1" /> category_order="1" />
<ccm_core.categories object_id="-1600" <ccm_core.categories object_id="-1600"
unique_id="ec3f0d51-5d9b-440e-bb5a-5fac7da94af1" unique_id="ec3f0d51-5d9b-440e-bb5a-5fac7da94af1"
parent_category_id="-1500"
name="media" name="media"
enabled="true" enabled="true"
visible="true" visible="true"
@ -146,6 +171,7 @@
category_order="1" /> category_order="1" />
<ccm_core.categories object_id="-1700" <ccm_core.categories object_id="-1700"
unique_id="80086df3-d682-42bb-9939-8cc04a300575" unique_id="80086df3-d682-42bb-9939-8cc04a300575"
parent_category_id="-1500"
name="data" name="data"
enabled="true" enabled="true"
visible="true" visible="true"
@ -161,6 +187,12 @@
<ccm_core.category_titles object_id="-400" <ccm_core.category_titles object_id="-400"
locale="en" locale="en"
localized_value="media" /> localized_value="media" />
<ccm_core.category_titles object_id="-410"
locale="en"
localized_value="images" />
<ccm_core.category_titles object_id="-420"
locale="en"
localized_value="downloads" />
<ccm_core.category_titles object_id="-500" <ccm_core.category_titles object_id="-500"
locale="en" locale="en"
localized_value="data" /> localized_value="data" />
@ -196,6 +228,10 @@
type="ASSETS_FOLDER" /> type="ASSETS_FOLDER" />
<ccm_cms.folders object_id="-400" <ccm_cms.folders object_id="-400"
type="ASSETS_FOLDER" /> type="ASSETS_FOLDER" />
<ccm_cms.folders object_id="-410"
type="ASSETS_FOLDER" />
<ccm_cms.folders object_id="-420"
type="ASSETS_FOLDER" />
<ccm_cms.folders object_id="-500" <ccm_cms.folders object_id="-500"
type="ASSETS_FOLDER" /> type="ASSETS_FOLDER" />
<ccm_cms.folders object_id="-1400" <ccm_cms.folders object_id="-1400"
@ -222,6 +258,10 @@
content_section_id="-100" /> content_section_id="-100" />
<ccm_cms.folder_content_section_map folder_id="-400" <ccm_cms.folder_content_section_map folder_id="-400"
content_section_id="-100" /> content_section_id="-100" />
<ccm_cms.folder_content_section_map folder_id="-410"
content_section_id="-100" />
<ccm_cms.folder_content_section_map folder_id="-420"
content_section_id="-100" />
<ccm_cms.folder_content_section_map folder_id="-500" <ccm_cms.folder_content_section_map folder_id="-500"
content_section_id="-100" /> content_section_id="-100" />
<ccm_cms.folder_content_section_map folder_id="-1400" <ccm_cms.folder_content_section_map folder_id="-1400"
@ -275,7 +315,7 @@
localized_value="product1-datasheet.pdf" localized_value="product1-datasheet.pdf"
locale="en" /> locale="en" />
<ccm_cms.asset_titles asset_id="-1100" <ccm_cms.asset_titles asset_id="-1100"
localized_value="catelog.pdf" localized_value="catalog.pdf"
locale="en" /> locale="en" />
<ccm_cms.asset_titles asset_id="-1150" <ccm_cms.asset_titles asset_id="-1150"
localized_value="orphan.pdf" localized_value="orphan.pdf"
@ -398,9 +438,13 @@
<ccm_cms.asset_titles_aud asset_id="-1100" <ccm_cms.asset_titles_aud asset_id="-1100"
rev="0" rev="0"
revtype="0" revtype="0"
localized_value="catelog.pdf" localized_value="catalog.pdf"
locale="en" />
<ccm_cms.asset_titles_aud asset_id="-1150"
rev="0"
revtype="0"
localized_value="orphan.pdf"
locale="en" /> locale="en" />
<ccm_cms.content_items_aud object_id="-600" <ccm_cms.content_items_aud object_id="-600"
rev="0" rev="0"
@ -454,14 +498,14 @@
category_index="false" category_index="false"
type="folder" /> type="folder" />
<ccm_core.categorizations categorization_id="-30200" <ccm_core.categorizations categorization_id="-30200"
category_id="-400" category_id="-410"
object_id="-700" object_id="-700"
category_order="1" category_order="1"
object_order="2" object_order="2"
category_index="false" category_index="false"
type="folder" /> type="folder" />
<ccm_core.categorizations categorization_id="-30300" <ccm_core.categorizations categorization_id="-30300"
category_id="-400" category_id="-410"
object_id="-800" object_id="-800"
category_order="1" category_order="1"
object_order="3" object_order="3"
@ -475,7 +519,7 @@
category_index="false" category_index="false"
type="folder" /> type="folder" />
<ccm_core.categorizations categorization_id="-30600" <ccm_core.categorizations categorization_id="-30600"
category_id="-400" category_id="-420"
object_id="-1100" object_id="-1100"
category_order="1" category_order="1"
object_order="6" object_order="6"

View File

@ -177,7 +177,7 @@
localized_value="product1-datasheet.pdf" localized_value="product1-datasheet.pdf"
locale="en" /> locale="en" />
<ccm_cms.asset_titles asset_id="-1100" <ccm_cms.asset_titles asset_id="-1100"
localized_value="catelog.pdf" localized_value="catalog.pdf"
locale="en" /> locale="en" />
<ccm_cms.binary_assets object_id="-700" <ccm_cms.binary_assets object_id="-700"
@ -278,7 +278,7 @@
<ccm_cms.asset_titles_aud asset_id="-1100" <ccm_cms.asset_titles_aud asset_id="-1100"
rev="0" rev="0"
revtype="0" revtype="0"
localized_value="catelog.pdf" localized_value="catalog.pdf"
locale="en" /> locale="en" />
<ccm_cms.asset_titles_aud asset_id="-800" <ccm_cms.asset_titles_aud asset_id="-800"
rev="1" rev="1"

View File

@ -177,7 +177,7 @@
localized_value="product1-datasheet.pdf" localized_value="product1-datasheet.pdf"
locale="en" /> locale="en" />
<ccm_cms.asset_titles asset_id="-1100" <ccm_cms.asset_titles asset_id="-1100"
localized_value="catelog.pdf" localized_value="catalog.pdf"
locale="en" /> locale="en" />
<ccm_cms.binary_assets object_id="-700" <ccm_cms.binary_assets object_id="-700"
@ -280,7 +280,7 @@
<ccm_cms.asset_titles_aud asset_id="-1100" <ccm_cms.asset_titles_aud asset_id="-1100"
rev="0" rev="0"
revtype="0" revtype="0"
localized_value="catelog.pdf" localized_value="catalog.pdf"
locale="en" /> locale="en" />