CCM NG/ccm-cms: Several changes/fixes for getting the authoring kits working
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4778 8810af33-2d31-482b-a856-94f89814c4df
Former-commit-id: 014fc32ed8
pull/2/head
parent
347d68c5ce
commit
c82aa708af
|
|
@ -111,6 +111,10 @@ class ApplyWorkflowController {
|
|||
final Folder folder,
|
||||
final Long workflowTemplateId) {
|
||||
|
||||
Objects.requireNonNull(item);
|
||||
Objects.requireNonNull(folder);
|
||||
Objects.requireNonNull(workflowTemplateId);
|
||||
|
||||
final WorkflowTemplate workflowTemplate;
|
||||
if (workflowTemplateId == null
|
||||
&& permissionChecker
|
||||
|
|
|
|||
|
|
@ -296,6 +296,7 @@ public class ContentItemRepository
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public long countByNameInFolder(final Category folder, final String name) {
|
||||
|
||||
final TypedQuery<Long> query = getEntityManager().createNamedQuery(
|
||||
|
|
@ -317,6 +318,7 @@ public class ContentItemRepository
|
|||
*
|
||||
* @return A list with all items in the folder matching the provided filter.
|
||||
*/
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public List<ContentItem> filterByFolderAndName(final Category folder,
|
||||
final String name) {
|
||||
|
||||
|
|
@ -340,6 +342,7 @@ public class ContentItemRepository
|
|||
* @return The number of items in the folder/category which match the
|
||||
* provided pattern.
|
||||
*/
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public long countFilterByFolderAndName(final Category folder,
|
||||
final String name) {
|
||||
final TypedQuery<Long> query = getEntityManager()
|
||||
|
|
@ -352,6 +355,7 @@ public class ContentItemRepository
|
|||
return query.getSingleResult();
|
||||
}
|
||||
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public Optional<ContentItem> findItemWithWorkflow(final Workflow workflow) {
|
||||
|
||||
final TypedQuery<ContentItem> query = getEntityManager()
|
||||
|
|
@ -378,6 +382,7 @@ public class ContentItemRepository
|
|||
* provided path or an empty {@code Optional} if there is no such
|
||||
* item.
|
||||
*/
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public Optional<ContentItem> findByPath(final String path) {
|
||||
|
||||
//The last token is the name of the item itself. Remove this part an get
|
||||
|
|
@ -408,6 +413,7 @@ public class ContentItemRepository
|
|||
* provided path or an empty {@code Optional} if there is no such
|
||||
* item.
|
||||
*/
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public Optional<ContentItem> findByPath(final ContentSection section,
|
||||
final String path) {
|
||||
|
||||
|
|
@ -429,6 +435,7 @@ public class ContentItemRepository
|
|||
}
|
||||
|
||||
@Override
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public void save(final ContentItem item) {
|
||||
final Date now = new Date();
|
||||
final Subject subject = shiro.getSubject();
|
||||
|
|
|
|||
|
|
@ -18,7 +18,9 @@
|
|||
*/
|
||||
package org.librecms.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.ui.ArticlePropertiesStep;
|
||||
import com.arsdigita.cms.ui.authoring.PageCreateForm;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
|
|
@ -45,8 +47,18 @@ import org.librecms.contentsection.ContentItem;
|
|||
@Table(name = "ARTICLES", schema = DB_SCHEMA)
|
||||
@ContentTypeDescription(labelBundle = "org.librecms.contenttypes.Article",
|
||||
descriptionBundle = "org.librecms.contenttypes.Article")
|
||||
@AuthoringKit(createComponent = PageCreateForm.class,
|
||||
steps = {})
|
||||
@AuthoringKit(
|
||||
createComponent = PageCreateForm.class,
|
||||
steps = {
|
||||
@AuthoringStep(
|
||||
component = ArticlePropertiesStep.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 Article extends ContentItem implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3832010184748095822L;
|
||||
|
|
|
|||
|
|
@ -290,3 +290,9 @@ cms.ui.create=Create
|
|||
cms.contenttypes.ui.summary=Summary
|
||||
cms.contenttypes.ui.newsitem.date\ =Release date
|
||||
cms.contenttypes.ui.event.start_date=Start date
|
||||
cms.contenttypes.shared.basic_properties.title=Edit basic properties
|
||||
cms.contenttypes.shared.basic_properties.description=Edit basic properties
|
||||
cms.contenttypes.shared.body_text.title=Body text
|
||||
cms.contenttypes.shared.body_text.description=Edit body text
|
||||
cms.contenttypes.shared.assign_categories.title=Categories
|
||||
cms.contenttypes.shared.assign_categories.description=Edit category assignments
|
||||
|
|
|
|||
|
|
@ -287,3 +287,9 @@ cms.ui.create=Anlegen
|
|||
cms.contenttypes.ui.summary=Zusammenfassung
|
||||
cms.contenttypes.ui.newsitem.date\ =Erscheinungsdatum
|
||||
cms.contenttypes.ui.event.start_date=Anfangsdatum
|
||||
cms.contenttypes.shared.basic_properties.title=Basiseigenschaften bearbeiten
|
||||
cms.contenttypes.shared.basic_properties.description=Basiseigenschaften bearbeiten
|
||||
cms.contenttypes.shared.body_text.title=Haupttext
|
||||
cms.contenttypes.shared.body_text.description=Haupttext bearbeiten
|
||||
cms.contenttypes.shared.assign_categories.title=Kategorien
|
||||
cms.contenttypes.shared.assign_categories.description=Kategorienzuweisungen bearbeiten
|
||||
|
|
|
|||
|
|
@ -246,3 +246,9 @@ cms.ui.create=Create
|
|||
cms.contenttypes.ui.summary=Summary
|
||||
cms.contenttypes.ui.newsitem.date\ =Release date
|
||||
cms.contenttypes.ui.event.start_date=Start date
|
||||
cms.contenttypes.shared.basic_properties.title=Edit basic properties
|
||||
cms.contenttypes.shared.basic_properties.description=Edit basic properties
|
||||
cms.contenttypes.shared.body_text.title=Body text
|
||||
cms.contenttypes.shared.body_text.description=Edit body text
|
||||
cms.contenttypes.shared.assign_categories.title=Categories
|
||||
cms.contenttypes.shared.assign_categories.description=Edit category assignments
|
||||
|
|
|
|||
Loading…
Reference in New Issue