diff --git a/ccm-core/src/com/arsdigita/portation/Portable.java b/ccm-core/src/com/arsdigita/portation/Portable.java index 1f13ce65f..2261a24d5 100644 --- a/ccm-core/src/com/arsdigita/portation/Portable.java +++ b/ccm-core/src/com/arsdigita/portation/Portable.java @@ -18,11 +18,14 @@ */ package com.arsdigita.portation; +import com.fasterxml.jackson.annotation.JsonIgnore; + /** * @author Tobias Osmers<\a> * @version created on 6/15/16 */ +@JsonIgnoreProperties(ignoreUnknown=true) public class Categorization implements Portable { private long categorizationId; diff --git a/ccm-core/src/com/arsdigita/portation/modules/core/categorization/Category.java b/ccm-core/src/com/arsdigita/portation/modules/core/categorization/Category.java index 2129a1578..3b89b4383 100644 --- a/ccm-core/src/com/arsdigita/portation/modules/core/categorization/Category.java +++ b/ccm-core/src/com/arsdigita/portation/modules/core/categorization/Category.java @@ -26,6 +26,7 @@ import com.arsdigita.portation.conversion.NgCollection; import com.arsdigita.portation.modules.core.core.CcmObject; import com.arsdigita.portation.modules.core.l10n.LocalizedString; import com.fasterxml.jackson.annotation.JsonBackReference; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonManagedReference; import java.util.ArrayList; @@ -44,6 +45,7 @@ import java.util.Locale; * @author Tobias Osmers<\a> * @version created on 6/15/16 */ +@JsonIgnoreProperties(ignoreUnknown=true) public class CcmObject { private long objectId; diff --git a/ccm-core/src/com/arsdigita/portation/modules/core/core/EmailAddress.java b/ccm-core/src/com/arsdigita/portation/modules/core/core/EmailAddress.java index 455a5d234..aa578f237 100644 --- a/ccm-core/src/com/arsdigita/portation/modules/core/core/EmailAddress.java +++ b/ccm-core/src/com/arsdigita/portation/modules/core/core/EmailAddress.java @@ -18,10 +18,13 @@ */ package com.arsdigita.portation.modules.core.core; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + /** * @author Tobias Osmers<\a> * @version created on 6/15/16 */ +@JsonIgnoreProperties(ignoreUnknown=true) public class LocalizedString { private Map values; @@ -75,6 +79,7 @@ public class LocalizedString { * application is running on. In most cases this is not what you * want. Use {@link #getValue(java.util.Locale)} instead. */ + @JsonIgnore public String getValue() { return getValue(Locale.getDefault()); } @@ -87,6 +92,7 @@ public class LocalizedString { * @return The localised for the {@code locale} or {@code null} if there is * no value for the provided locale. */ + @JsonIgnore public String getValue(final Locale locale) { return values.get(locale); } @@ -129,6 +135,7 @@ public class LocalizedString { * @return A {@link Set} containing all locales for which this localised * string has values. */ + @JsonIgnore public Set getAvailableLocales() { return values.keySet(); } diff --git a/ccm-core/src/com/arsdigita/portation/modules/core/security/Group.java b/ccm-core/src/com/arsdigita/portation/modules/core/security/Group.java index e96fb92e9..99b368b24 100644 --- a/ccm-core/src/com/arsdigita/portation/modules/core/security/Group.java +++ b/ccm-core/src/com/arsdigita/portation/modules/core/security/Group.java @@ -21,6 +21,7 @@ package com.arsdigita.portation.modules.core.security; import com.arsdigita.portation.AbstractMarshaller; import com.arsdigita.portation.Portable; import com.arsdigita.portation.conversion.NgCollection; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonManagedReference; import java.util.HashSet; @@ -30,6 +31,7 @@ import java.util.Set; * @author Tobias Osmers<\a> * @version created on 6/15/16 */ +@JsonIgnoreProperties(ignoreUnknown=true) public class GroupMembership implements Portable { private long membershipId; diff --git a/ccm-core/src/com/arsdigita/portation/modules/core/security/Party.java b/ccm-core/src/com/arsdigita/portation/modules/core/security/Party.java index d65921ac0..5be6231b7 100644 --- a/ccm-core/src/com/arsdigita/portation/modules/core/security/Party.java +++ b/ccm-core/src/com/arsdigita/portation/modules/core/security/Party.java @@ -19,6 +19,7 @@ package com.arsdigita.portation.modules.core.security; import com.arsdigita.portation.conversion.NgCollection; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonManagedReference; import java.util.HashSet; @@ -28,6 +29,7 @@ import java.util.Set; * @author Tobias Osmers<\a> * @version created on 6/15/16 */ +@JsonIgnoreProperties(ignoreUnknown=true) public class Permission implements Portable { private long permissionId; 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 5607bcafa..6001bcdc2 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 @@ -23,6 +23,7 @@ import com.arsdigita.portation.Portable; 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.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonManagedReference; import java.util.ArrayList; @@ -35,6 +36,7 @@ import java.util.Set; * @author Tobias Osmers<\a> * @version created on 6/15/16 */ +@JsonIgnoreProperties(ignoreUnknown=true) public class RoleMembership implements Portable { private long membershipId; diff --git a/ccm-core/src/com/arsdigita/portation/modules/core/security/User.java b/ccm-core/src/com/arsdigita/portation/modules/core/security/User.java index fe3ac3c31..6d3c21a99 100644 --- a/ccm-core/src/com/arsdigita/portation/modules/core/security/User.java +++ b/ccm-core/src/com/arsdigita/portation/modules/core/security/User.java @@ -22,6 +22,7 @@ import com.arsdigita.portation.AbstractMarshaller; import com.arsdigita.portation.Portable; import com.arsdigita.portation.conversion.NgCollection; import com.arsdigita.portation.modules.core.core.EmailAddress; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonManagedReference; import java.util.ArrayList; @@ -34,6 +35,7 @@ import java.util.Set; * @author Tobias Osmers<\a> * @version created on 6/15/16 */ +@JsonIgnoreProperties(ignoreUnknown=true) public class AssignableTask extends Task implements Portable { private boolean locked; diff --git a/ccm-core/src/com/arsdigita/portation/modules/core/workflow/Task.java b/ccm-core/src/com/arsdigita/portation/modules/core/workflow/Task.java index fb747e5d3..9ef7b1529 100644 --- a/ccm-core/src/com/arsdigita/portation/modules/core/workflow/Task.java +++ b/ccm-core/src/com/arsdigita/portation/modules/core/workflow/Task.java @@ -23,6 +23,7 @@ import com.arsdigita.portation.modules.core.l10n.LocalizedString; import com.arsdigita.portation.modules.core.workflow.util.StateMapper; import com.fasterxml.jackson.annotation.JsonBackReference; import com.fasterxml.jackson.annotation.JsonIdentityInfo; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.ObjectIdGenerators; import java.util.ArrayList; @@ -34,6 +35,7 @@ import java.util.UUID; * @author Tobias Osmers<\a> * @version created on 6/15/16 */ +@JsonIgnoreProperties(ignoreUnknown=true) public class TaskAssignment implements Portable { private long taskAssignmentId; diff --git a/ccm-core/src/com/arsdigita/portation/modules/core/workflow/TaskComment.java b/ccm-core/src/com/arsdigita/portation/modules/core/workflow/TaskComment.java index 812300f7b..ad7f5fd4a 100644 --- a/ccm-core/src/com/arsdigita/portation/modules/core/workflow/TaskComment.java +++ b/ccm-core/src/com/arsdigita/portation/modules/core/workflow/TaskComment.java @@ -19,6 +19,7 @@ package com.arsdigita.portation.modules.core.workflow; import com.arsdigita.portation.modules.core.security.User; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import java.util.UUID; @@ -26,6 +27,7 @@ import java.util.UUID; * @author Tobias Osmers<\a> * @version created on 6/15/16 */ +@JsonIgnoreProperties(ignoreUnknown=true) public class Workflow implements Portable { private long workflowId; @@ -45,7 +47,7 @@ public class Workflow implements Portable { private LocalizedString name; private LocalizedString description; - private WorkflowState workflowState; + private WorkflowState state; private boolean active; private TaskState tasksState; @@ -68,7 +70,7 @@ public class Workflow implements Portable { this.description.addValue(Locale.getDefault(), trunkWorkFlow.getDescription()); - this.workflowState = StateMapper.mapWorkflowState(trunkWorkFlow + this.state = StateMapper.mapWorkflowState(trunkWorkFlow .getProcessState()); this.active = trunkWorkFlow.isActive(); this.tasksState = StateMapper.mapTaskState(trunkWorkFlow.getState()); @@ -126,12 +128,12 @@ public class Workflow implements Portable { this.description = description; } - public WorkflowState getWorkflowState() { - return workflowState; + public WorkflowState getState() { + return state; } - public void setWorkflowState(final WorkflowState workflowState) { - this.workflowState = workflowState; + public void setState(final WorkflowState state) { + this.state = state; } public boolean isActive() { diff --git a/ccm-core/src/com/arsdigita/portation/modules/core/workflow/WorkflowTemplate.java b/ccm-core/src/com/arsdigita/portation/modules/core/workflow/WorkflowTemplate.java index 695a4c4ef..3ef9b8143 100644 --- a/ccm-core/src/com/arsdigita/portation/modules/core/workflow/WorkflowTemplate.java +++ b/ccm-core/src/com/arsdigita/portation/modules/core/workflow/WorkflowTemplate.java @@ -19,17 +19,19 @@ package com.arsdigita.portation.modules.core.workflow; import com.arsdigita.portation.conversion.NgCollection; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; /** * @author