Die Initalizer SciDepartmentWithPublicationsInitializer, SciOrganizationWithPublicationsInitializer und SciProjectWithPublicationsInitializer blieben bei einem mehrfachen Start von CCM (mehrere

Instanzen) bei der zweiten Instanz hängen.


git-svn-id: https://svn.libreccm.org/ccm/trunk@966 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2011-06-17 10:30:23 +00:00
parent 7d648db23a
commit 61171e5cdb
5 changed files with 23 additions and 18 deletions

View File

@ -71,7 +71,6 @@ public abstract class ContentTypeInitializer extends CompoundInitializer {
final String url = RuntimeConfig.getConfig().getJDBCURL(); final String url = RuntimeConfig.getConfig().getJDBCURL();
final int database = DbHelper.getDatabaseFromURL(url); final int database = DbHelper.getDatabaseFromURL(url);
add(new PDLInitializer add(new PDLInitializer
(new ManifestSource (new ManifestSource
(manifestFile, (manifestFile,
@ -112,7 +111,6 @@ public abstract class ContentTypeInitializer extends CompoundInitializer {
for (int i = 0; i < stylesheets.length; i++) { for (int i = 0; i < stylesheets.length; i++) {
String stylesheet = stylesheets[i]; String stylesheet = stylesheets[i];
ContentType.registerXSLFile(type, stylesheet); ContentType.registerXSLFile(type, stylesheet);
} }
} catch (com.arsdigita.domain.DataObjectNotFoundException e) { } catch (com.arsdigita.domain.DataObjectNotFoundException e) {
s_log.debug("Unable to register the stylesheet for " + s_log.debug("Unable to register the stylesheet for " +

View File

@ -34,7 +34,7 @@ public class SciDepartmentWithPublicationsInitializer
public SciDepartmentWithPublicationsInitializer() { public SciDepartmentWithPublicationsInitializer() {
super("empty.pdl.mf", super("empty.pdl.mf",
SciOrganizationWithPublications.BASE_DATA_OBJECT_TYPE); SciDepartmentWithPublications.BASE_DATA_OBJECT_TYPE);
} }
@Override @Override
@ -44,7 +44,9 @@ public class SciDepartmentWithPublicationsInitializer
ContentType departmentType = ContentType departmentType =
ContentType.findByAssociatedObjectType(SciDepartment.class. ContentType.findByAssociatedObjectType(SciDepartment.class.
getName()); getName());
departmentType.setMode("internal"); if (!departmentType.isInternal()) {
departmentType.setMode("internal");
}
AuthoringKitWizard.registerAssetStep(Publication.BASE_DATA_OBJECT_TYPE, AuthoringKitWizard.registerAssetStep(Publication.BASE_DATA_OBJECT_TYPE,
PublicationSciDepartmentStep.class, PublicationSciDepartmentStep.class,

View File

@ -44,7 +44,10 @@ public class SciOrganizationWithPublicationsInitializer
ContentType orgaType = ContentType orgaType =
ContentType.findByAssociatedObjectType(SciOrganization.class. ContentType.findByAssociatedObjectType(SciOrganization.class.
getName()); getName());
orgaType.setMode("internal"); if (!orgaType.isInternal()) {
orgaType.setMode("internal");
}
System.out.println("Set mode to interal");
AuthoringKitWizard.registerAssetStep(Publication.BASE_DATA_OBJECT_TYPE, AuthoringKitWizard.registerAssetStep(Publication.BASE_DATA_OBJECT_TYPE,
PublicationSciOrganizationStep.class, PublicationSciOrganizationStep.class,

View File

@ -34,7 +34,7 @@ public class SciProjectWithPublicationsInitializer
public SciProjectWithPublicationsInitializer() { public SciProjectWithPublicationsInitializer() {
super("empty.pdl.mf", super("empty.pdl.mf",
SciOrganizationWithPublications.BASE_DATA_OBJECT_TYPE); SciProjectWithPublications.BASE_DATA_OBJECT_TYPE);
} }
@Override @Override
@ -44,9 +44,11 @@ public class SciProjectWithPublicationsInitializer
ContentType projectType = ContentType projectType =
ContentType.findByAssociatedObjectType(SciProject.class. ContentType.findByAssociatedObjectType(SciProject.class.
getName()); getName());
projectType.setMode("internal"); if (!projectType.isInternal()) {
projectType.setMode("internal");
}
AuthoringKitWizard.registerAssetStep(Publication.BASE_DATA_OBJECT_TYPE, AuthoringKitWizard.registerAssetStep(Publication.BASE_DATA_OBJECT_TYPE,
PublicationSciProjectStep.class, PublicationSciProjectStep.class,
new GlobalizedMessage( new GlobalizedMessage(
"sciorganizationpublication.ui.publication.projects.title", "sciorganizationpublication.ui.publication.projects.title",