From 43891e180c2de7148f8a714bc9a8bf3564475d1b Mon Sep 17 00:00:00 2001 From: jensp Date: Sun, 28 Jun 2015 11:18:19 +0000 Subject: [PATCH] Some work on the unload step git-svn-id: https://svn.libreccm.org/ccm/trunk@3510 8810af33-2d31-482b-a856-94f89814c4df --- .../arsdigita/cms/contenttypes/ExternalLinkLoader.java | 2 +- .../arsdigita/cms/contenttypes/ContentTypeHelperImpl.java | 8 +++++++- .../arsdigita/cms/contenttypes/XMLContentTypeHandler.java | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ccm-cms-types-externallink/src/com/arsdigita/cms/contenttypes/ExternalLinkLoader.java b/ccm-cms-types-externallink/src/com/arsdigita/cms/contenttypes/ExternalLinkLoader.java index 2fa0402fb..864c28025 100644 --- a/ccm-cms-types-externallink/src/com/arsdigita/cms/contenttypes/ExternalLinkLoader.java +++ b/ccm-cms-types-externallink/src/com/arsdigita/cms/contenttypes/ExternalLinkLoader.java @@ -20,11 +20,11 @@ package com.arsdigita.cms.contenttypes; import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.ContentType; -import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader; import com.arsdigita.cms.lifecycle.LifecycleDefinition; import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.ResourceParameter; import com.arsdigita.workflow.simple.WorkflowTemplate; + import java.io.InputStream; /** diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ContentTypeHelperImpl.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ContentTypeHelperImpl.java index ece37f670..44ab20b56 100755 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ContentTypeHelperImpl.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ContentTypeHelperImpl.java @@ -337,7 +337,13 @@ public class ContentTypeHelperImpl implements ContentTypeHelper { @Override public void deleteType() { - m_kit.delete(); + //m_kit.delete(); + final AuthoringKit kit = m_type.getAuthoringKit(); + final AuthoringStepCollection steps = kit.getSteps(); + while(steps.next()) { + kit.removeStep(steps.getAuthoringStep()); + } + m_type.getAuthoringKit().delete(); m_type.delete(); } diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/XMLContentTypeHandler.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/XMLContentTypeHandler.java index f59b69153..e1856e4da 100755 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/XMLContentTypeHandler.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/XMLContentTypeHandler.java @@ -146,7 +146,7 @@ public class XMLContentTypeHandler extends DefaultHandler { } if (!create && deletableType) { - //m_type.deleteType(); + m_type.deleteType(); } }