[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>
|
<scripts>
|
||||||
<schema directory="ccm-cms-types-agenda"/>
|
<schema directory="ccm-cms-types-agenda"/>
|
||||||
<data class="com.arsdigita.cms.contenttypes.AgendaLoader"/>
|
<data class="com.arsdigita.cms.contenttypes.AgendaLoader"/>
|
||||||
|
<data-unload class="com.arsdigita.cms.contenttypes.AgendaUnloader"/>
|
||||||
</scripts>
|
</scripts>
|
||||||
</load>
|
</load>
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,6 @@
|
||||||
*/
|
*/
|
||||||
package com.arsdigita.cms.contenttypes;
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loader executes nonrecurring once at install time and loads the Agenda
|
* Loader executes nonrecurring once at install time and loads the Agenda
|
||||||
* contenttype package persistently into database.
|
* contenttype package persistently into database.
|
||||||
|
|
@ -48,6 +46,7 @@ public class AgendaLoader extends AbstractContentTypeLoader {
|
||||||
*
|
*
|
||||||
* @return String Array of fully qualified file names
|
* @return String Array of fully qualified file names
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String[] getTypes() {
|
public String[] getTypes() {
|
||||||
return TYPES;
|
return TYPES;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,5 +12,6 @@
|
||||||
<scripts>
|
<scripts>
|
||||||
<schema directory="ccm-cms-types-event"/>
|
<schema directory="ccm-cms-types-event"/>
|
||||||
<data class="com.arsdigita.cms.contenttypes.EventLoader"/>
|
<data class="com.arsdigita.cms.contenttypes.EventLoader"/>
|
||||||
|
<data-unload class="com.arsdigita.cms.contenttypes.EventUnloader"/>
|
||||||
</scripts>
|
</scripts>
|
||||||
</load>
|
</load>
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,6 @@
|
||||||
*/
|
*/
|
||||||
package com.arsdigita.cms.contenttypes;
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loader executes nonrecurring once at install time and loads the
|
* Loader executes nonrecurring once at install time and loads the
|
||||||
* Event contenttype package persistently into database.
|
* Event contenttype package persistently into database.
|
||||||
|
|
@ -54,5 +52,4 @@ private static final String[] TYPES = {
|
||||||
public String[] getTypes() {
|
public String[] getTypes() {
|
||||||
return TYPES;
|
return TYPES;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,11 +18,10 @@
|
||||||
*/
|
*/
|
||||||
package com.arsdigita.cms.contenttypes;
|
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>
|
* @author Tobias Osmers <tosmers@uni-bremen.de>
|
||||||
* @version $Revision: #1 $ $Date: 2015/04/08 $
|
* @version $Revision: #1 $ $Date: 2015/04/08 $
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -12,5 +12,6 @@
|
||||||
<scripts>
|
<scripts>
|
||||||
<schema directory="ccm-cms-types-inlinesite"/>
|
<schema directory="ccm-cms-types-inlinesite"/>
|
||||||
<data class="com.arsdigita.cms.contenttypes.InlineSiteLoader"/>
|
<data class="com.arsdigita.cms.contenttypes.InlineSiteLoader"/>
|
||||||
|
<data-unload class="com.arsdigita.cms.contenttypes.InlineSiteUnloader"/>
|
||||||
</scripts>
|
</scripts>
|
||||||
</load>
|
</load>
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,6 @@
|
||||||
*/
|
*/
|
||||||
package com.arsdigita.cms.contenttypes;
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loader.
|
* Loader.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -12,5 +12,6 @@
|
||||||
<scripts>
|
<scripts>
|
||||||
<schema directory="ccm-cms-types-job"/>
|
<schema directory="ccm-cms-types-job"/>
|
||||||
<data class="com.arsdigita.cms.contenttypes.JobLoader"/>
|
<data class="com.arsdigita.cms.contenttypes.JobLoader"/>
|
||||||
|
<data-unload class="com.arsdigita.cms.contenttypes.JobUnloader"/>
|
||||||
</scripts>
|
</scripts>
|
||||||
</load>
|
</load>
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,6 @@
|
||||||
*/
|
*/
|
||||||
package com.arsdigita.cms.contenttypes;
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loader
|
* Loader
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -12,5 +12,6 @@
|
||||||
<scripts>
|
<scripts>
|
||||||
<schema directory="ccm-cms-types-legalnotice"/>
|
<schema directory="ccm-cms-types-legalnotice"/>
|
||||||
<data class="com.arsdigita.cms.contenttypes.LegalNoticeLoader"/>
|
<data class="com.arsdigita.cms.contenttypes.LegalNoticeLoader"/>
|
||||||
|
<data-unload class="com.arsdigita.cms.contenttypes.LegalNoticeUnloader"/>
|
||||||
</scripts>
|
</scripts>
|
||||||
</load>
|
</load>
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,6 @@
|
||||||
*/
|
*/
|
||||||
package com.arsdigita.cms.contenttypes;
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loader
|
* Loader
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -12,5 +12,6 @@
|
||||||
<scripts>
|
<scripts>
|
||||||
<schema directory="ccm-cms-types-minutes"/>
|
<schema directory="ccm-cms-types-minutes"/>
|
||||||
<data class="com.arsdigita.cms.contenttypes.MinutesLoader"/>
|
<data class="com.arsdigita.cms.contenttypes.MinutesLoader"/>
|
||||||
|
<data-unload class="com.arsdigita.cms.contenttypes.MinutesUnloader"/>
|
||||||
</scripts>
|
</scripts>
|
||||||
</load>
|
</load>
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,6 @@
|
||||||
*/
|
*/
|
||||||
package com.arsdigita.cms.contenttypes;
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loader
|
* Loader
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -12,5 +12,6 @@
|
||||||
<scripts>
|
<scripts>
|
||||||
<schema directory="ccm-cms-types-service"/>
|
<schema directory="ccm-cms-types-service"/>
|
||||||
<data class="com.arsdigita.cms.contenttypes.ServiceLoader"/>
|
<data class="com.arsdigita.cms.contenttypes.ServiceLoader"/>
|
||||||
|
<data-unload class="com.arsdigita.cms.contenttypes.ServiceUnloader"/>
|
||||||
</scripts>
|
</scripts>
|
||||||
</load>
|
</load>
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,6 @@
|
||||||
*/
|
*/
|
||||||
package com.arsdigita.cms.contenttypes;
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loader
|
* Loader
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -75,9 +75,10 @@ public abstract class AbstractContentTypeUnloader extends PackageLoader {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses the content-types specified in the "contentType".xml-file and
|
* Parses the content-types specified in the "contentType".xml-file and
|
||||||
* stores them into a list. Then retrieves all content-sections into
|
* stores them into a list. Then retrieves all contentitems from the db into
|
||||||
* a dataCollection and removes all the content-types stored in the list
|
* a dataCollection and unpulishes and deletes all the contentitems/instances
|
||||||
* from the sections in that dataCollection.
|
* 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
|
* @param ctx The context to the unload-script
|
||||||
*/
|
*/
|
||||||
|
|
@ -92,11 +93,8 @@ public abstract class AbstractContentTypeUnloader extends PackageLoader {
|
||||||
List types = handler.getContentTypes();
|
List types = handler.getContentTypes();
|
||||||
Session ssn = ctx.getSession();
|
Session ssn = ctx.getSession();
|
||||||
|
|
||||||
// Auf contenttype und das base.data.object.type retrieven ->
|
// Removes all contentitems/instances of the specified
|
||||||
// datacollection von den instanzen (dataObject)
|
// contenttype
|
||||||
// domainobjectfactory.newInst... contentItem aus den datacollections
|
|
||||||
// contentitem method is live. publiziert?
|
|
||||||
// unpublish ccm-ldn-util und dann alle deleten
|
|
||||||
DataCollection contentItems = ssn.retrieve(
|
DataCollection contentItems = ssn.retrieve(
|
||||||
ContentItem.BASE_DATA_OBJECT_TYPE);
|
ContentItem.BASE_DATA_OBJECT_TYPE);
|
||||||
while (contentItems.next()) {
|
while (contentItems.next()) {
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,6 @@
|
||||||
<scripts>
|
<scripts>
|
||||||
<schema directory="ccm-ldn-coventry-councillor"/>
|
<schema directory="ccm-ldn-coventry-councillor"/>
|
||||||
<data class="com.arsdigita.coventry.cms.contenttypes.CouncillorLoader"/>
|
<data class="com.arsdigita.coventry.cms.contenttypes.CouncillorLoader"/>
|
||||||
|
<data-unload class="com.arsdigita.coventry.cms.contenttypes.CouncillorUnloader"/>
|
||||||
</scripts>
|
</scripts>
|
||||||
</load>
|
</load>
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,6 @@
|
||||||
|
|
||||||
package com.arsdigita.cms.contenttypes.ldn;
|
package com.arsdigita.cms.contenttypes.ldn;
|
||||||
|
|
||||||
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loader.
|
* Loader.
|
||||||
*
|
*
|
||||||
|
|
@ -24,6 +22,7 @@ import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
||||||
* @version $Id: CouncillorLoader.java 1489 2007-03-19 11:39:58Z apevec $
|
* @version $Id: CouncillorLoader.java 1489 2007-03-19 11:39:58Z apevec $
|
||||||
*/
|
*/
|
||||||
public class CouncillorLoader extends AbstractContentTypeLoader {
|
public class CouncillorLoader extends AbstractContentTypeLoader {
|
||||||
|
|
||||||
public final static String versionId =
|
public final static String versionId =
|
||||||
"$Id: CouncillorLoader.java 1489 2007-03-19 11:39:58Z apevec $" +
|
"$Id: CouncillorLoader.java 1489 2007-03-19 11:39:58Z apevec $" +
|
||||||
"$Author: apevec $" +
|
"$Author: apevec $" +
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,6 @@
|
||||||
<scripts>
|
<scripts>
|
||||||
<schema directory="ccm-ldn-types-esdservice"/>
|
<schema directory="ccm-ldn-types-esdservice"/>
|
||||||
<data class="com.arsdigita.cms.contenttypes.ldn.ESDServiceLoader"/>
|
<data class="com.arsdigita.cms.contenttypes.ldn.ESDServiceLoader"/>
|
||||||
|
<data-unload class="com.arsdigita.cms.contenttypes.ldn.ESDServiceUnloader"/>
|
||||||
</scripts>
|
</scripts>
|
||||||
</load>
|
</load>
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,6 @@
|
||||||
*/
|
*/
|
||||||
package com.arsdigita.cms.contenttypes.ldn;
|
package com.arsdigita.cms.contenttypes.ldn;
|
||||||
|
|
||||||
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loader for <code>ContentType</code> <code>ESDService</code>.
|
* Loader for <code>ContentType</code> <code>ESDService</code>.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue