[UPDATE]
- adds json annotations in package portation to avoid infinite recursion - removes the manually solved infinite recursion problems git-svn-id: https://svn.libreccm.org/ccm/trunk@4373 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
2ddcb209cb
commit
f2403b0ce6
|
|
@ -326,7 +326,7 @@ public abstract class Party extends ACSObject {
|
||||||
* Retrieves all objects of this type stored in the database. Very
|
* Retrieves all objects of this type stored in the database. Very
|
||||||
* necessary for exporting all entities of the current work environment.
|
* necessary for exporting all entities of the current work environment.
|
||||||
*
|
*
|
||||||
* @return List of all groups
|
* @return List of all parties
|
||||||
*/
|
*/
|
||||||
public static List<Party> getAllObjectParties() {
|
public static List<Party> getAllObjectParties() {
|
||||||
List<Party> partyList = new ArrayList<>();
|
List<Party> partyList = new ArrayList<>();
|
||||||
|
|
|
||||||
|
|
@ -98,8 +98,7 @@ public class CategoryConversion {
|
||||||
categorizedObject);
|
categorizedObject);
|
||||||
|
|
||||||
// set opposed associations
|
// set opposed associations
|
||||||
//category.addObject(categorization); Todo
|
category.addObject(categorization);
|
||||||
category.addObjectId(categorization.getCategorizationId());
|
|
||||||
categorizedObject.addCategory(categorization);
|
categorizedObject.addCategory(categorization);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -133,12 +132,8 @@ public class CategoryConversion {
|
||||||
}
|
}
|
||||||
} catch (Exception e) {}
|
} catch (Exception e) {}
|
||||||
if (category != null && parentCategory != null) {
|
if (category != null && parentCategory != null) {
|
||||||
//category.setParentCategory(parentCategory);
|
category.setParentCategory(parentCategory);
|
||||||
//parentCategory.addSubCategory(category);
|
parentCategory.addSubCategory(category);
|
||||||
|
|
||||||
// to avoid infinite recursion Todo
|
|
||||||
category.setParentCategoryId(parentCategory.getUniqueId());
|
|
||||||
parentCategory.addSubCategoryId(category.getUniqueId());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ import com.arsdigita.portation.modules.core.security.Permission;
|
||||||
import com.arsdigita.portation.modules.core.security.Role;
|
import com.arsdigita.portation.modules.core.security.Role;
|
||||||
import com.arsdigita.portation.modules.core.security.RoleMembership;
|
import com.arsdigita.portation.modules.core.security.RoleMembership;
|
||||||
import com.arsdigita.portation.modules.core.security.User;
|
import com.arsdigita.portation.modules.core.security.User;
|
||||||
|
import com.arsdigita.portation.modules.core.security.util.PermissionIdMapper;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -120,8 +121,11 @@ public class PermissionConversion {
|
||||||
.permissions.Permission> trunkPermissions) {
|
.permissions.Permission> trunkPermissions) {
|
||||||
for (com.arsdigita.kernel.permissions.Permission trunkPermission :
|
for (com.arsdigita.kernel.permissions.Permission trunkPermission :
|
||||||
trunkPermissions) {
|
trunkPermissions) {
|
||||||
Permission permission = NgCollection.permissions.get
|
long permissionId = PermissionIdMapper.map.get(
|
||||||
(trunkPermission.getID().longValue());
|
((BigDecimal) trunkPermission.getACSObject().get("id")).longValue()
|
||||||
|
+ ((BigDecimal) trunkPermission.getPartyOID().get("id")).longValue()
|
||||||
|
);
|
||||||
|
Permission permission = NgCollection.permissions.get(permissionId);
|
||||||
|
|
||||||
BigDecimal trunkGranteeId = (BigDecimal) trunkPermission
|
BigDecimal trunkGranteeId = (BigDecimal) trunkPermission
|
||||||
.getPartyOID().get("id");
|
.getPartyOID().get("id");
|
||||||
|
|
@ -149,6 +153,12 @@ public class PermissionConversion {
|
||||||
(permission);
|
(permission);
|
||||||
duplicatePermission.setGrantee(role);
|
duplicatePermission.setGrantee(role);
|
||||||
role.addPermission(duplicatePermission);
|
role.addPermission(duplicatePermission);
|
||||||
|
|
||||||
|
long oldId = duplicatePermission.getObject().getObjectId()
|
||||||
|
+ duplicatePermission.getGrantee().getRoleId();
|
||||||
|
PermissionIdMapper.map.put(oldId,
|
||||||
|
duplicatePermission.getPermissionId());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// grantee instance of User, new Role necessary
|
// grantee instance of User, new Role necessary
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ import com.arsdigita.portation.AbstractMarshaller;
|
||||||
import com.arsdigita.portation.Identifiable;
|
import com.arsdigita.portation.Identifiable;
|
||||||
import com.arsdigita.portation.conversion.NgCollection;
|
import com.arsdigita.portation.conversion.NgCollection;
|
||||||
import com.arsdigita.portation.modules.core.core.CcmObject;
|
import com.arsdigita.portation.modules.core.core.CcmObject;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonBackReference;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Association class describing the association between a category and an
|
* Association class describing the association between a category and an
|
||||||
|
|
@ -35,7 +36,9 @@ public class Categorization implements Identifiable {
|
||||||
|
|
||||||
private long categorizationId;
|
private long categorizationId;
|
||||||
|
|
||||||
|
@JsonBackReference
|
||||||
private Category category;
|
private Category category;
|
||||||
|
@JsonBackReference
|
||||||
private CcmObject categorizedObject;
|
private CcmObject categorizedObject;
|
||||||
|
|
||||||
private boolean index;
|
private boolean index;
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@ import com.arsdigita.portation.Identifiable;
|
||||||
import com.arsdigita.portation.conversion.NgCollection;
|
import com.arsdigita.portation.conversion.NgCollection;
|
||||||
import com.arsdigita.portation.modules.core.core.CcmObject;
|
import com.arsdigita.portation.modules.core.core.CcmObject;
|
||||||
import com.arsdigita.portation.modules.core.l10n.LocalizedString;
|
import com.arsdigita.portation.modules.core.l10n.LocalizedString;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonBackReference;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonManagedReference;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -54,16 +56,15 @@ public class Category extends CcmObject {
|
||||||
private boolean visible;
|
private boolean visible;
|
||||||
private boolean abstractCategory;
|
private boolean abstractCategory;
|
||||||
|
|
||||||
|
@JsonManagedReference
|
||||||
private List<Categorization> objects;
|
private List<Categorization> objects;
|
||||||
|
|
||||||
|
@JsonManagedReference
|
||||||
private List<Category> subCategories;
|
private List<Category> subCategories;
|
||||||
|
@JsonBackReference
|
||||||
private Category parentCategory;
|
private Category parentCategory;
|
||||||
private long categoryOrder;
|
|
||||||
|
|
||||||
// to avoid infinite recursion Todo
|
private long categoryOrder;
|
||||||
private List<Long> objectIds;
|
|
||||||
private List<String> subCategoryIds;
|
|
||||||
private String parentCategoryId;
|
|
||||||
|
|
||||||
|
|
||||||
public Category(final com.arsdigita.categorization.Category trunkCategory) {
|
public Category(final com.arsdigita.categorization.Category trunkCategory) {
|
||||||
|
|
@ -106,13 +107,6 @@ public class Category extends CcmObject {
|
||||||
? defaultParent.getNumberOfChildCategories() + 1
|
? defaultParent.getNumberOfChildCategories() + 1
|
||||||
: 0;
|
: 0;
|
||||||
|
|
||||||
|
|
||||||
// to avoid infinite recursion Todo
|
|
||||||
this.objectIds = new ArrayList<>();
|
|
||||||
this.subCategoryIds = new ArrayList<>();
|
|
||||||
//this.parantCategoryId
|
|
||||||
|
|
||||||
|
|
||||||
NgCollection.categories.put(this.getObjectId(), this);
|
NgCollection.categories.put(this.getObjectId(), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -225,46 +219,4 @@ public class Category extends CcmObject {
|
||||||
public void setCategoryOrder(final long categoryOrder) {
|
public void setCategoryOrder(final long categoryOrder) {
|
||||||
this.categoryOrder = categoryOrder;
|
this.categoryOrder = categoryOrder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public List<Long> getObjectIds() {
|
|
||||||
return objectIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setObjectIds(final List<Long> objectIds) {
|
|
||||||
this.objectIds = objectIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addObjectId(final long object) {
|
|
||||||
this.objectIds.add(object);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void removeObjectId(final long object) {
|
|
||||||
this.objectIds.remove(object);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<String> getSubCategoryIds() {
|
|
||||||
return subCategoryIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSubCategoryIds(final List<String> subCategoryIds) {
|
|
||||||
this.subCategoryIds = subCategoryIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addSubCategoryId(final String subCategoryId) {
|
|
||||||
this.subCategoryIds.add(subCategoryId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void removeSubCategoryId(final String subCategoryId) {
|
|
||||||
this.subCategoryIds.remove(subCategoryId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getParentCategoryId() {
|
|
||||||
return parentCategoryId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setParentCategoryId(final String parentCategoryId) {
|
|
||||||
this.parentCategoryId = parentCategoryId;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ import com.arsdigita.portation.conversion.NgCollection;
|
||||||
import com.arsdigita.portation.modules.core.categorization.Categorization;
|
import com.arsdigita.portation.modules.core.categorization.Categorization;
|
||||||
import com.arsdigita.portation.modules.core.categorization.Category;
|
import com.arsdigita.portation.modules.core.categorization.Category;
|
||||||
import com.arsdigita.portation.modules.core.security.Permission;
|
import com.arsdigita.portation.modules.core.security.Permission;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonManagedReference;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -54,7 +55,9 @@ public class CcmObject implements Identifiable {
|
||||||
private String uuid;
|
private String uuid;
|
||||||
private String displayName;
|
private String displayName;
|
||||||
|
|
||||||
|
@JsonManagedReference
|
||||||
private List<Permission> permissions;
|
private List<Permission> permissions;
|
||||||
|
@JsonManagedReference
|
||||||
private List<Categorization> categories;
|
private List<Categorization> categories;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ package com.arsdigita.portation.modules.core.security;
|
||||||
import com.arsdigita.portation.AbstractMarshaller;
|
import com.arsdigita.portation.AbstractMarshaller;
|
||||||
import com.arsdigita.portation.Identifiable;
|
import com.arsdigita.portation.Identifiable;
|
||||||
import com.arsdigita.portation.conversion.NgCollection;
|
import com.arsdigita.portation.conversion.NgCollection;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonManagedReference;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
@ -31,6 +32,7 @@ import java.util.Set;
|
||||||
*/
|
*/
|
||||||
public class Group extends Party {
|
public class Group extends Party {
|
||||||
|
|
||||||
|
@JsonManagedReference
|
||||||
private Set<GroupMembership> memberships;
|
private Set<GroupMembership> memberships;
|
||||||
|
|
||||||
public Group(final com.arsdigita.kernel.Group trunkGroup) {
|
public Group(final com.arsdigita.kernel.Group trunkGroup) {
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ package com.arsdigita.portation.modules.core.security;
|
||||||
import com.arsdigita.portation.AbstractMarshaller;
|
import com.arsdigita.portation.AbstractMarshaller;
|
||||||
import com.arsdigita.portation.Identifiable;
|
import com.arsdigita.portation.Identifiable;
|
||||||
import com.arsdigita.portation.conversion.NgCollection;
|
import com.arsdigita.portation.conversion.NgCollection;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonBackReference;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||||
|
|
@ -30,7 +31,9 @@ public class GroupMembership implements Identifiable {
|
||||||
|
|
||||||
private long membershipId;
|
private long membershipId;
|
||||||
|
|
||||||
|
@JsonBackReference
|
||||||
private Group group;
|
private Group group;
|
||||||
|
@JsonBackReference
|
||||||
private User member;
|
private User member;
|
||||||
|
|
||||||
public GroupMembership(final Group group, final User member) {
|
public GroupMembership(final Group group, final User member) {
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ package com.arsdigita.portation.modules.core.security;
|
||||||
import com.arsdigita.portation.AbstractMarshaller;
|
import com.arsdigita.portation.AbstractMarshaller;
|
||||||
import com.arsdigita.portation.Identifiable;
|
import com.arsdigita.portation.Identifiable;
|
||||||
import com.arsdigita.portation.conversion.NgCollection;
|
import com.arsdigita.portation.conversion.NgCollection;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonManagedReference;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
@ -34,6 +35,7 @@ public class Party implements Identifiable {
|
||||||
private long partyId;
|
private long partyId;
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@JsonManagedReference
|
||||||
private Set<RoleMembership> roleMemberships;
|
private Set<RoleMembership> roleMemberships;
|
||||||
|
|
||||||
public Party(final com.arsdigita.kernel.Party trunkParty) {
|
public Party(final com.arsdigita.kernel.Party trunkParty) {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,10 @@ import com.arsdigita.portation.AbstractMarshaller;
|
||||||
import com.arsdigita.portation.Identifiable;
|
import com.arsdigita.portation.Identifiable;
|
||||||
import com.arsdigita.portation.conversion.NgCollection;
|
import com.arsdigita.portation.conversion.NgCollection;
|
||||||
import com.arsdigita.portation.modules.core.core.CcmObject;
|
import com.arsdigita.portation.modules.core.core.CcmObject;
|
||||||
|
import com.arsdigita.portation.modules.core.security.util.PermissionIdMapper;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonBackReference;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -34,15 +37,24 @@ public class Permission implements Identifiable {
|
||||||
private long permissionId;
|
private long permissionId;
|
||||||
private String grantedPrivilege;
|
private String grantedPrivilege;
|
||||||
|
|
||||||
|
@JsonBackReference
|
||||||
private CcmObject object;
|
private CcmObject object;
|
||||||
|
@JsonBackReference
|
||||||
private Role grantee;
|
private Role grantee;
|
||||||
private User creationUser;
|
private User creationUser;
|
||||||
|
|
||||||
private Date creationDate;
|
private Date creationDate;
|
||||||
private String creationIp;
|
private String creationIp;
|
||||||
|
|
||||||
public Permission(final com.arsdigita.kernel.permissions.Permission trunkPermission) {
|
public Permission(final com.arsdigita.kernel.permissions.Permission
|
||||||
|
trunkPermission) {
|
||||||
|
long oldId = ((BigDecimal) trunkPermission.getACSObject().get("id"))
|
||||||
|
.longValue()
|
||||||
|
+ ((BigDecimal) trunkPermission.getPartyOID().get("id"))
|
||||||
|
.longValue();
|
||||||
this.permissionId = NgCollection.permissions.size() + 1;
|
this.permissionId = NgCollection.permissions.size() + 1;
|
||||||
|
PermissionIdMapper.map.put(oldId, this.permissionId);
|
||||||
|
|
||||||
this.grantedPrivilege = trunkPermission.getPrivilege().getName();
|
this.grantedPrivilege = trunkPermission.getPrivilege().getName();
|
||||||
|
|
||||||
//this.object;
|
//this.object;
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ import com.arsdigita.portation.AbstractMarshaller;
|
||||||
import com.arsdigita.portation.Identifiable;
|
import com.arsdigita.portation.Identifiable;
|
||||||
import com.arsdigita.portation.conversion.NgCollection;
|
import com.arsdigita.portation.conversion.NgCollection;
|
||||||
import com.arsdigita.portation.modules.core.workflow.TaskAssignment;
|
import com.arsdigita.portation.modules.core.workflow.TaskAssignment;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonManagedReference;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
@ -37,9 +38,12 @@ public class Role implements Identifiable {
|
||||||
private long roleId;
|
private long roleId;
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@JsonManagedReference
|
||||||
private Set<RoleMembership> memberships;
|
private Set<RoleMembership> memberships;
|
||||||
|
|
||||||
|
@JsonManagedReference
|
||||||
private List<Permission> permissions;
|
private List<Permission> permissions;
|
||||||
|
@JsonManagedReference
|
||||||
private List<TaskAssignment> assignedTasks;
|
private List<TaskAssignment> assignedTasks;
|
||||||
|
|
||||||
public Role(final com.arsdigita.kernel.Role trunkRole) {
|
public Role(final com.arsdigita.kernel.Role trunkRole) {
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ package com.arsdigita.portation.modules.core.security;
|
||||||
import com.arsdigita.portation.AbstractMarshaller;
|
import com.arsdigita.portation.AbstractMarshaller;
|
||||||
import com.arsdigita.portation.Identifiable;
|
import com.arsdigita.portation.Identifiable;
|
||||||
import com.arsdigita.portation.conversion.NgCollection;
|
import com.arsdigita.portation.conversion.NgCollection;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonBackReference;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||||
|
|
@ -30,7 +31,9 @@ public class RoleMembership implements Identifiable {
|
||||||
|
|
||||||
private long membershipId;
|
private long membershipId;
|
||||||
|
|
||||||
|
@JsonBackReference
|
||||||
private Role role;
|
private Role role;
|
||||||
|
@JsonBackReference
|
||||||
private Party member;
|
private Party member;
|
||||||
|
|
||||||
public RoleMembership(final Role role, final Party member) {
|
public RoleMembership(final Role role, final Party member) {
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ import com.arsdigita.portation.AbstractMarshaller;
|
||||||
import com.arsdigita.portation.Identifiable;
|
import com.arsdigita.portation.Identifiable;
|
||||||
import com.arsdigita.portation.conversion.NgCollection;
|
import com.arsdigita.portation.conversion.NgCollection;
|
||||||
import com.arsdigita.portation.modules.core.core.EmailAddress;
|
import com.arsdigita.portation.modules.core.core.EmailAddress;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonManagedReference;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
@ -45,6 +46,7 @@ public class User extends Party {
|
||||||
private String password;
|
private String password;
|
||||||
private boolean passwordResetRequired;
|
private boolean passwordResetRequired;
|
||||||
|
|
||||||
|
@JsonManagedReference
|
||||||
private Set<GroupMembership> groupMemberships;
|
private Set<GroupMembership> groupMemberships;
|
||||||
|
|
||||||
public User(final com.arsdigita.kernel.User trunkUser) {
|
public User(final com.arsdigita.kernel.User trunkUser) {
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,8 @@ import com.arsdigita.portation.AbstractMarshaller;
|
||||||
import com.arsdigita.portation.Identifiable;
|
import com.arsdigita.portation.Identifiable;
|
||||||
import com.arsdigita.portation.conversion.NgCollection;
|
import com.arsdigita.portation.conversion.NgCollection;
|
||||||
import com.arsdigita.portation.modules.core.l10n.LocalizedString;
|
import com.arsdigita.portation.modules.core.l10n.LocalizedString;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonBackReference;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonManagedReference;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
@ -41,9 +43,12 @@ public class Task implements Identifiable {
|
||||||
private boolean active;
|
private boolean active;
|
||||||
private String taskState;
|
private String taskState;
|
||||||
|
|
||||||
|
@JsonBackReference
|
||||||
private Workflow workflow;
|
private Workflow workflow;
|
||||||
|
|
||||||
|
@JsonBackReference
|
||||||
private List<Task> dependentTasks;
|
private List<Task> dependentTasks;
|
||||||
|
@JsonManagedReference
|
||||||
private List<Task> dependsOn;
|
private List<Task> dependsOn;
|
||||||
private List<String> comments;
|
private List<String> comments;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ import com.arsdigita.portation.AbstractMarshaller;
|
||||||
import com.arsdigita.portation.Identifiable;
|
import com.arsdigita.portation.Identifiable;
|
||||||
import com.arsdigita.portation.conversion.NgCollection;
|
import com.arsdigita.portation.conversion.NgCollection;
|
||||||
import com.arsdigita.portation.modules.core.security.Role;
|
import com.arsdigita.portation.modules.core.security.Role;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonBackReference;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||||
|
|
@ -31,7 +32,9 @@ public class TaskAssignment implements Identifiable {
|
||||||
|
|
||||||
private long taskAssignmentId;
|
private long taskAssignmentId;
|
||||||
|
|
||||||
|
@JsonBackReference
|
||||||
private UserTask task;
|
private UserTask task;
|
||||||
|
@JsonBackReference
|
||||||
private Role role;
|
private Role role;
|
||||||
|
|
||||||
public TaskAssignment(final UserTask task, final Role role) {
|
public TaskAssignment(final UserTask task, final Role role) {
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ import com.arsdigita.portation.AbstractMarshaller;
|
||||||
import com.arsdigita.portation.Identifiable;
|
import com.arsdigita.portation.Identifiable;
|
||||||
import com.arsdigita.portation.conversion.NgCollection;
|
import com.arsdigita.portation.conversion.NgCollection;
|
||||||
import com.arsdigita.portation.modules.core.security.User;
|
import com.arsdigita.portation.modules.core.security.User;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonManagedReference;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
@ -42,6 +43,7 @@ public class UserTask extends Task {
|
||||||
|
|
||||||
private User notificationSender;
|
private User notificationSender;
|
||||||
|
|
||||||
|
@JsonManagedReference
|
||||||
private List<TaskAssignment> assignments;
|
private List<TaskAssignment> assignments;
|
||||||
|
|
||||||
public UserTask(final com.arsdigita.workflow.simple.UserTask
|
public UserTask(final com.arsdigita.workflow.simple.UserTask
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ import com.arsdigita.portation.AbstractMarshaller;
|
||||||
import com.arsdigita.portation.Identifiable;
|
import com.arsdigita.portation.Identifiable;
|
||||||
import com.arsdigita.portation.conversion.NgCollection;
|
import com.arsdigita.portation.conversion.NgCollection;
|
||||||
import com.arsdigita.portation.modules.core.l10n.LocalizedString;
|
import com.arsdigita.portation.modules.core.l10n.LocalizedString;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonManagedReference;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -38,6 +39,7 @@ public class Workflow implements Identifiable {
|
||||||
private LocalizedString name;
|
private LocalizedString name;
|
||||||
private LocalizedString description;
|
private LocalizedString description;
|
||||||
|
|
||||||
|
@JsonManagedReference
|
||||||
private List<Task> tasks;
|
private List<Task> tasks;
|
||||||
|
|
||||||
public Workflow(final com.arsdigita.workflow.simple.Workflow trunkWorkFlow) {
|
public Workflow(final com.arsdigita.workflow.simple.Workflow trunkWorkFlow) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue