[FEATURE]
Das Entfernen von Instanzen (ContentItems) derjenigen ContentTypes aus den Tabellen der Datenbank, die deinstalliert werden sollen über "ccm unload". Funktionalität "ccm unload" kann jetzt auch für folgende Module verwendet werden: - ccm-cms-types-agenda - ccm-cms-types-event - ccm-cms-types-inlinesite - ccm-cms-types-job - ccm-cms-types-legalnotice - ccm-cms-types-minutes - ccm-cms-types-service - ccm-ldn-types-councillor - ccm-ldn-types-esdservice [WORK IN PROGRESS] Testen für die obigen Module git-svn-id: https://svn.libreccm.org/ccm/trunk@3469 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
1beb3dfbfe
commit
f757851423
|
|
@ -12,5 +12,6 @@
|
|||
<scripts>
|
||||
<schema directory="ccm-cms-types-agenda"/>
|
||||
<data class="com.arsdigita.cms.contenttypes.AgendaLoader"/>
|
||||
<data-unload class="com.arsdigita.cms.contenttypes.AgendaUnloader"/>
|
||||
</scripts>
|
||||
</load>
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@
|
|||
*/
|
||||
package com.arsdigita.cms.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
||||
|
||||
/**
|
||||
* Loader executes nonrecurring once at install time and loads the Agenda
|
||||
* contenttype package persistently into database.
|
||||
|
|
@ -48,6 +46,7 @@ public class AgendaLoader extends AbstractContentTypeLoader {
|
|||
*
|
||||
* @return String Array of fully qualified file names
|
||||
*/
|
||||
@Override
|
||||
public String[] getTypes() {
|
||||
return TYPES;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,5 +12,6 @@
|
|||
<scripts>
|
||||
<schema directory="ccm-cms-types-event"/>
|
||||
<data class="com.arsdigita.cms.contenttypes.EventLoader"/>
|
||||
<data-unload class="com.arsdigita.cms.contenttypes.EventUnloader"/>
|
||||
</scripts>
|
||||
</load>
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@
|
|||
*/
|
||||
package com.arsdigita.cms.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
||||
|
||||
/**
|
||||
* Loader executes nonrecurring once at install time and loads the
|
||||
* Event contenttype package persistently into database.
|
||||
|
|
@ -54,5 +52,4 @@ private static final String[] TYPES = {
|
|||
public String[] getTypes() {
|
||||
return TYPES;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,11 +18,10 @@
|
|||
*/
|
||||
package com.arsdigita.cms.contenttypes;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* Unloader deinstalles/removes when callen the ExternalLink contenttype
|
||||
* persistantly from the database.
|
||||
*
|
||||
* @author Tobias Osmers <tosmers@uni-bremen.de>
|
||||
* @version $Revision: #1 $ $Date: 2015/04/08 $
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -12,5 +12,6 @@
|
|||
<scripts>
|
||||
<schema directory="ccm-cms-types-inlinesite"/>
|
||||
<data class="com.arsdigita.cms.contenttypes.InlineSiteLoader"/>
|
||||
<data-unload class="com.arsdigita.cms.contenttypes.InlineSiteUnloader"/>
|
||||
</scripts>
|
||||
</load>
|
||||
|
|
|
|||
|
|
@ -18,9 +18,6 @@
|
|||
*/
|
||||
package com.arsdigita.cms.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
||||
|
||||
|
||||
/**
|
||||
* Loader.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -12,5 +12,6 @@
|
|||
<scripts>
|
||||
<schema directory="ccm-cms-types-job"/>
|
||||
<data class="com.arsdigita.cms.contenttypes.JobLoader"/>
|
||||
<data-unload class="com.arsdigita.cms.contenttypes.JobUnloader"/>
|
||||
</scripts>
|
||||
</load>
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@
|
|||
*/
|
||||
package com.arsdigita.cms.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
||||
|
||||
/**
|
||||
* Loader
|
||||
*
|
||||
|
|
|
|||
|
|
@ -12,5 +12,6 @@
|
|||
<scripts>
|
||||
<schema directory="ccm-cms-types-legalnotice"/>
|
||||
<data class="com.arsdigita.cms.contenttypes.LegalNoticeLoader"/>
|
||||
<data-unload class="com.arsdigita.cms.contenttypes.LegalNoticeUnloader"/>
|
||||
</scripts>
|
||||
</load>
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@
|
|||
*/
|
||||
package com.arsdigita.cms.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
||||
|
||||
/**
|
||||
* Loader
|
||||
*
|
||||
|
|
|
|||
|
|
@ -12,5 +12,6 @@
|
|||
<scripts>
|
||||
<schema directory="ccm-cms-types-minutes"/>
|
||||
<data class="com.arsdigita.cms.contenttypes.MinutesLoader"/>
|
||||
<data-unload class="com.arsdigita.cms.contenttypes.MinutesUnloader"/>
|
||||
</scripts>
|
||||
</load>
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@
|
|||
*/
|
||||
package com.arsdigita.cms.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
||||
|
||||
/**
|
||||
* Loader
|
||||
*
|
||||
|
|
|
|||
|
|
@ -12,5 +12,6 @@
|
|||
<scripts>
|
||||
<schema directory="ccm-cms-types-service"/>
|
||||
<data class="com.arsdigita.cms.contenttypes.ServiceLoader"/>
|
||||
<data-unload class="com.arsdigita.cms.contenttypes.ServiceUnloader"/>
|
||||
</scripts>
|
||||
</load>
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@
|
|||
*/
|
||||
package com.arsdigita.cms.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
||||
|
||||
/**
|
||||
* Loader
|
||||
*
|
||||
|
|
|
|||
|
|
@ -75,9 +75,10 @@ public abstract class AbstractContentTypeUnloader extends PackageLoader {
|
|||
|
||||
/**
|
||||
* Parses the content-types specified in the "contentType".xml-file and
|
||||
* stores them into a list. Then retrieves all content-sections into
|
||||
* a dataCollection and removes all the content-types stored in the list
|
||||
* from the sections in that dataCollection.
|
||||
* stores them into a list. Then retrieves all contentitems from the db into
|
||||
* a dataCollection and unpulishes and deletes all the contentitems/instances
|
||||
* to the content-types stored in the list. Then the content-types are
|
||||
* removed form all sections.
|
||||
*
|
||||
* @param ctx The context to the unload-script
|
||||
*/
|
||||
|
|
@ -92,11 +93,8 @@ public abstract class AbstractContentTypeUnloader extends PackageLoader {
|
|||
List types = handler.getContentTypes();
|
||||
Session ssn = ctx.getSession();
|
||||
|
||||
// Auf contenttype und das base.data.object.type retrieven ->
|
||||
// datacollection von den instanzen (dataObject)
|
||||
// domainobjectfactory.newInst... contentItem aus den datacollections
|
||||
// contentitem method is live. publiziert?
|
||||
// unpublish ccm-ldn-util und dann alle deleten
|
||||
// Removes all contentitems/instances of the specified
|
||||
// contenttype
|
||||
DataCollection contentItems = ssn.retrieve(
|
||||
ContentItem.BASE_DATA_OBJECT_TYPE);
|
||||
while (contentItems.next()) {
|
||||
|
|
|
|||
|
|
@ -13,5 +13,6 @@
|
|||
<scripts>
|
||||
<schema directory="ccm-ldn-coventry-councillor"/>
|
||||
<data class="com.arsdigita.coventry.cms.contenttypes.CouncillorLoader"/>
|
||||
<data-unload class="com.arsdigita.coventry.cms.contenttypes.CouncillorUnloader"/>
|
||||
</scripts>
|
||||
</load>
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@
|
|||
|
||||
package com.arsdigita.cms.contenttypes.ldn;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
||||
|
||||
/**
|
||||
* Loader.
|
||||
*
|
||||
|
|
@ -24,6 +22,7 @@ import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
|||
* @version $Id: CouncillorLoader.java 1489 2007-03-19 11:39:58Z apevec $
|
||||
*/
|
||||
public class CouncillorLoader extends AbstractContentTypeLoader {
|
||||
|
||||
public final static String versionId =
|
||||
"$Id: CouncillorLoader.java 1489 2007-03-19 11:39:58Z apevec $" +
|
||||
"$Author: apevec $" +
|
||||
|
|
|
|||
|
|
@ -13,5 +13,6 @@
|
|||
<scripts>
|
||||
<schema directory="ccm-ldn-types-esdservice"/>
|
||||
<data class="com.arsdigita.cms.contenttypes.ldn.ESDServiceLoader"/>
|
||||
<data-unload class="com.arsdigita.cms.contenttypes.ldn.ESDServiceUnloader"/>
|
||||
</scripts>
|
||||
</load>
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@
|
|||
*/
|
||||
package com.arsdigita.cms.contenttypes.ldn;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
||||
|
||||
/**
|
||||
* Loader for <code>ContentType</code> <code>ESDService</code>.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue