diff --git a/ccm-cms-assets-fileattachment/src/com/arsdigita/cms/portation/conversion/NgCmsFileAssetCollection.java b/ccm-cms-assets-fileattachment/src/com/arsdigita/cms/portation/conversion/NgCmsFileAssetCollection.java.off
similarity index 100%
rename from ccm-cms-assets-fileattachment/src/com/arsdigita/cms/portation/conversion/NgCmsFileAssetCollection.java
rename to ccm-cms-assets-fileattachment/src/com/arsdigita/cms/portation/conversion/NgCmsFileAssetCollection.java.off
diff --git a/ccm-cms-assets-fileattachment/src/com/arsdigita/cms/portation/conversion/assets/FileAssetConversion.java b/ccm-cms-assets-fileattachment/src/com/arsdigita/cms/portation/conversion/assets/FileAssetConversion.java.off
similarity index 92%
rename from ccm-cms-assets-fileattachment/src/com/arsdigita/cms/portation/conversion/assets/FileAssetConversion.java
rename to ccm-cms-assets-fileattachment/src/com/arsdigita/cms/portation/conversion/assets/FileAssetConversion.java.off
index e990f3ba5..92dbdc6d4 100644
--- a/ccm-cms-assets-fileattachment/src/com/arsdigita/cms/portation/conversion/assets/FileAssetConversion.java
+++ b/ccm-cms-assets-fileattachment/src/com/arsdigita/cms/portation/conversion/assets/FileAssetConversion.java.off
@@ -20,8 +20,9 @@ package com.arsdigita.cms.portation.conversion.assets;
import com.arsdigita.cms.contentassets.FileAttachment;
import com.arsdigita.cms.portation.modules.assets.FileAsset;
-import com.arsdigita.portation.AbstractConversion;
-import com.arsdigita.portation.cmd.ExportLogger;
+
+import org.libreccm.export.convert.AbstractDomainObjectsConverter;
+import org.libreccm.export.cmd.ExportLogger;
import java.util.List;
@@ -29,7 +30,7 @@ import java.util.List;
* @author Tobias Osmers<\a>
diff --git a/ccm-cms-assets-imagestep/src/com/arsdigita/cms/portation/conversion/NgCmsImageCollection.java b/ccm-cms-assets-imagestep/src/com/arsdigita/cms/portation/conversion/NgCmsImageCollection.java.off
similarity index 100%
rename from ccm-cms-assets-imagestep/src/com/arsdigita/cms/portation/conversion/NgCmsImageCollection.java
rename to ccm-cms-assets-imagestep/src/com/arsdigita/cms/portation/conversion/NgCmsImageCollection.java.off
diff --git a/ccm-cms-assets-imagestep/src/com/arsdigita/cms/portation/conversion/assets/ImageConversion.java b/ccm-cms-assets-imagestep/src/com/arsdigita/cms/portation/conversion/assets/ImageConversion.java.off
similarity index 93%
rename from ccm-cms-assets-imagestep/src/com/arsdigita/cms/portation/conversion/assets/ImageConversion.java
rename to ccm-cms-assets-imagestep/src/com/arsdigita/cms/portation/conversion/assets/ImageConversion.java.off
index 332f45906..2579b83c8 100644
--- a/ccm-cms-assets-imagestep/src/com/arsdigita/cms/portation/conversion/assets/ImageConversion.java
+++ b/ccm-cms-assets-imagestep/src/com/arsdigita/cms/portation/conversion/assets/ImageConversion.java.off
@@ -21,8 +21,9 @@ package com.arsdigita.cms.portation.conversion.assets;
import com.arsdigita.cms.ImageAsset;
import com.arsdigita.cms.portation.modules.assets.Image;
import com.arsdigita.cms.portation.modules.assets.LegalMetadata;
-import com.arsdigita.portation.AbstractConversion;
-import com.arsdigita.portation.cmd.ExportLogger;
+
+import org.libreccm.export.convert.AbstractDomainObjectsConverter;
+import org.libreccm.export.cmd.ExportLogger;
import java.util.List;
@@ -30,7 +31,7 @@ import java.util.List;
* @author Tobias Osmers<\a>
* @version created the 5/2/18
*/
-public class SideNoteConversion extends AbstractConversion {
+public class SideNoteConversion extends AbstractDomainObjectsConverter {
/**
* Retrieves all trunk-{@link com.arsdigita.cms.contentassets.Note}s from
* the persistent storage and collects them in a list. Then calls for
diff --git a/ccm-cms-assets-notes/src/com/arsdigita/cms/portation/modules/assets/SideNote.java b/ccm-cms-assets-notes/src/com/arsdigita/cms/portation/modules/assets/SideNote.java.off
similarity index 94%
rename from ccm-cms-assets-notes/src/com/arsdigita/cms/portation/modules/assets/SideNote.java
rename to ccm-cms-assets-notes/src/com/arsdigita/cms/portation/modules/assets/SideNote.java.off
index 9883608fc..83cbbdf29 100644
--- a/ccm-cms-assets-notes/src/com/arsdigita/cms/portation/modules/assets/SideNote.java
+++ b/ccm-cms-assets-notes/src/com/arsdigita/cms/portation/modules/assets/SideNote.java.off
@@ -21,8 +21,9 @@ package com.arsdigita.cms.portation.modules.assets;
import com.arsdigita.cms.contentassets.Note;
import com.arsdigita.cms.portation.conversion.NgCmsSideNoteCollection;
import com.arsdigita.cms.portation.modules.contentsection.Asset;
-import com.arsdigita.portation.Portable;
-import com.arsdigita.portation.modules.core.l10n.LocalizedString;
+
+import org.libreccm.export.convert.Portable;
+import org.libreccm.l10n.LocalizedString;
import java.util.Locale;
diff --git a/ccm-cms-types-article/src/com/arsdigita/cms/portation/conversion/NgCmsArticleCollection.java b/ccm-cms-types-article/src/com/arsdigita/cms/portation/conversion/NgCmsArticleCollection.java.off
similarity index 100%
rename from ccm-cms-types-article/src/com/arsdigita/cms/portation/conversion/NgCmsArticleCollection.java
rename to ccm-cms-types-article/src/com/arsdigita/cms/portation/conversion/NgCmsArticleCollection.java.off
diff --git a/ccm-cms-types-article/src/com/arsdigita/cms/portation/conversion/contenttypes/ArticleConversion.java b/ccm-cms-types-article/src/com/arsdigita/cms/portation/conversion/contenttypes/ArticleConversion.java.off
similarity index 93%
rename from ccm-cms-types-article/src/com/arsdigita/cms/portation/conversion/contenttypes/ArticleConversion.java
rename to ccm-cms-types-article/src/com/arsdigita/cms/portation/conversion/contenttypes/ArticleConversion.java.off
index 2880aaf87..be81fdc6e 100644
--- a/ccm-cms-types-article/src/com/arsdigita/cms/portation/conversion/contenttypes/ArticleConversion.java
+++ b/ccm-cms-types-article/src/com/arsdigita/cms/portation/conversion/contenttypes/ArticleConversion.java.off
@@ -19,8 +19,9 @@
package com.arsdigita.cms.portation.conversion.contenttypes;
import com.arsdigita.cms.portation.modules.contenttypes.Article;
-import com.arsdigita.portation.AbstractConversion;
-import com.arsdigita.portation.cmd.ExportLogger;
+
+import org.libreccm.export.convert.AbstractDomainObjectsConverter;
+import org.libreccm.export.cmd.ExportLogger;
import java.util.List;
@@ -28,7 +29,7 @@ import java.util.List;
* @author Tobias Osmers<\a>
* @version created the 4/19/18
*/
-public class EventConversion extends AbstractConversion {
+public class EventConversion extends AbstractDomainObjectsConverter {
/**
* Retrieves all trunk-{@link com.arsdigita.cms.contenttypes.Event}s from
* the persistent storage and collects them in a list. Then calls for
diff --git a/ccm-cms-types-event/src/com/arsdigita/cms/portation/modules/contenttypes/Event.java b/ccm-cms-types-event/src/com/arsdigita/cms/portation/modules/contenttypes/Event.java.off
similarity index 98%
rename from ccm-cms-types-event/src/com/arsdigita/cms/portation/modules/contenttypes/Event.java
rename to ccm-cms-types-event/src/com/arsdigita/cms/portation/modules/contenttypes/Event.java.off
index 26cb68add..64f0d4983 100644
--- a/ccm-cms-types-event/src/com/arsdigita/cms/portation/modules/contenttypes/Event.java
+++ b/ccm-cms-types-event/src/com/arsdigita/cms/portation/modules/contenttypes/Event.java.off
@@ -22,8 +22,9 @@ import com.arsdigita.cms.ContentBundle;
import com.arsdigita.cms.ItemCollection;
import com.arsdigita.cms.portation.conversion.NgCmsEventCollection;
import com.arsdigita.cms.portation.modules.contentsection.ContentItem;
-import com.arsdigita.portation.Portable;
-import com.arsdigita.portation.modules.core.l10n.LocalizedString;
+
+import org.libreccm.export.convert.Portable;
+import org.libreccm.l10n.LocalizedString;
import java.util.Date;
import java.util.Locale;
diff --git a/ccm-cms-types-mparticle/src/com/arsdigita/cms/portation/conversion/NgCmsMPArticleCollection.java b/ccm-cms-types-mparticle/src/com/arsdigita/cms/portation/conversion/NgCmsMPArticleCollection.java.off
similarity index 100%
rename from ccm-cms-types-mparticle/src/com/arsdigita/cms/portation/conversion/NgCmsMPArticleCollection.java
rename to ccm-cms-types-mparticle/src/com/arsdigita/cms/portation/conversion/NgCmsMPArticleCollection.java.off
diff --git a/ccm-cms-types-mparticle/src/com/arsdigita/cms/portation/conversion/contenttypes/MultiPartArticleConversion.java b/ccm-cms-types-mparticle/src/com/arsdigita/cms/portation/conversion/contenttypes/MultiPartArticleConversion.java.off
similarity index 94%
rename from ccm-cms-types-mparticle/src/com/arsdigita/cms/portation/conversion/contenttypes/MultiPartArticleConversion.java
rename to ccm-cms-types-mparticle/src/com/arsdigita/cms/portation/conversion/contenttypes/MultiPartArticleConversion.java.off
index 1fb726893..58238d2e2 100644
--- a/ccm-cms-types-mparticle/src/com/arsdigita/cms/portation/conversion/contenttypes/MultiPartArticleConversion.java
+++ b/ccm-cms-types-mparticle/src/com/arsdigita/cms/portation/conversion/contenttypes/MultiPartArticleConversion.java.off
@@ -21,8 +21,9 @@ package com.arsdigita.cms.portation.conversion.contenttypes;
import com.arsdigita.cms.contenttypes.ArticleSectionCollection;
import com.arsdigita.cms.portation.conversion.NgCmsMPArticleCollection;
import com.arsdigita.cms.portation.modules.contenttypes.MultiPartArticle;
-import com.arsdigita.portation.AbstractConversion;
-import com.arsdigita.portation.cmd.ExportLogger;
+
+import org.libreccm.export.convert.AbstractDomainObjectsConverter;
+import org.libreccm.export.cmd.ExportLogger;
import java.util.List;
@@ -30,7 +31,7 @@ import java.util.List;
* @author Tobias Osmers<\a>
* @version created the 4/20/18
*/
-public class MultiPartArticleSectionConversion extends AbstractConversion {
+public class MultiPartArticleSectionConversion extends AbstractDomainObjectsConverter {
/**
* Retrieves all
* trunk-{@link ArticleSection}s from the
diff --git a/ccm-cms-types-mparticle/src/com/arsdigita/cms/portation/modules/contenttypes/MultiPartArticle.java b/ccm-cms-types-mparticle/src/com/arsdigita/cms/portation/modules/contenttypes/MultiPartArticle.java.off
similarity index 97%
rename from ccm-cms-types-mparticle/src/com/arsdigita/cms/portation/modules/contenttypes/MultiPartArticle.java
rename to ccm-cms-types-mparticle/src/com/arsdigita/cms/portation/modules/contenttypes/MultiPartArticle.java.off
index 42dadd855..bbc3dd2c0 100644
--- a/ccm-cms-types-mparticle/src/com/arsdigita/cms/portation/modules/contenttypes/MultiPartArticle.java
+++ b/ccm-cms-types-mparticle/src/com/arsdigita/cms/portation/modules/contenttypes/MultiPartArticle.java.off
@@ -22,8 +22,9 @@ import com.arsdigita.cms.ContentBundle;
import com.arsdigita.cms.ItemCollection;
import com.arsdigita.cms.portation.conversion.NgCmsMPArticleCollection;
import com.arsdigita.cms.portation.modules.contentsection.ContentItem;
-import com.arsdigita.portation.Portable;
-import com.arsdigita.portation.modules.core.l10n.LocalizedString;
+
+import org.libreccm.export.convert.Portable;
+import org.libreccm.l10n.LocalizedString;
import com.fasterxml.jackson.annotation.JsonIdentityReference;
import java.util.ArrayList;
diff --git a/ccm-cms-types-mparticle/src/com/arsdigita/cms/portation/modules/contenttypes/MultiPartArticleSection.java b/ccm-cms-types-mparticle/src/com/arsdigita/cms/portation/modules/contenttypes/MultiPartArticleSection.java.off
similarity index 96%
rename from ccm-cms-types-mparticle/src/com/arsdigita/cms/portation/modules/contenttypes/MultiPartArticleSection.java
rename to ccm-cms-types-mparticle/src/com/arsdigita/cms/portation/modules/contenttypes/MultiPartArticleSection.java.off
index eaf2a48eb..f55612cc1 100644
--- a/ccm-cms-types-mparticle/src/com/arsdigita/cms/portation/modules/contenttypes/MultiPartArticleSection.java
+++ b/ccm-cms-types-mparticle/src/com/arsdigita/cms/portation/modules/contenttypes/MultiPartArticleSection.java.off
@@ -22,8 +22,9 @@ import com.arsdigita.cms.ContentBundle;
import com.arsdigita.cms.ItemCollection;
import com.arsdigita.cms.contenttypes.ArticleSection;
import com.arsdigita.cms.portation.conversion.NgCmsMPArticleCollection;
-import com.arsdigita.portation.Portable;
-import com.arsdigita.portation.modules.core.l10n.LocalizedString;
+
+import org.libreccm.export.convert.Portable;
+import org.libreccm.l10n.LocalizedString;
import java.util.Locale;
diff --git a/ccm-cms-types-newsitem/src/com/arsdigita/cms/portation/conversion/NgCmsNewsCollection.java b/ccm-cms-types-newsitem/src/com/arsdigita/cms/portation/conversion/NgCmsNewsCollection.java.off
similarity index 100%
rename from ccm-cms-types-newsitem/src/com/arsdigita/cms/portation/conversion/NgCmsNewsCollection.java
rename to ccm-cms-types-newsitem/src/com/arsdigita/cms/portation/conversion/NgCmsNewsCollection.java.off
diff --git a/ccm-cms-types-newsitem/src/com/arsdigita/cms/portation/conversion/contenttypes/NewsConversion.java b/ccm-cms-types-newsitem/src/com/arsdigita/cms/portation/conversion/contenttypes/NewsConversion.java.off
similarity index 92%
rename from ccm-cms-types-newsitem/src/com/arsdigita/cms/portation/conversion/contenttypes/NewsConversion.java
rename to ccm-cms-types-newsitem/src/com/arsdigita/cms/portation/conversion/contenttypes/NewsConversion.java.off
index dd5e5d878..51ce355b4 100644
--- a/ccm-cms-types-newsitem/src/com/arsdigita/cms/portation/conversion/contenttypes/NewsConversion.java
+++ b/ccm-cms-types-newsitem/src/com/arsdigita/cms/portation/conversion/contenttypes/NewsConversion.java.off
@@ -20,8 +20,9 @@ package com.arsdigita.cms.portation.conversion.contenttypes;
import com.arsdigita.cms.contenttypes.NewsItem;
import com.arsdigita.cms.portation.modules.contenttypes.News;
-import com.arsdigita.portation.AbstractConversion;
-import com.arsdigita.portation.cmd.ExportLogger;
+
+import org.libreccm.export.convert.AbstractDomainObjectsConverter;
+import org.libreccm.export.cmd.ExportLogger;
import java.util.List;
@@ -29,7 +30,7 @@ import java.util.List;
* @author DataObject is retrieved from the persistent storage
- * mechanism with an
- * An internal content type is one that is not user-defined and maintained internally. A content
- * type should be made internal under the following two conditions:OID specified by oid.
+ * Constructor. The contained DataObject is retrieved from the
+ * persistent storage mechanism with an OID specified by
+ * oid.
*
- * @param oid The OID for the retrieved DataObject.
+ * @param oid The OID for the retrieved
+ * DataObject.
*
*/
public ContentType(OID oid) throws DataObjectNotFoundException {
@@ -126,9 +133,9 @@ public class ContentType extends ACSObject {
}
/**
- * Constructor. The contained DataObject is retrieved from the persistent storage
- * mechanism with an OID specified by id and
- * ContentType.BASE_DATA_OBJECT_TYPE.
+ * Constructor. The contained DataObject is retrieved from the
+ * persistent storage mechanism with an OID specified by
+ * id and ContentType.BASE_DATA_OBJECT_TYPE.
*
* @param id The id for the retrieved DataObject.
*
@@ -146,8 +153,8 @@ public class ContentType extends ACSObject {
}
/**
- * @return the base PDL object type for this item. Child classes should override this method to
- * return the correct value
+ * @return the base PDL object type for this item. Child classes should
+ * override this method to return the correct value
*/
@Override
public String getBaseDataObjectType() {
@@ -163,9 +170,9 @@ public class ContentType extends ACSObject {
}
/**
- * Returns the object type of the items of this content type. (For example: If I create a
- * ContentType "foo". Then a I create an item "bar" of type foo. This associated object type is
- * the same as bar.getObjectType())
+ * Returns the object type of the items of this content type. (For example:
+ * If I create a ContentType "foo". Then a I create an item "bar" of type
+ * foo. This associated object type is the same as bar.getObjectType())
*
* @return The data object type representation of this content type
*/
@@ -183,15 +190,17 @@ public class ContentType extends ACSObject {
}
/**
- * Fetches the label for the content type. The label is a globalized notation displayed to the
- * user to identify the content type. As an example a content type named "Article" (as in
- * getName()) will be displayed in an english environment as the label "Article", in German as
+ * Fetches the label for the content type. The label is a globalized
+ * notation displayed to the user to identify the content type. As an
+ * example a content type named "Article" (as in getName()) will be
+ * displayed in an english environment as the label "Article", in German as
* "Artikel", etc.
*
- * The label is retrieved from content type's resources. The message uses some convention to
- * retrieve the message key and resource bundle.
+ * The label is retrieved from content type's resources. The message uses
+ * some convention to retrieve the message key and resource bundle.
*
- * Client classes may overwrite the method to provide a label from a different source.
+ * Client classes may overwrite the method to provide a label from a
+ * different source.
*
* @return The (globalized) label.
*/
@@ -225,7 +234,8 @@ public class ContentType extends ACSObject {
// We assume the name of the key in resource bundle is the same as
// the ObjectType minus the domain part ("com.arsdigita.")
// and starting with "cms" and suffix ".type_label" appended
- String labelKey = objectTypeName.substring(objectTypeName.indexOf("cms"))
+ String labelKey = objectTypeName
+ .substring(objectTypeName.indexOf("cms"))
.concat(".type_label")
.toLowerCase();
if (s_log.isDebugEnabled()) {
@@ -234,7 +244,8 @@ public class ContentType extends ACSObject {
// First try: check, if the resource file really exists, and if it does,
// use it.
- if (this.getClass().getClassLoader().getResource(bundleResourcePath) != null) {
+ if (this.getClass().getClassLoader().getResource(bundleResourcePath)
+ != null) {
s_log.debug("Found resource file, using it.");
// Property file exists, use it!
final String bundleName = objectTypeName.concat("Resources");
@@ -243,7 +254,8 @@ public class ContentType extends ACSObject {
} else {
s_log.debug("No resource file found, using item's definition file");
// No property file found, try to use the item's definition file
- final InputStream defFile = Thread.currentThread().getContextClassLoader()
+ final InputStream defFile = Thread.currentThread()
+ .getContextClassLoader()
.getResourceAsStream(typeResourcePath);
if (defFile == null) {
@@ -266,17 +278,20 @@ public class ContentType extends ACSObject {
// As a proper example:
// /WEB-INF/content-types/com.arsditita.cms.contenttypes.Event.xml
try {
- final SAXParserFactory parserFactory = SAXParserFactory.newInstance();
+ final SAXParserFactory parserFactory = SAXParserFactory
+ .newInstance();
final SAXParser parser = parserFactory.newSAXParser();
final BundleName bundleName = new BundleName();
parser.parse(defFile, bundleName);
if (bundleName.getName() == null) {
// Fallback to the non-globalized identifier (name)
- s_log.warn("Failed to translate content type name. No bundle found.");
+ s_log.warn(
+ "Failed to translate content type name. No bundle found.");
return new GlobalizedMessage(getName());
} else {
- label = new GlobalizedMessage(labelKey, bundleName.getName());
+ label = new GlobalizedMessage(labelKey, bundleName
+ .getName());
}
} catch (ParserConfigurationException ex) {
s_log.warn("Failed to translate content type name:", ex);
@@ -337,10 +352,11 @@ public class ContentType extends ACSObject {
}
/**
- * Fetches the name for the content type. The name is a fixed String, which 'names' a content
- * type and is not localizible. It is stored in the database and a symbolic name for the formal
- * ID. It may contain any characters but is preferable an english term. Examples are "FAQ item"
- * or "Article" or "Multipart Article". It has to be unique system-wide.
+ * Fetches the name for the content type. The name is a fixed String, which
+ * 'names' a content type and is not localizible. It is stored in the
+ * database and a symbolic name for the formal ID. It may contain any
+ * characters but is preferable an english term. Examples are "FAQ item" or
+ * "Article" or "Multipart Article". It has to be unique system-wide.
*
* @return The name (ie. may be used as a non-localized label)
*/
@@ -353,8 +369,9 @@ public class ContentType extends ACSObject {
*
* @see getName() for additional details.
*
- * The name is stored in the database. In the database this property is stored under 'label',
- * when globliation was not an issue. The Method is primarly used in the initial loading step.
+ * The name is stored in the database. In the database this property is
+ * stored under 'label', when globliation was not an issue. The Method is
+ * primarly used in the initial loading step.
*
* @param name The name
*/
@@ -400,19 +417,24 @@ public class ContentType extends ACSObject {
/**
*
- * The {@link com.arsdigita.cms.Template} content type is one such internal content type.
+ * The {@link com.arsdigita.cms.Template} content type is one such internal + * content type. * - * @return Boolean.TRUE if this content type is internal, Boolean.FALSE otherwise. + * @return Boolean.TRUE if this content type is internal, Boolean.FALSE + * otherwise. */ public Boolean isInternal() { return "I".equalsIgnoreCase((String) get(MODE)); @@ -420,11 +442,13 @@ public class ContentType extends ACSObject { /** *
- * A hidden content type is one that is not user-defined but not meant to be used directly (p.
- * ex. GenericArticle). in contrast they provide some basic features for different kind of
- * content type to be extended from. Also, they are legit perents for UDCTs.
+ * A hidden content type is one that is not user-defined but not meant to be
+ * used directly (p. ex. GenericArticle). in contrast they provide some
+ * basic features for different kind of content type to be extended from.
+ * Also, they are legit perents for UDCTs.
*
- * @return Boolean.TRUE if this content type is internal, Boolean.FALSE otherwise.
+ * @return Boolean.TRUE if this content type is internal, Boolean.FALSE
+ * otherwise.
*/
public Boolean isHidden() {
return "H".equalsIgnoreCase((String) get(MODE));
@@ -462,18 +486,19 @@ public class ContentType extends ACSObject {
}
/**
- * Create an authoring kit to this content type. To save this authoring kit, you need to call
- * save() method on the returned AuthoringKit.
+ * Create an authoring kit to this content type. To save this authoring kit,
+ * you need to call save() method on the returned AuthoringKit.
*/
public AuthoringKit createAuthoringKit() {
return createAuthoringKit(null);
}
/**
- * Create an authoring kit to this content type. To save this authoring kit, you need to call
- * save() method on the returned AuthoringKit.
+ * Create an authoring kit to this content type. To save this authoring kit,
+ * you need to call save() method on the returned AuthoringKit.
*
- * @param createComponent the create component class associated with the authoring kit
+ * @param createComponent the create component class associated with the
+ * authoring kit
*/
public AuthoringKit createAuthoringKit(String createComponent) {
@@ -491,20 +516,22 @@ public class ContentType extends ACSObject {
}
/**
- * Fetch the item creation form id of the Java domain object implementation. applies to
- * user-defined types
+ * Fetch the item creation form id of the Java domain object implementation.
+ * applies to user-defined types
*
- * @return The id of the persistent form used to create an item of this content type
+ * @return The id of the persistent form used to create an item of this
+ * content type
*/
public BigDecimal getItemFormID() {
return (BigDecimal) get(ITEM_FORM_ID);
}
/**
- * Sets the item creation form id of the Java domain object implementation. applies to
- * user-defined types
+ * Sets the item creation form id of the Java domain object implementation.
+ * applies to user-defined types
*
- * @param itemFormID The id of the persistent form used to create an item of this content type
+ * @param itemFormID The id of the persistent form used to create an item of
+ * this content type
*/
public void setItemFormID(BigDecimal itemFormID) {
set(ITEM_FORM_ID, itemFormID);
@@ -513,8 +540,8 @@ public class ContentType extends ACSObject {
/**
* Retrieve the persistent form of this content type
*
- * @return the persistent form used to create or edit content items of this type (only applies
- * to user-defined types)
+ * @return the persistent form used to create or edit content items of this
+ * type (only applies to user-defined types)
*/
public PersistentForm getItemForm() throws DataObjectNotFoundException {
@@ -692,7 +719,8 @@ public class ContentType extends ACSObject {
}
/**
- * Fetches a collection of all content types, including internal content types.
+ * Fetches a collection of all content types, including internal content
+ * types.
*
* @return A collection of all content types
*/
@@ -701,9 +729,11 @@ public class ContentType extends ACSObject {
}
/**
- * Fetches a collection of all content types, including internal content types.
+ * Fetches a collection of all content types, including internal content
+ * types.
*
- * @param hidden If false, fetch all content types, ecluding hidden content types
+ * @param hidden If false, fetch all content types, ecluding hidden content
+ * types
*
* @return A collection of all content types
*/
@@ -721,11 +751,15 @@ public class ContentType extends ACSObject {
}
/**
- * @param internal If false, fetch all content types, excluding internal content types.
- * @param hidden If false, fetch all content types, excluding hidden content types.
+ * @param internal If false, fetch all content types, excluding internal
+ * content types.
+ * @param hidden If false, fetch all content types, excluding hidden
+ * content types.
*/
- private static ContentTypeCollection getAllContentTypes(boolean internal, boolean hidden) {
- DataCollection da = SessionManager.getSession().retrieve(BASE_DATA_OBJECT_TYPE);
+ private static ContentTypeCollection getAllContentTypes(boolean internal,
+ boolean hidden) {
+ DataCollection da = SessionManager.getSession().retrieve(
+ BASE_DATA_OBJECT_TYPE);
ContentTypeCollection types = new ContentTypeCollection(da);
if (!internal) {
@@ -739,8 +773,8 @@ public class ContentType extends ACSObject {
}
/**
- * Fetches a collection of content types that have been registered to at least one content
- * section, excluding internal content types.
+ * Fetches a collection of content types that have been registered to at
+ * least one content section, excluding internal content types.
*
* @return A collection of registered content types
*/
@@ -771,9 +805,11 @@ public class ContentType extends ACSObject {
// Or must be a descendant of the requested type
try {
- StringTokenizer strTok = new StringTokenizer(ct.getDescendants(), "/");
+ StringTokenizer strTok = new StringTokenizer(ct.getDescendants(),
+ "/");
while (strTok.hasMoreElements()) {
- or.addFilter(ff.equals(ContentType.ID, (String) strTok.nextElement()));
+ or.addFilter(ff.equals(ContentType.ID, (String) strTok
+ .nextElement()));
}
} catch (Exception ex) {
// WTF? The selected content type does not exist in the table???
@@ -786,7 +822,8 @@ public class ContentType extends ACSObject {
private static List s_xsl = new ArrayList();
/**
- * Registers an XSL file against a content type. NB this interface is liable to change.
+ * Registers an XSL file against a content type. NB this interface is liable
+ * to change.
*
* @param type the content type
* @param path the path relative to the server root
@@ -796,7 +833,8 @@ public class ContentType extends ACSObject {
}
/**
- * Unregisters an XSL file against a content type. NB this interface is liable to change.
+ * Unregisters an XSL file against a content type. NB this interface is
+ * liable to change.
*
* @param type the content type
* @param path the path relative to the server root
@@ -893,8 +931,8 @@ public class ContentType extends ACSObject {
}
/**
- * Retrieves all objects of this type stored in the database. Very
- * necessary for exporting all entities of the current work environment.
+ * Retrieves all objects of this type stored in the database. Very necessary
+ * for exporting all entities of the current work environment.
*
* @return List of all objects
*/
@@ -903,11 +941,11 @@ public class ContentType extends ACSObject {
final Session session = SessionManager.getSession();
DomainCollection collection = new DomainCollection(session.retrieve(
- ContentType.BASE_DATA_OBJECT_TYPE));
+ ContentType.BASE_DATA_OBJECT_TYPE));
while (collection.next()) {
ContentType object = (ContentType) collection
- .getDomainObject();
+ .getDomainObject();
if (object != null) {
objectList.add(object);
}
@@ -916,4 +954,5 @@ public class ContentType extends ACSObject {
collection.close();
return objectList;
}
+
}
diff --git a/ccm-cms/src/com/arsdigita/cms/portation/conversion/CmsConverter.java b/ccm-cms/src/com/arsdigita/cms/portation/conversion/CmsConverter.java.off
similarity index 97%
rename from ccm-cms/src/com/arsdigita/cms/portation/conversion/CmsConverter.java
rename to ccm-cms/src/com/arsdigita/cms/portation/conversion/CmsConverter.java.off
index 9558c3412..8272c7b58 100644
--- a/ccm-cms/src/com/arsdigita/cms/portation/conversion/CmsConverter.java
+++ b/ccm-cms/src/com/arsdigita/cms/portation/conversion/CmsConverter.java.off
@@ -25,7 +25,8 @@ import com.arsdigita.cms.portation.conversion.lifecycle.LifecycleConversion;
import com.arsdigita.cms.portation.conversion.lifecycle.LifecycleDefinitionConversion;
import com.arsdigita.cms.portation.conversion.lifecycle.PhaseConversion;
import com.arsdigita.cms.portation.conversion.lifecycle.PhaseDefinitionConversion;
-import com.arsdigita.portation.AbstractConverter;
+
+import org.libreccm.export.convert.AbstractDomainObjectConverter;
import java.lang.reflect.Method;
@@ -33,7 +34,7 @@ import java.lang.reflect.Method;
* @author Tobias Osmers<\a>
* @version created the 4/16/18
*/
-public class ContentSectionConversion extends AbstractConversion {
+public class ContentSectionConversion extends AbstractDomainObjectsConverter {
private static ContentSectionConversion instance;
static {
@@ -107,12 +111,12 @@ public class ContentSectionConversion extends AbstractConversion {
contentSection.setRootAssetsFolder(rootAssetsFolder);
rootAssetsFolder.setSection(contentSection);
- // set roles
+ // set ROLES
RoleCollection roleCollection = trunkContentSection
.getStaffGroup().getRoles();
while (roleCollection.next()) {
- contentSection.addRole(NgCoreCollection
- .roles
+ contentSection.addRole(CcmCoreEntities
+ .ROLES
.get(roleCollection
.getRole()
.getID()
@@ -156,8 +160,8 @@ public class ContentSectionConversion extends AbstractConversion {
TaskCollection workflowTemplateCollection = trunkContentSection
.getWorkflowTemplates();
while (workflowTemplateCollection.next()) {
- final Workflow template = NgCoreCollection
- .workflows
+ final Workflow template = CcmCoreEntities
+ .WORKFLOWS
.get(workflowTemplateCollection
.getTask()
.getID()
@@ -207,8 +211,8 @@ public class ContentSectionConversion extends AbstractConversion {
ContentTypeWorkflowTemplate.getWorkflowTemplate(
trunkContentSection, trunkContentType);
if (trunkWorkflowTemplate != null) {
- final Workflow defaultWorkflow = NgCoreCollection
- .workflows
+ final Workflow defaultWorkflow = CcmCoreEntities
+ .WORKFLOWS
.get(trunkWorkflowTemplate
.getID()
.longValue());
diff --git a/ccm-cms/src/com/arsdigita/cms/portation/conversion/contentsection/ContentTypeConversion.java b/ccm-cms/src/com/arsdigita/cms/portation/conversion/contentsection/ContentTypeConversion.java.off
similarity index 93%
rename from ccm-cms/src/com/arsdigita/cms/portation/conversion/contentsection/ContentTypeConversion.java
rename to ccm-cms/src/com/arsdigita/cms/portation/conversion/contentsection/ContentTypeConversion.java.off
index 5b3ef811d..aa97886f8 100644
--- a/ccm-cms/src/com/arsdigita/cms/portation/conversion/contentsection/ContentTypeConversion.java
+++ b/ccm-cms/src/com/arsdigita/cms/portation/conversion/contentsection/ContentTypeConversion.java.off
@@ -19,8 +19,9 @@
package com.arsdigita.cms.portation.conversion.contentsection;
import com.arsdigita.cms.portation.modules.contentsection.ContentType;
-import com.arsdigita.portation.AbstractConversion;
-import com.arsdigita.portation.cmd.ExportLogger;
+
+import org.libreccm.export.convert.AbstractDomainObjectsConverter;
+import org.libreccm.export.cmd.ExportLogger;
import java.util.List;
@@ -28,7 +29,7 @@ import java.util.List;
* @author Tobias Osmers<\a>
* @version created the 4/16/18
*/
-public class FolderConversion extends AbstractConversion {
+public class FolderConversion extends AbstractDomainObjectsConverter {
private static FolderConversion instance;
static {
diff --git a/ccm-cms/src/com/arsdigita/cms/portation/conversion/lifecycle/LifecycleConversion.java b/ccm-cms/src/com/arsdigita/cms/portation/conversion/lifecycle/LifecycleConversion.java.off
similarity index 94%
rename from ccm-cms/src/com/arsdigita/cms/portation/conversion/lifecycle/LifecycleConversion.java
rename to ccm-cms/src/com/arsdigita/cms/portation/conversion/lifecycle/LifecycleConversion.java.off
index f27dcd9f9..e29e990e4 100644
--- a/ccm-cms/src/com/arsdigita/cms/portation/conversion/lifecycle/LifecycleConversion.java
+++ b/ccm-cms/src/com/arsdigita/cms/portation/conversion/lifecycle/LifecycleConversion.java.off
@@ -20,8 +20,9 @@ package com.arsdigita.cms.portation.conversion.lifecycle;
import com.arsdigita.cms.portation.conversion.NgCmsCollection;
import com.arsdigita.cms.portation.modules.lifecycle.Lifecycle;
-import com.arsdigita.portation.AbstractConversion;
-import com.arsdigita.portation.cmd.ExportLogger;
+
+import org.libreccm.export.convert.AbstractDomainObjectsConverter;
+import org.libreccm.export.cmd.ExportLogger;
import java.util.List;
@@ -29,7 +30,7 @@ import java.util.List;
* @author Tobias Osmers<\a>
* @version created the 3/26/18
*/
-public class LifecycleDefinitionConversion extends AbstractConversion {
+public class LifecycleDefinitionConversion extends AbstractDomainObjectsConverter {
private static LifecycleDefinitionConversion instance;
static {
diff --git a/ccm-cms/src/com/arsdigita/cms/portation/conversion/lifecycle/PhaseConversion.java b/ccm-cms/src/com/arsdigita/cms/portation/conversion/lifecycle/PhaseConversion.java.off
similarity index 94%
rename from ccm-cms/src/com/arsdigita/cms/portation/conversion/lifecycle/PhaseConversion.java
rename to ccm-cms/src/com/arsdigita/cms/portation/conversion/lifecycle/PhaseConversion.java.off
index 1d21fde5e..6d66aef49 100644
--- a/ccm-cms/src/com/arsdigita/cms/portation/conversion/lifecycle/PhaseConversion.java
+++ b/ccm-cms/src/com/arsdigita/cms/portation/conversion/lifecycle/PhaseConversion.java.off
@@ -21,8 +21,9 @@ package com.arsdigita.cms.portation.conversion.lifecycle;
import com.arsdigita.cms.portation.conversion.NgCmsCollection;
import com.arsdigita.cms.portation.modules.lifecycle.Lifecycle;
import com.arsdigita.cms.portation.modules.lifecycle.Phase;
-import com.arsdigita.portation.AbstractConversion;
-import com.arsdigita.portation.cmd.ExportLogger;
+
+import org.libreccm.export.convert.AbstractDomainObjectsConverter;
+import org.libreccm.export.cmd.ExportLogger;
import java.util.List;
@@ -30,7 +31,7 @@ import java.util.List;
* @author Tobias Osmers<\a>
* @version created the 3/26/18
*/
-public class PhaseDefinitionConversion extends AbstractConversion {
+public class PhaseDefinitionConversion extends AbstractDomainObjectsConverter {
private static PhaseDefinitionConversion instance;
static {
diff --git a/ccm-cms/src/com/arsdigita/cms/portation/modules/CmsExporter.java b/ccm-cms/src/com/arsdigita/cms/portation/modules/CmsExporter.java.off
similarity index 92%
rename from ccm-cms/src/com/arsdigita/cms/portation/modules/CmsExporter.java
rename to ccm-cms/src/com/arsdigita/cms/portation/modules/CmsExporter.java.off
index e15082522..0688e1807 100644
--- a/ccm-cms/src/com/arsdigita/cms/portation/modules/CmsExporter.java
+++ b/ccm-cms/src/com/arsdigita/cms/portation/modules/CmsExporter.java.off
@@ -18,13 +18,13 @@
*/
package com.arsdigita.cms.portation.modules;
-import com.arsdigita.portation.AbstractExporter;
+import org.libreccm.export.convert.AbstractExporterManager;
/**
* @author \n" +
- "\n" +
- "Available commands:\n" +
- "\thelp" +
- "\t\t\t\t\t Shows information on how to use this tool.\n" +
- "\tconvert" +
- "\t\t\t\t\t Converts all trunk objects to ng objects.\n" +
- "\texport ExportException without detail message.
+ */
+ public ExportException() {
+ super();
+ }
+
+
+ /**
+ * Constructs an instance of ExportException with the specified detail message.
+ *
+ * @param msg The detail message.
+ */
+ public ExportException(final String msg) {
+ super(msg);
+ }
+
+ /**
+ * Constructs an instance of ExportException which wraps the
+ * specified exception.
+ *
+ * @param exception The exception to wrap.
+ */
+ public ExportException(final Exception exception) {
+ super(exception);
+ }
+
+ /**
+ * Constructs an instance of ExportException with the specified message which also wraps the
+ * specified exception.
+ *
+ * @param msg The detail message.
+ * @param exception The exception to wrap.
+ */
+ public ExportException(final String msg, final Exception exception) {
+ super(msg, exception);
+ }
+}
diff --git a/ccm-core/src/org/libreccm/export/ExportManager.java b/ccm-core/src/org/libreccm/export/ExportManager.java
new file mode 100644
index 000000000..830d84864
--- /dev/null
+++ b/ccm-core/src/org/libreccm/export/ExportManager.java
@@ -0,0 +1,257 @@
+package org.libreccm.export;
+
+import com.arsdigita.util.UncheckedWrapperException;
+import com.arsdigita.web.WebConfig;
+
+import com.fasterxml.jackson.core.JsonEncoding;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.fasterxml.jackson.core.JsonFactory;
+import com.fasterxml.jackson.core.JsonGenerator;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+public final class ExportManager {
+
+ private static final ExportManager INSTANCE = new ExportManager();
+
+ private List