CCM NG/ccm-cms: More work for the FolderBrowser
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4579 8810af33-2d31-482b-a856-94f89814c4df
Former-commit-id: 0842b94cf9
pull/2/head
parent
e58cebd92f
commit
36483ce25f
|
|
@ -49,7 +49,11 @@ import org.librecms.contentsection.privileges.TypePrivileges;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.TooManyListenersException;
|
import java.util.TooManyListenersException;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import org.libreccm.l10n.GlobalizationHelper;
|
import org.libreccm.l10n.GlobalizationHelper;
|
||||||
|
import org.librecms.contentsection.ContentTypeManager;
|
||||||
|
import org.librecms.contenttypes.ContentTypeInfo;
|
||||||
|
import org.librecms.contenttypes.ContentTypesManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A form element which displays a select box of all content types available
|
* A form element which displays a select box of all content types available
|
||||||
|
|
@ -76,7 +80,7 @@ public abstract class NewItemForm extends Form {
|
||||||
* Construct a new NewItemForm. It sets a vertical BoxPanel as the component
|
* Construct a new NewItemForm. It sets a vertical BoxPanel as the component
|
||||||
* container.
|
* container.
|
||||||
*
|
*
|
||||||
* @param name the name attribute of the form.
|
* @param name the name attribute of the form.
|
||||||
* @param orientation
|
* @param orientation
|
||||||
*/
|
*/
|
||||||
public NewItemForm(final String name, final int orientation) {
|
public NewItemForm(final String name, final int orientation) {
|
||||||
|
|
@ -90,16 +94,16 @@ public abstract class NewItemForm extends Form {
|
||||||
|
|
||||||
// create and add an "empty" component
|
// create and add an "empty" component
|
||||||
emptyLabel = new Label(
|
emptyLabel = new Label(
|
||||||
new GlobalizedMessage("cms.ui.authoring.no_types_registered",
|
new GlobalizedMessage("cms.ui.authoring.no_types_registered",
|
||||||
CmsConstants.CMS_BUNDLE),
|
CmsConstants.CMS_BUNDLE),
|
||||||
false);
|
false);
|
||||||
emptyLabel.setIdAttr("empty_label");
|
emptyLabel.setIdAttr("empty_label");
|
||||||
panel.add(emptyLabel);
|
panel.add(emptyLabel);
|
||||||
|
|
||||||
createLabel = new Label(
|
createLabel = new Label(
|
||||||
new GlobalizedMessage("cms.ui.authoring.create_new",
|
new GlobalizedMessage("cms.ui.authoring.create_new",
|
||||||
CmsConstants.CMS_BUNDLE),
|
CmsConstants.CMS_BUNDLE),
|
||||||
false);
|
false);
|
||||||
createLabel.setIdAttr("create_label");
|
createLabel.setIdAttr("create_label");
|
||||||
panel.add(createLabel);
|
panel.add(createLabel);
|
||||||
|
|
||||||
|
|
@ -112,7 +116,7 @@ public abstract class NewItemForm extends Form {
|
||||||
@Override
|
@Override
|
||||||
public void prepare(final PrintEvent event) {
|
public void prepare(final PrintEvent event) {
|
||||||
final OptionGroup target = (OptionGroup) event
|
final OptionGroup target = (OptionGroup) event
|
||||||
.getTarget();
|
.getTarget();
|
||||||
target.clearOptions();
|
target.clearOptions();
|
||||||
final PageState state = event.getPageState();
|
final PageState state = event.getPageState();
|
||||||
|
|
||||||
|
|
@ -121,31 +125,30 @@ public abstract class NewItemForm extends Form {
|
||||||
// final ContentType parentType;
|
// final ContentType parentType;
|
||||||
final List<ContentType> typesCollection;
|
final List<ContentType> typesCollection;
|
||||||
final Long singleTypeID = (Long) state.getValue(
|
final Long singleTypeID = (Long) state.getValue(
|
||||||
new LongParameter(ItemSearch.SINGLE_TYPE_PARAM));
|
new LongParameter(ItemSearch.SINGLE_TYPE_PARAM));
|
||||||
|
|
||||||
final CdiUtil cdiUtil = CdiUtil.createCdiUtil();
|
final CdiUtil cdiUtil = CdiUtil.createCdiUtil();
|
||||||
final NewItemFormController controller = cdiUtil.findBean(
|
final NewItemFormController controller = cdiUtil.findBean(
|
||||||
NewItemFormController.class);
|
NewItemFormController.class);
|
||||||
final ContentTypeRepository typeRepo = cdiUtil.findBean(
|
final ContentTypeRepository typeRepo = cdiUtil.findBean(
|
||||||
ContentTypeRepository.class);
|
ContentTypeRepository.class);
|
||||||
|
final ContentTypesManager typesManager = cdiUtil.findBean(
|
||||||
|
ContentTypesManager.class);
|
||||||
final PermissionChecker permissionChecker = cdiUtil
|
final PermissionChecker permissionChecker = cdiUtil
|
||||||
.findBean(PermissionChecker.class);
|
.findBean(PermissionChecker.class);
|
||||||
|
|
||||||
// if (singleTypeID == null) {
|
|
||||||
// parentType = null;
|
|
||||||
// } else {
|
|
||||||
// parentType = typeRepo.findById(singleTypeID).get();
|
|
||||||
// }
|
|
||||||
// typesCollection = section.getContentTypes().stream()
|
|
||||||
// .filter(type -> permissionChecker.isPermitted(
|
|
||||||
// TypePrivileges.USE_TYPE,
|
|
||||||
// type))
|
|
||||||
// .collect(Collectors.toList());
|
|
||||||
typesCollection = controller.getContentTypes(section);
|
typesCollection = controller.getContentTypes(section);
|
||||||
|
|
||||||
typesCollection.forEach(type -> target.addOption(
|
for (final ContentType type : typesCollection) {
|
||||||
new Option(Long.toString(type.getObjectId()),
|
final ContentTypeInfo typeInfo = typesManager
|
||||||
new Text(type.getContentItemClass()))));
|
.getContentTypeInfo(type.getContentItemClass());
|
||||||
|
final String value = Long.toString(type.getObjectId());
|
||||||
|
final Label label = new Label(
|
||||||
|
new GlobalizedMessage(typeInfo.getLabelKey(),
|
||||||
|
typeInfo.getLabelBundle()));
|
||||||
|
target.addOption(
|
||||||
|
new Option(value, label));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
@ -197,7 +200,7 @@ public abstract class NewItemForm extends Form {
|
||||||
|
|
||||||
final CdiUtil cdiUtil = CdiUtil.createCdiUtil();
|
final CdiUtil cdiUtil = CdiUtil.createCdiUtil();
|
||||||
final NewItemFormController controller = cdiUtil.findBean(
|
final NewItemFormController controller = cdiUtil.findBean(
|
||||||
NewItemFormController.class);
|
NewItemFormController.class);
|
||||||
boolean isEmpty = !controller.hasContentTypes(section);
|
boolean isEmpty = !controller.hasContentTypes(section);
|
||||||
|
|
||||||
createLabel.setVisible(state, !isEmpty);
|
createLabel.setVisible(state, !isEmpty);
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,10 @@ import org.librecms.contentsection.ContentSectionCreator;
|
||||||
import org.librecms.contentsection.ContentSectionSetup;
|
import org.librecms.contentsection.ContentSectionSetup;
|
||||||
import org.librecms.contentsection.ui.admin.ApplicationInstanceForm;
|
import org.librecms.contentsection.ui.admin.ApplicationInstanceForm;
|
||||||
import org.librecms.contentsection.ui.admin.SettingsPane;
|
import org.librecms.contentsection.ui.admin.SettingsPane;
|
||||||
|
import org.librecms.contenttypes.Article;
|
||||||
|
import org.librecms.contenttypes.Event;
|
||||||
|
import org.librecms.contenttypes.MultiPartArticle;
|
||||||
|
import org.librecms.contenttypes.News;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
@ -52,6 +56,7 @@ import java.util.Properties;
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ContentTypes({Article.class, Event.class, MultiPartArticle.class, News.class})
|
||||||
public class Cms implements CcmModule {
|
public class Cms implements CcmModule {
|
||||||
|
|
||||||
private static final Logger LOGGER = LogManager.getLogger(Cms.class);
|
private static final Logger LOGGER = LogManager.getLogger(Cms.class);
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,9 @@
|
||||||
*/
|
*/
|
||||||
package org.librecms.contentsection;
|
package org.librecms.contentsection;
|
||||||
|
|
||||||
|
import com.arsdigita.globalization.GlobalizedMessage;
|
||||||
|
|
||||||
|
import org.libreccm.l10n.GlobalizationHelper;
|
||||||
import org.librecms.contentsection.privileges.TypePrivileges;
|
import org.librecms.contentsection.privileges.TypePrivileges;
|
||||||
|
|
||||||
import org.libreccm.security.AuthorizationRequired;
|
import org.libreccm.security.AuthorizationRequired;
|
||||||
|
|
@ -26,8 +29,12 @@ import org.libreccm.security.RequiresPrivilege;
|
||||||
import org.libreccm.security.Role;
|
import org.libreccm.security.Role;
|
||||||
import org.libreccm.workflow.WorkflowTemplate;
|
import org.libreccm.workflow.WorkflowTemplate;
|
||||||
import org.librecms.contentsection.privileges.AdminPrivileges;
|
import org.librecms.contentsection.privileges.AdminPrivileges;
|
||||||
|
import org.librecms.contenttypes.Article;
|
||||||
import org.librecms.lifecycle.LifecycleDefinition;
|
import org.librecms.lifecycle.LifecycleDefinition;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
import javax.enterprise.context.RequestScoped;
|
import javax.enterprise.context.RequestScoped;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.transaction.Transactional;
|
import javax.transaction.Transactional;
|
||||||
|
|
@ -42,10 +49,20 @@ public class ContentTypeManager {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private ContentTypeRepository typeRepo;
|
private ContentTypeRepository typeRepo;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private PermissionManager permissionManager;
|
private PermissionManager permissionManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts the class name of a content type to {@link Class} object.
|
||||||
|
*
|
||||||
|
* @param className The class name of the content type.
|
||||||
|
*
|
||||||
|
* @return The class for the content type.
|
||||||
|
*
|
||||||
|
* @throws IllegalArgumentException If the provided class is not a sub class
|
||||||
|
* of {@link ContentItem}.
|
||||||
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public Class<? extends ContentItem> classNameToClass(final String className) {
|
public Class<? extends ContentItem> classNameToClass(final String className) {
|
||||||
final Class<?> clazz;
|
final Class<?> clazz;
|
||||||
|
|
@ -57,7 +74,7 @@ public class ContentTypeManager {
|
||||||
ex);
|
ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clazz.isAssignableFrom(ContentItem.class)) {
|
if (ContentItem.class.isAssignableFrom(clazz)) {
|
||||||
return (Class<? extends ContentItem>) clazz;
|
return (Class<? extends ContentItem>) clazz;
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException(String.format(
|
throw new IllegalArgumentException(String.format(
|
||||||
|
|
@ -65,6 +82,13 @@ public class ContentTypeManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the default lifecycle to use for new items of a content type.
|
||||||
|
*
|
||||||
|
* @param type
|
||||||
|
* @param definition The {@link LifecycleDefinition} for the lifecycle to
|
||||||
|
* use for new items of the provided {@code type}.
|
||||||
|
*/
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
@AuthorizationRequired
|
@AuthorizationRequired
|
||||||
public void setDefaultLifecycle(
|
public void setDefaultLifecycle(
|
||||||
|
|
@ -77,6 +101,13 @@ public class ContentTypeManager {
|
||||||
typeRepo.save(type);
|
typeRepo.save(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the default workflow to use for new items of a content type.
|
||||||
|
*
|
||||||
|
* @param type
|
||||||
|
* @param template The {@link WorkflowTemplate} for the workflow to use for
|
||||||
|
* new items of the provided {@code type}.
|
||||||
|
*/
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
@AuthorizationRequired
|
@AuthorizationRequired
|
||||||
public void setDefaultWorkflow(
|
public void setDefaultWorkflow(
|
||||||
|
|
@ -89,6 +120,13 @@ public class ContentTypeManager {
|
||||||
typeRepo.save(type);
|
typeRepo.save(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a permission granting the {@link TypePrivileges#USE_TYPE}
|
||||||
|
* privilege to a role.
|
||||||
|
*
|
||||||
|
* @param type The type on which the privilege is granted.
|
||||||
|
* @param role The role to which the privilege is granted.
|
||||||
|
*/
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
@AuthorizationRequired
|
@AuthorizationRequired
|
||||||
public void grantUsageOfType(
|
public void grantUsageOfType(
|
||||||
|
|
@ -98,7 +136,15 @@ public class ContentTypeManager {
|
||||||
|
|
||||||
permissionManager.grantPrivilege(TypePrivileges.USE_TYPE, role, type);
|
permissionManager.grantPrivilege(TypePrivileges.USE_TYPE, role, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Denies usages of the provided content type by revoking any existing
|
||||||
|
* permissions granting the {@link TypePrivileges#USE_TYPE} privilege to the
|
||||||
|
* provided role.
|
||||||
|
*
|
||||||
|
* @param type The type for which the permission is revoked.
|
||||||
|
* @param role The role from which the permission is removed.
|
||||||
|
*/
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
@AuthorizationRequired
|
@AuthorizationRequired
|
||||||
public void denyUsageOnType(
|
public void denyUsageOnType(
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,8 @@ import org.librecms.contentsection.ContentItem;
|
||||||
@Entity
|
@Entity
|
||||||
@Audited
|
@Audited
|
||||||
@Table(name = "ARTICLES", schema = DB_SCHEMA)
|
@Table(name = "ARTICLES", schema = DB_SCHEMA)
|
||||||
|
@ContentTypeDescription(labelBundle = "org.librecms.contenttypes.Article",
|
||||||
|
descriptionBundle = "org.librecms.contenttypes.Article")
|
||||||
public class Article extends ContentItem implements Serializable {
|
public class Article extends ContentItem implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 3832010184748095822L;
|
private static final long serialVersionUID = 3832010184748095822L;
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
*/
|
*/
|
||||||
package org.librecms.contenttypes;
|
package org.librecms.contenttypes;
|
||||||
|
|
||||||
|
|
||||||
import org.libreccm.modules.CcmModule;
|
import org.libreccm.modules.CcmModule;
|
||||||
import org.librecms.contentsection.ContentItem;
|
import org.librecms.contentsection.ContentItem;
|
||||||
import org.librecms.contentsection.ContentType;
|
import org.librecms.contentsection.ContentType;
|
||||||
|
|
@ -72,7 +71,8 @@ public class ContentTypesManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
final List<Class<? extends ContentItem>> moduleTypes = Arrays
|
final List<Class<? extends ContentItem>> moduleTypes = Arrays
|
||||||
.stream(annotation.value()).collect(Collectors.toList());
|
.stream(annotation.value())
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
types.addAll(moduleTypes);
|
types.addAll(moduleTypes);
|
||||||
}
|
}
|
||||||
|
|
@ -137,16 +137,18 @@ public class ContentTypesManager {
|
||||||
|
|
||||||
final AuthoringKit authoringKit = contentTypeClass.getAnnotation(
|
final AuthoringKit authoringKit = contentTypeClass.getAnnotation(
|
||||||
AuthoringKit.class);
|
AuthoringKit.class);
|
||||||
final AuthoringKitInfo authoringKitInfo = new AuthoringKitInfo();
|
if (authoringKit != null) {
|
||||||
authoringKitInfo.setCreateComponent(authoringKit.createComponent());
|
final AuthoringKitInfo authoringKitInfo = new AuthoringKitInfo();
|
||||||
|
authoringKitInfo.setCreateComponent(authoringKit.createComponent());
|
||||||
|
|
||||||
final List<AuthoringStepInfo> steps = Arrays.stream(authoringKit
|
final List<AuthoringStepInfo> steps = Arrays.stream(authoringKit
|
||||||
.steps())
|
.steps())
|
||||||
.map(step -> createAuthoringStepInfo(contentTypeClass, step))
|
.map(step -> createAuthoringStepInfo(contentTypeClass, step))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
authoringKitInfo.setAuthoringSteps(steps);
|
authoringKitInfo.setAuthoringSteps(steps);
|
||||||
steps.sort((step1, step2) -> Integer.compare(step1.getOrder(),
|
steps.sort((step1, step2) -> Integer.compare(step1.getOrder(),
|
||||||
step2.getOrder()));
|
step2.getOrder()));
|
||||||
|
}
|
||||||
|
|
||||||
return contentTypeInfo;
|
return contentTypeInfo;
|
||||||
}
|
}
|
||||||
|
|
@ -252,7 +254,7 @@ public class ContentTypesManager {
|
||||||
ex);
|
ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!clazz.isAssignableFrom(ContentItem.class)) {
|
if (!ContentItem.class.isAssignableFrom(clazz)) {
|
||||||
throw new IllegalArgumentException(String.format(
|
throw new IllegalArgumentException(String.format(
|
||||||
"Class \"%s\" is not a subclass of \"%s\".",
|
"Class \"%s\" is not a subclass of \"%s\".",
|
||||||
contentTypeClass,
|
contentTypeClass,
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,8 @@ import static org.librecms.CmsConstants.*;
|
||||||
@Entity
|
@Entity
|
||||||
@Audited
|
@Audited
|
||||||
@Table(name = "EVENTS", schema = DB_SCHEMA)
|
@Table(name = "EVENTS", schema = DB_SCHEMA)
|
||||||
|
@ContentTypeDescription(labelBundle = "org.librecms.contenttypes.Event",
|
||||||
|
descriptionBundle = "org.librecms.contenttypes.Event")
|
||||||
public class Event extends ContentItem implements Serializable {
|
public class Event extends ContentItem implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -9104886733503414635L;
|
private static final long serialVersionUID = -9104886733503414635L;
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,8 @@ import static org.librecms.CmsConstants.*;
|
||||||
@Entity
|
@Entity
|
||||||
@Audited
|
@Audited
|
||||||
@Table(name = "MULTIPART_ARTICLES", schema = DB_SCHEMA)
|
@Table(name = "MULTIPART_ARTICLES", schema = DB_SCHEMA)
|
||||||
|
@ContentTypeDescription(labelBundle = "org.librecms.contenttypes.MultiPartArticle",
|
||||||
|
descriptionBundle = "org.librecms.contenttypes.MultiPartArticle")
|
||||||
public class MultiPartArticle extends ContentItem implements Serializable {
|
public class MultiPartArticle extends ContentItem implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -587374085831420868L;
|
private static final long serialVersionUID = -587374085831420868L;
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,8 @@ import static org.librecms.CmsConstants.*;
|
||||||
@Entity
|
@Entity
|
||||||
@Audited
|
@Audited
|
||||||
@Table(name = "NEWS", schema = DB_SCHEMA)
|
@Table(name = "NEWS", schema = DB_SCHEMA)
|
||||||
|
@ContentTypeDescription(labelBundle = "org.librecms.contenttypes.News",
|
||||||
|
descriptionBundle = "org.librecms.contenttypes.News")
|
||||||
public class News extends ContentItem implements Serializable {
|
public class News extends ContentItem implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -4939565845920227974L;
|
private static final long serialVersionUID = -4939565845920227974L;
|
||||||
|
|
|
||||||
|
|
@ -115,3 +115,5 @@ cms.ui.authoring.no_types_registered=No types registered
|
||||||
cms.ui.contents_of=Contents of
|
cms.ui.contents_of=Contents of
|
||||||
cms.ui.new_folder=Create new folder
|
cms.ui.new_folder=Create new folder
|
||||||
cms.ui.edit_folder=Rename the current folder
|
cms.ui.edit_folder=Rename the current folder
|
||||||
|
cms.ui.authoring.create_new=Create new
|
||||||
|
cms.ui.authoring.go=Go
|
||||||
|
|
|
||||||
|
|
@ -114,3 +114,5 @@ cms.ui.authoring.no_types_registered=Keine Typen registiert
|
||||||
cms.ui.contents_of=Inhalt von
|
cms.ui.contents_of=Inhalt von
|
||||||
cms.ui.new_folder=Neuen Ordner erstellen
|
cms.ui.new_folder=Neuen Ordner erstellen
|
||||||
cms.ui.edit_folder=Aktuellen Ordner umbenennen
|
cms.ui.edit_folder=Aktuellen Ordner umbenennen
|
||||||
|
cms.ui.authoring.create_new=Neuer Inhalt
|
||||||
|
cms.ui.authoring.go=Anlegen
|
||||||
|
|
|
||||||
|
|
@ -83,3 +83,5 @@ cms.ui.authoring.no_types_registered=No types registered
|
||||||
cms.ui.contents_of=Contents of
|
cms.ui.contents_of=Contents of
|
||||||
cms.ui.new_folder=Create new folder
|
cms.ui.new_folder=Create new folder
|
||||||
cms.ui.edit_folder=Rename the current folder
|
cms.ui.edit_folder=Rename the current folder
|
||||||
|
cms.ui.authoring.create_new=Create new
|
||||||
|
cms.ui.authoring.go=Go
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
label = Article
|
||||||
|
description = An simple Article
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
label = Artikel
|
||||||
|
description = Ein einfacher Artikel
|
||||||
|
|
@ -24,3 +24,5 @@ cms.contenttypes.event.type_label=Event
|
||||||
cms.contenttypes.event_type_not_registered=Type not registered
|
cms.contenttypes.event_type_not_registered=Type not registered
|
||||||
cms.contenttypes.ui.event.lead_hint=A short description of the focus of the event and its main topic. Should be no longer than 2-3 sentences. The lead text will be displayed in the detail view of the event as well as in listings of events.
|
cms.contenttypes.ui.event.lead_hint=A short description of the focus of the event and its main topic. Should be no longer than 2-3 sentences. The lead text will be displayed in the detail view of the event as well as in listings of events.
|
||||||
cms.contenttypes.ui.event.end_date_hint=Optionally enter an end date. It is displayed on the detail view as well as in listings of other short references.
|
cms.contenttypes.ui.event.end_date_hint=Optionally enter an end date. It is displayed on the detail view as well as in listings of other short references.
|
||||||
|
label=Event
|
||||||
|
description=An event
|
||||||
|
|
|
||||||
|
|
@ -25,3 +25,5 @@ cms.contenttypes.event.type_label=Veranstaltung
|
||||||
cms.contenttypes.event_type_not_registered=Typ nicht registriert
|
cms.contenttypes.event_type_not_registered=Typ nicht registriert
|
||||||
cms.contenttypes.ui.event.lead_hint=Kurze Beschreibung der Veranstaltung und ihres zentralen Themas. Die L\u00e4nge sollte maximal 2-3 S\u00e4tze betragen. Die Zusammenfassung wird sowohl in der Vollansicht der Veranstaltung als auch in allen Teilsichten und Listen angezeigt.
|
cms.contenttypes.ui.event.lead_hint=Kurze Beschreibung der Veranstaltung und ihres zentralen Themas. Die L\u00e4nge sollte maximal 2-3 S\u00e4tze betragen. Die Zusammenfassung wird sowohl in der Vollansicht der Veranstaltung als auch in allen Teilsichten und Listen angezeigt.
|
||||||
cms.contenttypes.ui.event.end_date_hint=Ein optionales Enddatum; es wird sowohl in der Vollansicht als auch in allen Listen und sonstigen Referencen angezeigt.
|
cms.contenttypes.ui.event.end_date_hint=Ein optionales Enddatum; es wird sowohl in der Vollansicht als auch in allen Listen und sonstigen Referencen angezeigt.
|
||||||
|
label=Veranstaltung
|
||||||
|
description=Veranstaltung
|
||||||
|
|
|
||||||
|
|
@ -25,3 +25,5 @@ cms.contenttypes.ui.event.there_are_no_events=Il n'y a aucun \u00e9venement
|
||||||
cms.contenttypes.event.type_label=Event
|
cms.contenttypes.event.type_label=Event
|
||||||
cms.contenttypes.ui.event.lead_hint=A short description of the focus of the event and its main topic. Should be no longer than 2-3 sentences. The lead text will be displayed in the detail view of the event as well as in listings of events.
|
cms.contenttypes.ui.event.lead_hint=A short description of the focus of the event and its main topic. Should be no longer than 2-3 sentences. The lead text will be displayed in the detail view of the event as well as in listings of events.
|
||||||
cms.contenttypes.ui.event.end_date_hint=Optionally enter an end date. It is displayed on the detail view as well as in listings of other short references.
|
cms.contenttypes.ui.event.end_date_hint=Optionally enter an end date. It is displayed on the detail view as well as in listings of other short references.
|
||||||
|
label=Event
|
||||||
|
description=An event
|
||||||
|
|
|
||||||
|
|
@ -32,4 +32,5 @@ cms.contenttypes.ui.mparticle.section.create_break=Create page break after this
|
||||||
cms.contenttypes.ui.mparticle.image.delete_button=Delete Image
|
cms.contenttypes.ui.mparticle.image.delete_button=Delete Image
|
||||||
cms.contenttypes.ui.mparticle.section_table.link_move_below=move belowe here
|
cms.contenttypes.ui.mparticle.section_table.link_move_below=move belowe here
|
||||||
cms.contenttypes.ui.mparticle.section_table.link_not_defined=(No action possible)
|
cms.contenttypes.ui.mparticle.section_table.link_not_defined=(No action possible)
|
||||||
cms.contenttypes.multipartarticle.type_label=Multipart Article
|
label=Multipart Article
|
||||||
|
description=A long article which is divided in several sections
|
||||||
|
|
@ -32,4 +32,5 @@ cms.contenttypes.ui.mparticle.section.create_break=Seitenumbruch nach diesem Abs
|
||||||
cms.contenttypes.ui.mparticle.image.delete_button=Bild Entfernen
|
cms.contenttypes.ui.mparticle.image.delete_button=Bild Entfernen
|
||||||
cms.contenttypes.ui.mparticle.section_table.link_move_below=unterhalb verschieben
|
cms.contenttypes.ui.mparticle.section_table.link_move_below=unterhalb verschieben
|
||||||
cms.contenttypes.ui.mparticle.section_table.link_not_defined=(Keine Aktion m\u00f6glich)
|
cms.contenttypes.ui.mparticle.section_table.link_not_defined=(Keine Aktion m\u00f6glich)
|
||||||
cms.contenttypes.multipartarticle.type_label=Mehrteiliger Artikel
|
label=Mehrteiliger Artikel
|
||||||
|
description=Ein l\u00e4ngerer Artikel, der in mehrere Abschnitte unterteilt ist.
|
||||||
|
|
|
||||||
|
|
@ -32,4 +32,5 @@ cms.contenttypes.ui.mparticle.section.create_break=Create page break
|
||||||
cms.contenttypes.ui.mparticle.image.delete_button=Delete Image
|
cms.contenttypes.ui.mparticle.image.delete_button=Delete Image
|
||||||
cms.contenttypes.ui.mparticle.section_table.link_move_below=move belowe here
|
cms.contenttypes.ui.mparticle.section_table.link_move_below=move belowe here
|
||||||
cms.contenttypes.ui.mparticle.section_table.link_not_defined=(No action possible)
|
cms.contenttypes.ui.mparticle.section_table.link_not_defined=(No action possible)
|
||||||
cms.contenttypes.multipartarticle.type_label=Multipart Article
|
label=Multipart Article
|
||||||
|
description=A long article which is divided in several sections
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,5 @@ cms.contenttypes.ui.newsitem.news_date=Date
|
||||||
cms.contenttypes.ui.newsitem.unknown=unknown
|
cms.contenttypes.ui.newsitem.unknown=unknown
|
||||||
cms.contenttypes.ui.newsitem.yes=Yes
|
cms.contenttypes.ui.newsitem.yes=Yes
|
||||||
cms.contenttypes.ui.newsitem.no=No
|
cms.contenttypes.ui.newsitem.no=No
|
||||||
cms.contenttypes.newsitem.type_label=News Item
|
label=News Item
|
||||||
|
description=News Item
|
||||||
|
|
|
||||||
|
|
@ -16,4 +16,5 @@ cms.contenttypes.ui.newsitem.news_date=Erscheinungsdatum:
|
||||||
cms.contenttypes.ui.newsitem.unknown=unbekannt
|
cms.contenttypes.ui.newsitem.unknown=unbekannt
|
||||||
cms.contenttypes.ui.newsitem.yes=Ja
|
cms.contenttypes.ui.newsitem.yes=Ja
|
||||||
cms.contenttypes.ui.newsitem.no=Nein
|
cms.contenttypes.ui.newsitem.no=Nein
|
||||||
cms.contenttypes.newsitem.type_label=Neuigkeiten
|
label=Neuigkeiten
|
||||||
|
description=Was gibt es neues?
|
||||||
|
|
|
||||||
|
|
@ -14,4 +14,5 @@ cms.contenttypes.ui.newsitem.news_date=Erscheinungsdatum:
|
||||||
cms.contenttypes.ui.newsitem.unknown=unknown
|
cms.contenttypes.ui.newsitem.unknown=unknown
|
||||||
cms.contenttypes.ui.newsitem.yes=Yes
|
cms.contenttypes.ui.newsitem.yes=Yes
|
||||||
cms.contenttypes.ui.newsitem.no=No
|
cms.contenttypes.ui.newsitem.no=No
|
||||||
cms.contenttypes.newsitem.type_label=News Item
|
label=News Item
|
||||||
|
description=News Item
|
||||||
|
|
|
||||||
|
|
@ -292,10 +292,12 @@ public class GlobalizedMessage {
|
||||||
getBundleName(),
|
getBundleName(),
|
||||||
locale,
|
locale,
|
||||||
rbControl);
|
rbControl);
|
||||||
} catch (MissingResourceException e) {
|
} catch (MissingResourceException ex) {
|
||||||
if (LOGGER.isDebugEnabled()) {
|
if (LOGGER.isDebugEnabled()) {
|
||||||
LOGGER.debug(
|
LOGGER.debug(
|
||||||
"ResourceBundle " + getBundleName() + " was not found.");
|
"ResourceBundle {} was not found.",
|
||||||
|
getBundleName());
|
||||||
|
LOGGER.debug(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,8 @@
|
||||||
*/
|
*/
|
||||||
package org.libreccm.security;
|
package org.libreccm.security;
|
||||||
|
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.libreccm.portation.AbstractMarshaller;
|
import org.libreccm.portation.AbstractMarshaller;
|
||||||
import org.libreccm.portation.Marshals;
|
import org.libreccm.portation.Marshals;
|
||||||
|
|
||||||
|
|
@ -34,6 +36,8 @@ import javax.transaction.Transactional;
|
||||||
@Marshals(RoleMembership.class)
|
@Marshals(RoleMembership.class)
|
||||||
public class RoleMembershipMarshaller extends AbstractMarshaller<RoleMembership> {
|
public class RoleMembershipMarshaller extends AbstractMarshaller<RoleMembership> {
|
||||||
|
|
||||||
|
private static final Logger LOGGER = LogManager.getLogger(RoleMembershipMarshaller.class);
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private EntityManager entityManager;
|
private EntityManager entityManager;
|
||||||
|
|
||||||
|
|
@ -51,6 +55,9 @@ public class RoleMembershipMarshaller extends AbstractMarshaller<RoleMembership>
|
||||||
portableObject.setMembershipId(portableObject.getMembershipId() * -1);
|
portableObject.setMembershipId(portableObject.getMembershipId() * -1);
|
||||||
// entityManager.persist(portableObject);
|
// entityManager.persist(portableObject);
|
||||||
entityManager.merge(portableObject);
|
entityManager.merge(portableObject);
|
||||||
|
entityManager.flush();
|
||||||
|
LOGGER.debug("Saved RoleMembership with id {}.",
|
||||||
|
portableObject.getMembershipId());
|
||||||
// } else {
|
// } else {
|
||||||
// entityManager.merge(portableObject);
|
// entityManager.merge(portableObject);
|
||||||
// }
|
// }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue