CCM NG: Several bugfixes
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4783 8810af33-2d31-482b-a856-94f89814c4df
parent
db051c3aef
commit
29e9cce905
|
|
@ -20,7 +20,6 @@ package com.arsdigita.cms.contenttypes.ui;
|
|||
|
||||
import com.arsdigita.bebop.Component;
|
||||
import com.arsdigita.bebop.PageState;
|
||||
import com.arsdigita.bebop.PropertyEditor;
|
||||
|
||||
import com.arsdigita.bebop.parameters.StringParameter;
|
||||
|
||||
|
|
@ -78,7 +77,7 @@ public class GenericArticlePropertiesStep extends SimpleEditStep {
|
|||
editSheet.getSaveCancelSection().getCancelButton());
|
||||
}
|
||||
|
||||
protected void setDisplayComponent(ItemSelectionModel itemModel) {
|
||||
protected void setDisplayComponent(final ItemSelectionModel itemModel) {
|
||||
setDisplayComponent(getGenericArticlePropertySheet(itemModel));
|
||||
}
|
||||
|
||||
|
|
@ -97,8 +96,9 @@ public class GenericArticlePropertiesStep extends SimpleEditStep {
|
|||
* release
|
||||
*/
|
||||
public static Component getGenericArticlePropertySheet(
|
||||
ItemSelectionModel itemModel) {
|
||||
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(
|
||||
final ItemSelectionModel itemModel) {
|
||||
|
||||
final DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(
|
||||
itemModel);
|
||||
|
||||
sheet.add(new GlobalizedMessage("cms.contenttypes.ui.title",
|
||||
|
|
|
|||
|
|
@ -57,14 +57,14 @@ import java.util.Optional;
|
|||
* @see com.arsdigita.cms.contenttypes.NewsItem
|
||||
*
|
||||
*/
|
||||
public class NewsItemPropertiesStep extends SimpleEditStep {
|
||||
public class NewsPropertiesStep extends SimpleEditStep {
|
||||
|
||||
/**
|
||||
* The name of the editing sheet added to this step
|
||||
*/
|
||||
public static String EDIT_SHEET_NAME = "edit";
|
||||
|
||||
public NewsItemPropertiesStep(final ItemSelectionModel itemModel,
|
||||
public NewsPropertiesStep(final ItemSelectionModel itemModel,
|
||||
final AuthoringKitWizard parent,
|
||||
final StringParameter selectedLanguageParam) {
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ public class NewsItemPropertiesStep extends SimpleEditStep {
|
|||
setDefaultEditKey(EDIT_SHEET_NAME);
|
||||
BasicPageForm editSheet;
|
||||
|
||||
editSheet = new NewsItemPropertyForm(itemModel, this);
|
||||
editSheet = new NewsPropertyForm(itemModel, this);
|
||||
add(EDIT_SHEET_NAME,
|
||||
new GlobalizedMessage("cms.ui.edit", CmsConstants.CMS_BUNDLE),
|
||||
new WorkflowLockedComponentAccess(editSheet, itemModel),
|
||||
|
|
@ -47,16 +47,16 @@ import java.util.GregorianCalendar;
|
|||
|
||||
/**
|
||||
* Form to edit the basic properties of a {@link News} item. These are name,
|
||||
* title, item date and reference code. Used by {@link NewsItemPropertiesStep}
|
||||
* title, item date and reference code. Used by {@link NewsPropertiesStep}
|
||||
* authoring kit step.
|
||||
*
|
||||
* This form can be extended to create forms for NewsItem subclasses.
|
||||
*
|
||||
*/
|
||||
public class NewsItemPropertyForm extends BasicPageForm
|
||||
public class NewsPropertyForm extends BasicPageForm
|
||||
implements FormProcessListener, FormInitListener, FormSubmissionListener {
|
||||
|
||||
private NewsItemPropertiesStep propertiesStep;
|
||||
private NewsPropertiesStep propertiesStep;
|
||||
/**
|
||||
* lead parameter name
|
||||
*/
|
||||
|
|
@ -80,7 +80,7 @@ public class NewsItemPropertyForm extends BasicPageForm
|
|||
* @param itemSelectionModel The ItemSelectionModel to use to obtain the
|
||||
* NewsItem to work on
|
||||
*/
|
||||
public NewsItemPropertyForm(final ItemSelectionModel itemSelectionModel) {
|
||||
public NewsPropertyForm(final ItemSelectionModel itemSelectionModel) {
|
||||
this(itemSelectionModel, null);
|
||||
}
|
||||
|
||||
|
|
@ -90,11 +90,11 @@ public class NewsItemPropertyForm extends BasicPageForm
|
|||
*
|
||||
* @param itemSelectionModel The ItemSelectionModel to use to obtain the
|
||||
* NewsItem to work on
|
||||
* @param propertiesStep The NewsItemPropertiesStep which controls this
|
||||
* form.
|
||||
* @param propertiesStep The NewsPropertiesStep which controls this
|
||||
form.
|
||||
*/
|
||||
public NewsItemPropertyForm(final ItemSelectionModel itemSelectionModel,
|
||||
final NewsItemPropertiesStep propertiesStep) {
|
||||
public NewsPropertyForm(final ItemSelectionModel itemSelectionModel,
|
||||
final NewsPropertiesStep propertiesStep) {
|
||||
super(ID, itemSelectionModel);
|
||||
this.propertiesStep = propertiesStep;
|
||||
addSubmissionListener(this);
|
||||
|
|
@ -219,13 +219,15 @@ public class ApplyWorkflowFormSection
|
|||
|
||||
final Long workflowTemplateId = (Long) radioGroup.getValue(state);
|
||||
final Folder folder = creationSelector.getFolder(state);
|
||||
|
||||
|
||||
final CdiUtil cdiUtil = CdiUtil.createCdiUtil();
|
||||
final ApplyWorkflowController controller = cdiUtil
|
||||
.findBean(ApplyWorkflowController.class);
|
||||
|
||||
controller.applyWorkflow(item, folder, workflowTemplateId);
|
||||
|
||||
|
||||
if (workflowTemplateId != null) {
|
||||
controller.applyWorkflow(item, folder, workflowTemplateId);
|
||||
}
|
||||
|
||||
// final WorkflowTemplate template;
|
||||
//
|
||||
// final CdiUtil cdiUtil = CdiUtil.createCdiUtil();
|
||||
|
|
@ -268,7 +270,6 @@ public class ApplyWorkflowFormSection
|
|||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
private class ApplyWorkflowPrintListener
|
||||
|
|
|
|||
|
|
@ -124,6 +124,7 @@ public class SimpleEditStep extends SecurityPropertyEditor
|
|||
* component may use the wizard's methods, such as
|
||||
* stepForward and stepBack, in its process
|
||||
* listener.
|
||||
* @param selectedLanguageParam
|
||||
*
|
||||
* @param parameterSuffix Additional global parameter name suffix if
|
||||
* there are multiple SimpleEditStep instances in
|
||||
|
|
|
|||
|
|
@ -75,9 +75,10 @@ public class ItemTemplates extends SecurityPropertyEditor {
|
|||
// ToDo
|
||||
// ItemTemplatesListingImpl l = new ItemTemplatesListingImpl(model);
|
||||
//
|
||||
// final LayoutPanel layout = new LayoutPanel();
|
||||
// setDisplayComponent(layout);
|
||||
//
|
||||
final LayoutPanel layout = new LayoutPanel();
|
||||
setDisplayComponent(layout);
|
||||
|
||||
// ToDo
|
||||
// SegmentedPanel st = new SegmentedPanel();
|
||||
// layout.setBody(st);
|
||||
//
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
package org.librecms.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.ui.EventPropertiesStep;
|
||||
import com.arsdigita.cms.ui.contenttypes.EventCreateForm;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -53,8 +54,18 @@ import static org.librecms.CmsConstants.*;
|
|||
@Table(name = "EVENTS", schema = DB_SCHEMA)
|
||||
@ContentTypeDescription(labelBundle = "org.librecms.contenttypes.Event",
|
||||
descriptionBundle = "org.librecms.contenttypes.Event")
|
||||
@AuthoringKit(createComponent = EventCreateForm.class,
|
||||
steps = {})
|
||||
@AuthoringKit(
|
||||
createComponent = EventCreateForm.class,
|
||||
steps = {
|
||||
@AuthoringStep(
|
||||
component = EventPropertiesStep.class,
|
||||
labelBundle = "org.librecms.CmsResources",
|
||||
labelKey = "cms.contenttypes.shared.basic_properties.title",
|
||||
descriptionBundle = "org.librecms.CmsResources",
|
||||
descriptionKey = "cms.contenttypes.shared.basic_properties"
|
||||
+ ".description",
|
||||
order = 1)
|
||||
})
|
||||
public class Event extends ContentItem implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -9104886733503414635L;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@
|
|||
package org.librecms.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.ui.mparticle.MultiPartArticleCreateForm;
|
||||
import com.arsdigita.cms.contenttypes.ui.mparticle.MultiPartArticleEdit;
|
||||
|
||||
import org.hibernate.envers.Audited;
|
||||
import org.libreccm.l10n.LocalizedString;
|
||||
import org.librecms.contentsection.ContentItem;
|
||||
|
|
@ -46,10 +48,22 @@ import static org.librecms.CmsConstants.*;
|
|||
@Entity
|
||||
@Audited
|
||||
@Table(name = "MULTIPART_ARTICLES", schema = DB_SCHEMA)
|
||||
@ContentTypeDescription(labelBundle = "org.librecms.contenttypes.MultiPartArticle",
|
||||
descriptionBundle = "org.librecms.contenttypes.MultiPartArticle")
|
||||
@AuthoringKit(createComponent = MultiPartArticleCreateForm.class,
|
||||
steps = {})
|
||||
@ContentTypeDescription(labelBundle
|
||||
= "org.librecms.contenttypes.MultiPartArticle",
|
||||
descriptionBundle
|
||||
= "org.librecms.contenttypes.MultiPartArticle")
|
||||
@AuthoringKit(
|
||||
createComponent = MultiPartArticleCreateForm.class,
|
||||
steps = {
|
||||
@AuthoringStep(
|
||||
component = MultiPartArticleEdit.class,
|
||||
labelBundle = "org.librecms.CmsResources",
|
||||
labelKey = "cms.contenttypes.shared.basic_properties.title",
|
||||
descriptionBundle = "org.librecms.CmsResources",
|
||||
descriptionKey = "cms.contenttypes.shared.basic_properties"
|
||||
+ ".description",
|
||||
order = 1)
|
||||
})
|
||||
public class MultiPartArticle extends ContentItem implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -587374085831420868L;
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
package org.librecms.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.ui.NewsPropertiesStep;
|
||||
import com.arsdigita.cms.ui.contenttypes.NewsCreateForm;
|
||||
|
||||
import org.hibernate.envers.Audited;
|
||||
|
|
@ -50,8 +51,18 @@ import static org.librecms.CmsConstants.*;
|
|||
@Table(name = "NEWS", schema = DB_SCHEMA)
|
||||
@ContentTypeDescription(labelBundle = "org.librecms.contenttypes.News",
|
||||
descriptionBundle = "org.librecms.contenttypes.News")
|
||||
@AuthoringKit(createComponent = NewsCreateForm.class,
|
||||
steps = {})
|
||||
@AuthoringKit(
|
||||
createComponent = NewsCreateForm.class,
|
||||
steps = {
|
||||
@AuthoringStep(
|
||||
component = NewsPropertiesStep.class,
|
||||
labelBundle = "org.librecms.CmsResources",
|
||||
labelKey = "cms.contenttypes.shared.basic_properties.title",
|
||||
descriptionBundle = "org.librecms.CmsResources",
|
||||
descriptionKey = "cms.contenttypes.shared.basic_properties"
|
||||
+ ".description",
|
||||
order = 1)
|
||||
})
|
||||
public class News extends ContentItem implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -4939565845920227974L;
|
||||
|
|
@ -61,12 +72,12 @@ public class News extends ContentItem implements Serializable {
|
|||
*/
|
||||
@Embedded
|
||||
@AssociationOverride(
|
||||
name = "values",
|
||||
joinTable = @JoinTable(name = "NEWS_TEXTS",
|
||||
schema = DB_SCHEMA,
|
||||
joinColumns = {
|
||||
@JoinColumn(name = "OBJECT_ID")}
|
||||
))
|
||||
name = "values",
|
||||
joinTable = @JoinTable(name = "NEWS_TEXTS",
|
||||
schema = DB_SCHEMA,
|
||||
joinColumns = {
|
||||
@JoinColumn(name = "OBJECT_ID")}
|
||||
))
|
||||
private LocalizedString text;
|
||||
|
||||
/**
|
||||
|
|
@ -152,11 +163,12 @@ public class News extends ContentItem implements Serializable {
|
|||
@Override
|
||||
public String toString(final String data) {
|
||||
return super.toString(String.format(", text = %s, "
|
||||
+ "releaseDate = %tF %<tT, "
|
||||
+ "homepage = %b%s",
|
||||
+ "releaseDate = %tF %<tT, "
|
||||
+ "homepage = %b%s",
|
||||
Objects.toString(text),
|
||||
releaseDate,
|
||||
homepage,
|
||||
data));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
4
pom.xml
4
pom.xml
|
|
@ -193,8 +193,8 @@
|
|||
</plugin>
|
||||
<plugin>
|
||||
<groupId>de.jpdigital</groupId>
|
||||
<artifactId>hibernate5-ddl-maven-plugin</artifactId>
|
||||
<version>1.0.1-hibernate-5.2.4.Final</version>
|
||||
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||
<version>2.0.4</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
|
|
|
|||
Loading…
Reference in New Issue