- Upgrade-Datei für ccm-cms korrigiert (es fehlten die Aufrufe für einige Skripte)

- Formatierungen und andere Kleinigkeiten
- log4j.properties weniger fein eingestellt (SQL-Kommandos werden nicht mehr ausgegeben)


git-svn-id: https://svn.libreccm.org/ccm/trunk@1743 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2012-07-01 10:47:15 +00:00
parent 0e02200d73
commit 0da59542fb
4 changed files with 81 additions and 80 deletions

View File

@ -53,8 +53,12 @@
</version> </version>
<version from="6.6.4" to="6.6.5"> <version from="6.6.4" to="6.6.5">
<script class="com.arsdigita.cms.contenttypes.upgrades.CreateContactBundles"/> <script class="com.arsdigita.cms.contenttypes.upgrades.CreateContactBundles"/>
<script class="com.arsdigita.cms.contenttypes.upgrades.CreateOrgaUnitBundles"/>
<script class="com.arsdigita.cms.contenttypes.upgrades.CreatePersonBundles"/> <script class="com.arsdigita.cms.contenttypes.upgrades.CreatePersonBundles"/>
<script class="com.arsdigita.cms.contenttypes.upgrades.GenericContactGenericPersonAssocUpgrade"/> <script class="com.arsdigita.cms.contenttypes.upgrades.GenericContactGenericPersonAssocUpgrade"/>
<script class="com.arsdigita.cms.contenttypes.upgrades.GenericOrgaUnitGenericContactAssocUpgrade"/>
<script class="com.arsdigita.cms.contenttypes.upgrades.GenericOrgaUnitGenericOrgaUnitAssocUpgrade"/>
<script class="com.arsdigita.cms.contenttypes.upgrades.GenericOrgaUnitGenericPersonAssocUpgrade"/>
<script sql="ccm-cms/upgrade::database::-6.6.4-6.6.5.sql"/> <script sql="ccm-cms/upgrade::database::-6.6.4-6.6.5.sql"/>
</version> </version>
<version from="6.6.5" to="6.6.6"> <version from="6.6.5" to="6.6.6">

View File

@ -163,6 +163,7 @@ public abstract class BasicPageForm extends BasicItemForm {
* Utility method to process the name/title widgets. Child classes may call this method from the process listener. * Utility method to process the name/title widgets. Child classes may call this method from the process listener.
* *
* @param e the {@link FormSectionEvent} which was passed to the process listener * @param e the {@link FormSectionEvent} which was passed to the process listener
* @return
*/ */
public ContentPage processBasicWidgets(FormSectionEvent e) { public ContentPage processBasicWidgets(FormSectionEvent e) {
Assert.exists(getItemSelectionModel()); Assert.exists(getItemSelectionModel());

View File

@ -78,10 +78,9 @@ import java.io.Writer;
import java.util.Locale; import java.util.Locale;
/** /**
* This class contains the component which displays the information for a * This class contains the component which displays the information for a particular lifecycle, with the ability to edit
* particular lifecycle, with the ability to edit and delete. This information * and delete. This information also includes the associated phases for this lifecycle, also with the ability to add,
* also includes the associated phases for this lifecycle, also with the ability * edit, and delete.
* to add, edit, and delete.
* *
* @author Michael Pih * @author Michael Pih
* @author Jack Chung * @author Jack Chung
@ -116,11 +115,16 @@ class ItemLifecycleItemPane extends BaseItemPane {
final ContentItem item = m_item.getContentItem(state). final ContentItem item = m_item.getContentItem(state).
getLiveVersion(); getLiveVersion();
final Label label = (Label) event.getTarget(); final Label label = (Label) event.getTarget();
final String dateStr = final String dateStr;
if ((item == null) || item.getLastModifiedDate() == null) {
dateStr = "";
} else {
dateStr =
DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.getDateTimeInstance(DateFormat.LONG,
DateFormat.SHORT, DateFormat.SHORT,
GlobalizationHelper. GlobalizationHelper.getNegotiatedLocale()).format(item.
getNegotiatedLocale()).format(item.getLastModifiedDate()); getLastModifiedDate());
}
final String msg = String.format( final String msg = String.format(
"%s %s", "%s %s",
new GlobalizedMessage( new GlobalizedMessage(
@ -129,9 +133,12 @@ class ItemLifecycleItemPane extends BaseItemPane {
dateStr); dateStr);
label.setLabel(msg); label.setLabel(msg);
} }
}); });
m_detailPane.add(lastPublishedLabel); m_detailPane.add(lastPublishedLabel);
m_detailPane.add(new PhaseSection());
m_detailPane.add(
new PhaseSection());
} }
private class SummarySection extends Section { private class SummarySection extends Section {
@ -163,8 +170,8 @@ class ItemLifecycleItemPane extends BaseItemPane {
final DateFormat format = final DateFormat format =
DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.getDateTimeInstance(DateFormat.FULL,
ContentSection. ContentSection.getConfig().getHideTimezone()
getConfig().getHideTimezone() ? DateFormat.SHORT ? DateFormat.SHORT
: DateFormat.FULL); : DateFormat.FULL);
props.add(new Property(gz("cms.ui.name"), props.add(new Property(gz("cms.ui.name"),
@ -184,6 +191,7 @@ class ItemLifecycleItemPane extends BaseItemPane {
return props; return props;
} }
} }
} }
@ -223,6 +231,7 @@ class ItemLifecycleItemPane extends BaseItemPane {
s_log.debug("User cannot publish " + item.getOID()); s_log.debug("User cannot publish " + item.getOID());
} }
} }
} }
private class UnpublishLink extends PublishLink { private class UnpublishLink extends PublishLink {
@ -241,12 +250,13 @@ class ItemLifecycleItemPane extends BaseItemPane {
item.unpublish(); item.unpublish();
final String target = URL.getDispatcherPath() + ContentItemPage. final String target = URL.getDispatcherPath()
getItemURL(item, + ContentItemPage.getItemURL(item,
ContentItemPage.AUTHORING_TAB); ContentItemPage.AUTHORING_TAB);
throw new RedirectSignal(target, true); throw new RedirectSignal(target, true);
} }
} }
} }
@ -276,8 +286,7 @@ class ItemLifecycleItemPane extends BaseItemPane {
final ContentItem item = m_item.getContentItem(state); final ContentItem item = m_item.getContentItem(state);
/* /*
* jensp 2011-12-14: Check is threaded publishing is active. If * jensp 2011-12-14: Check is threaded publishing is active. If yes, execute publishing in a thread.
* yes, execute publishing in a thread.
*/ */
if (CMSConfig.getInstance().getThreadedPublishing()) { if (CMSConfig.getInstance().getThreadedPublishing()) {
final Republisher republisher = new Republisher(item); final Republisher republisher = new Republisher(item);
@ -301,20 +310,17 @@ class ItemLifecycleItemPane extends BaseItemPane {
return; return;
} }
final PartyCollection receiverParties = Party. final PartyCollection receiverParties = Party.retrieveAllParties();
retrieveAllParties();
Party receiver = null; Party receiver = null;
receiverParties.addEqualsFilter("primaryEmail", receiverParties.addEqualsFilter("primaryEmail",
CMSConfig. CMSConfig.getInstance().
getInstance().
getPublicationFailureReceiver()); getPublicationFailureReceiver());
if (receiverParties.next()) { if (receiverParties.next()) {
receiver = receiverParties.getParty(); receiver = receiverParties.getParty();
} }
receiverParties.close(); receiverParties.close();
final PartyCollection senderParties = Party. final PartyCollection senderParties = Party.retrieveAllParties();
retrieveAllParties();
Party sender = null; Party sender = null;
senderParties.addEqualsFilter("primaryEmail", senderParties.addEqualsFilter("primaryEmail",
CMSConfig.getInstance(). CMSConfig.getInstance().
@ -346,6 +352,7 @@ class ItemLifecycleItemPane extends BaseItemPane {
notification.save(); notification.save();
} }
} }
}); });
thread.start(); thread.start();
@ -367,6 +374,7 @@ class ItemLifecycleItemPane extends BaseItemPane {
} }
} }
} }
} }
/** /**
@ -375,11 +383,10 @@ class ItemLifecycleItemPane extends BaseItemPane {
private class Republisher implements Runnable { private class Republisher implements Runnable {
/** /**
* Saves OID of item as a string. This is necessary because it is * Saves OID of item as a string. This is necessary because it is not possible to access to same data object
* not possible to access to same data object instance from multiple * instance from multiple threads. So we have to create a new instance a the data object in the run method.
* threads. So we have to create a new instance a the data object in * To avoid any sort a problems, we store the OID as a string and convert it back to an OID in the run
* the run method. To avoid any sort a problems, we store the OID as * method.
* a string and convert it back to an OID in the run method.
*/ */
private final String itemOid; private final String itemOid;
@ -388,12 +395,12 @@ class ItemLifecycleItemPane extends BaseItemPane {
} }
public void run() { public void run() {
final ContentItem item = (ContentItem) DomainObjectFactory. final ContentItem item = (ContentItem) DomainObjectFactory.newInstance(OID.valueOf(itemOid));
newInstance(OID.valueOf(itemOid));
PublishLock.getInstance().lock(item); PublishLock.getInstance().lock(item);
republish(item, false); republish(item, false);
PublishLock.getInstance().unlock(item); PublishLock.getInstance().unlock(item);
} }
} }
} }
@ -416,8 +423,7 @@ class ItemLifecycleItemPane extends BaseItemPane {
final ContentItem item = m_item.getContentItem(state); final ContentItem item = m_item.getContentItem(state);
/** /**
* jensp 2011-12-14: Execute is a thread if threaded publishing * jensp 2011-12-14: Execute is a thread if threaded publishing is active.
* is active.
*/ */
if (CMSConfig.getInstance().getThreadedPublishing()) { if (CMSConfig.getInstance().getThreadedPublishing()) {
final Republisher republisher = new Republisher(item); final Republisher republisher = new Republisher(item);
@ -441,20 +447,17 @@ class ItemLifecycleItemPane extends BaseItemPane {
return; return;
} }
final PartyCollection receiverParties = Party. final PartyCollection receiverParties = Party.retrieveAllParties();
retrieveAllParties();
Party receiver = null; Party receiver = null;
receiverParties.addEqualsFilter("primaryEmail", receiverParties.addEqualsFilter("primaryEmail",
CMSConfig. CMSConfig.getInstance().
getInstance().
getPublicationFailureReceiver()); getPublicationFailureReceiver());
if (receiverParties.next()) { if (receiverParties.next()) {
receiver = receiverParties.getParty(); receiver = receiverParties.getParty();
} }
receiverParties.close(); receiverParties.close();
final PartyCollection senderParties = Party. final PartyCollection senderParties = Party.retrieveAllParties();
retrieveAllParties();
Party sender = null; Party sender = null;
senderParties.addEqualsFilter("primaryEmail", senderParties.addEqualsFilter("primaryEmail",
CMSConfig.getInstance(). CMSConfig.getInstance().
@ -486,6 +489,7 @@ class ItemLifecycleItemPane extends BaseItemPane {
notification.save(); notification.save();
} }
} }
}); });
thread.start(); thread.start();
@ -507,6 +511,7 @@ class ItemLifecycleItemPane extends BaseItemPane {
} }
} }
} }
} }
/** /**
@ -515,11 +520,10 @@ class ItemLifecycleItemPane extends BaseItemPane {
private class Republisher implements Runnable { private class Republisher implements Runnable {
/** /**
* Saves OID of item as a string. This is necessary because it is * Saves OID of item as a string. This is necessary because it is not possible to access to same data object
* not possible to access to same data object instance from multiple * instance from multiple threads. So we have to create a new instance a the data object in the run method.
* threads. So we have to create a new instance a the data object in * To avoid any sort a problems, we store the OID as a string and convert it back to an OID in the run
* the run method. To avoid any sort a problems, we store the OID as * method.
* a string and convert it back to an OID in the run method.
*/ */
private final String itemOid; private final String itemOid;
@ -528,12 +532,12 @@ class ItemLifecycleItemPane extends BaseItemPane {
} }
public void run() { public void run() {
final ContentItem item = (ContentItem) DomainObjectFactory. final ContentItem item = (ContentItem) DomainObjectFactory.newInstance(OID.valueOf(itemOid));
newInstance(OID.valueOf(itemOid));
PublishLock.getInstance().lock(item); PublishLock.getInstance().lock(item);
republish(item, true); republish(item, true);
PublishLock.getInstance().unlock(item); PublishLock.getInstance().unlock(item);
} }
} }
} }
@ -547,6 +551,7 @@ class ItemLifecycleItemPane extends BaseItemPane {
group.setSubject(new PhaseTable()); group.setSubject(new PhaseTable());
} }
} }
private class PhaseTable extends Table { private class PhaseTable extends Table {
@ -560,11 +565,11 @@ class ItemLifecycleItemPane extends BaseItemPane {
lz("cms.ui.item.lifecycle.end_date") lz("cms.ui.item.lifecycle.end_date")
}); });
} }
} }
/** /**
* New style pane. Uses a select box for the action to avoid wrong clicks on * New style pane. Uses a select box for the action to avoid wrong clicks on unpublish.
* unpublish.
* *
* @author Jens Pelzetter * @author Jens Pelzetter
*/ */
@ -638,8 +643,7 @@ class ItemLifecycleItemPane extends BaseItemPane {
final ContentItem item = m_item.getContentItem(state); final ContentItem item = m_item.getContentItem(state);
/** /**
* Republish/Republish and Reset are executed in the thread if * Republish/Republish and Reset are executed in the thread if threaded publishing is active.
* threaded publishing is active.
*/ */
if (REPUBLISH.equals(selected)) { if (REPUBLISH.equals(selected)) {
if (CMSConfig.getInstance().getThreadedPublishing()) { if (CMSConfig.getInstance().getThreadedPublishing()) {
@ -664,20 +668,17 @@ class ItemLifecycleItemPane extends BaseItemPane {
return; return;
} }
final PartyCollection receiverParties = Party. final PartyCollection receiverParties = Party.retrieveAllParties();
retrieveAllParties();
Party receiver = null; Party receiver = null;
receiverParties.addEqualsFilter("primaryEmail", receiverParties.addEqualsFilter("primaryEmail",
CMSConfig. CMSConfig.getInstance().
getInstance().
getPublicationFailureReceiver()); getPublicationFailureReceiver());
if (receiverParties.next()) { if (receiverParties.next()) {
receiver = receiverParties.getParty(); receiver = receiverParties.getParty();
} }
receiverParties.close(); receiverParties.close();
final PartyCollection senderParties = Party. final PartyCollection senderParties = Party.retrieveAllParties();
retrieveAllParties();
Party sender = null; Party sender = null;
senderParties.addEqualsFilter("primaryEmail", senderParties.addEqualsFilter("primaryEmail",
CMSConfig.getInstance(). CMSConfig.getInstance().
@ -709,6 +710,7 @@ class ItemLifecycleItemPane extends BaseItemPane {
notification.save(); notification.save();
} }
} }
}); });
thread.start(); thread.start();
@ -752,20 +754,17 @@ class ItemLifecycleItemPane extends BaseItemPane {
return; return;
} }
final PartyCollection receiverParties = Party. final PartyCollection receiverParties = Party.retrieveAllParties();
retrieveAllParties();
Party receiver = null; Party receiver = null;
receiverParties.addEqualsFilter("primaryEmail", receiverParties.addEqualsFilter("primaryEmail",
CMSConfig. CMSConfig.getInstance().
getInstance().
getPublicationFailureReceiver()); getPublicationFailureReceiver());
if (receiverParties.next()) { if (receiverParties.next()) {
receiver = receiverParties.getParty(); receiver = receiverParties.getParty();
} }
receiverParties.close(); receiverParties.close();
final PartyCollection senderParties = Party. final PartyCollection senderParties = Party.retrieveAllParties();
retrieveAllParties();
Party sender = null; Party sender = null;
senderParties.addEqualsFilter("primaryEmail", senderParties.addEqualsFilter("primaryEmail",
CMSConfig.getInstance(). CMSConfig.getInstance().
@ -797,6 +796,7 @@ class ItemLifecycleItemPane extends BaseItemPane {
notification.save(); notification.save();
} }
} }
}); });
thread.start(); thread.start();
@ -825,11 +825,10 @@ class ItemLifecycleItemPane extends BaseItemPane {
private class RepublishRunner implements Runnable { private class RepublishRunner implements Runnable {
/** /**
* Saves OID of item as a string. This is necessary because it is * Saves OID of item as a string. This is necessary because it is not possible to access to same data object
* not possible to access to same data object instance from multiple * instance from multiple threads. So we have to create a new instance a the data object in the run method.
* threads. So we have to create a new instance a the data object in * To avoid any sort a problems, we store the OID as a string and convert it back to an OID in the run
* the run method. To avoid any sort a problems, we store the OID as * method.
* a string and convert it back to an OID in the run method.
*/ */
private final String itemOid; private final String itemOid;
@ -838,28 +837,26 @@ class ItemLifecycleItemPane extends BaseItemPane {
} }
private void doRepublish() { private void doRepublish() {
final ContentItem item = (ContentItem) DomainObjectFactory. final ContentItem item = (ContentItem) DomainObjectFactory.newInstance(OID.valueOf(itemOid));
newInstance(OID.valueOf(itemOid));
republish(item, false); republish(item, false);
} }
public void run() { public void run() {
final ContentItem item = (ContentItem) DomainObjectFactory. final ContentItem item = (ContentItem) DomainObjectFactory.newInstance(OID.valueOf(itemOid));
newInstance(OID.valueOf(itemOid));
PublishLock.getInstance().lock(item); PublishLock.getInstance().lock(item);
doRepublish(); doRepublish();
PublishLock.getInstance().unlock(item); PublishLock.getInstance().unlock(item);
} }
} }
private class RepublishAndResetRunner implements Runnable { private class RepublishAndResetRunner implements Runnable {
/** /**
* Saves OID of item as a string. This is necessary because it is * Saves OID of item as a string. This is necessary because it is not possible to access to same data object
* not possible to access to same data object instance from multiple * instance from multiple threads. So we have to create a new instance a the data object in the run method.
* threads. So we have to create a new instance a the data object in * To avoid any sort a problems, we store the OID as a string and convert it back to an OID in the run
* the run method. To avoid any sort a problems, we store the OID as * method.
* a string and convert it back to an OID in the run method.
*/ */
private final String itemOid; private final String itemOid;
@ -868,18 +865,17 @@ class ItemLifecycleItemPane extends BaseItemPane {
} }
private void doRepublishAndReset() { private void doRepublishAndReset() {
final ContentItem item = (ContentItem) DomainObjectFactory. final ContentItem item = (ContentItem) DomainObjectFactory.newInstance(OID.valueOf(itemOid));
newInstance(OID.valueOf(itemOid));
republish(item, true); republish(item, true);
} }
public void run() { public void run() {
final ContentItem item = (ContentItem) DomainObjectFactory. final ContentItem item = (ContentItem) DomainObjectFactory.newInstance(OID.valueOf(itemOid));
newInstance(OID.valueOf(itemOid));
PublishLock.getInstance().lock(item); PublishLock.getInstance().lock(item);
doRepublishAndReset(); doRepublishAndReset();
PublishLock.getInstance().unlock(item); PublishLock.getInstance().unlock(item);
} }
} }
} }
} }

View File

@ -33,7 +33,7 @@ log4j.logger.com.arsdigita.web.CCMApplicationContextListener=INFO
# For seeing progress of main runtime initialization process # For seeing progress of main runtime initialization process
log4j.logger.com.arsdigita.runtime.CCMResourceManager=INFO log4j.logger.com.arsdigita.runtime.CCMResourceManager=INFO
log4j.logger.com.arsdigita.runtime.Runtime=INFO #log4j.logger.com.arsdigita.runtime.Runtime=INFO
log4j.logger.com.arsdigita.bundle.Loader=INFO log4j.logger.com.arsdigita.bundle.Loader=INFO