From 0e2c58600ddf8f5791ffc2878ef6c0d73f4ec9f3 Mon Sep 17 00:00:00 2001 From: tosmers Date: Mon, 24 Oct 2016 17:46:03 +0000 Subject: [PATCH] [UPDATE] - adds attribute 'description' to ng-object-class Role, used for export to ng git-svn-id: https://svn.libreccm.org/ccm/trunk@4405 8810af33-2d31-482b-a856-94f89814c4df --- .../arsdigita/portation/modules/core/security/Role.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ccm-core/src/com/arsdigita/portation/modules/core/security/Role.java b/ccm-core/src/com/arsdigita/portation/modules/core/security/Role.java index d0362e358..9d4adf932 100644 --- a/ccm-core/src/com/arsdigita/portation/modules/core/security/Role.java +++ b/ccm-core/src/com/arsdigita/portation/modules/core/security/Role.java @@ -21,12 +21,14 @@ package com.arsdigita.portation.modules.core.security; import com.arsdigita.portation.AbstractMarshaller; import com.arsdigita.portation.Identifiable; import com.arsdigita.portation.conversion.NgCollection; +import com.arsdigita.portation.modules.core.l10n.LocalizedString; import com.arsdigita.portation.modules.core.workflow.TaskAssignment; import com.fasterxml.jackson.annotation.JsonManagedReference; import java.util.ArrayList; import java.util.HashSet; import java.util.List; +import java.util.Locale; import java.util.Set; /** @@ -37,6 +39,7 @@ public class Role implements Identifiable { private long roleId; private String name; + private LocalizedString description; @JsonManagedReference private Set memberships; @@ -49,6 +52,9 @@ public class Role implements Identifiable { public Role(final com.arsdigita.kernel.Role trunkRole) { this.roleId = trunkRole.getID().longValue(); this.name = trunkRole.getName(); + Locale local = Locale.getDefault(); + this.description = new LocalizedString(); + this.description.addValue(local, trunkRole.getDescription()); this.memberships = new HashSet<>(); @@ -61,6 +67,7 @@ public class Role implements Identifiable { public Role(final String name) { this.roleId = NgCollection.roles.size() + 1; this.name = name; + this.description = new LocalizedString(); this.memberships = new HashSet<>();