diff --git a/ccm-core/src/com/arsdigita/kernel/permissions/Permission.java b/ccm-core/src/com/arsdigita/kernel/permissions/Permission.java index 77bfd4361..20bb9b9e2 100755 --- a/ccm-core/src/com/arsdigita/kernel/permissions/Permission.java +++ b/ccm-core/src/com/arsdigita/kernel/permissions/Permission.java @@ -51,7 +51,7 @@ import org.apache.log4j.Logger; * @version 1.0 * @version $Id: Permission.java 287 2005-02-22 00:29:02Z sskracic $ */ -class Permission extends DomainObject { +public class Permission extends DomainObject { // Get the category named the same as this class private static final Logger s_log = Logger.getLogger(Permission.class); diff --git a/ccm-core/src/com/arsdigita/portation/modules/core/categorization/Categorization.java b/ccm-core/src/com/arsdigita/portation/modules/core/categorization/Categorization.java index fe0e7c5cd..a3bc7ed64 100644 --- a/ccm-core/src/com/arsdigita/portation/modules/core/categorization/Categorization.java +++ b/ccm-core/src/com/arsdigita/portation/modules/core/categorization/Categorization.java @@ -41,15 +41,8 @@ public class Categorization implements Identifiable { private long objectOrder; - public Categorization(ACSObject acsObject, Category category) { - this.categorizationId = category.getObjectId() + - acsObject.getID().longValue(); - // Todo: generatedID - this.category = category; - this.categorizedObject = new CcmObject(acsObject); - this.index = false; - this.categoryOrder = this.categorizedObject.getCategories().size() + 1; - this.objectOrder = this.category.getObjects().size() + 1; + public Categorization(final ACSObject acsObject) { + } 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 24ed875dd..e1a47c106 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 @@ -18,18 +18,12 @@ */ package com.arsdigita.portation.modules.core.categorization; -import com.arsdigita.categorization.CategorizedCollection; -import com.arsdigita.categorization.CategoryLocalizationCollection; import com.arsdigita.portation.AbstractMarshaller; import com.arsdigita.portation.Identifiable; -import com.arsdigita.portation.modules.core.categorization.utils.CollectionConverter; import com.arsdigita.portation.modules.core.core.CcmObject; import com.arsdigita.portation.modules.core.l10n.LocalizedString; import java.util.List; -import java.util.Locale; - -import static com.arsdigita.portation.modules.core.categorization.utils.CollectionConverter.convertCategories; /** * The category entity represents a single category. Each category is part of a @@ -64,29 +58,6 @@ public class Category extends CcmObject { public Category(final com.arsdigita.categorization.Category trunkCategory) { super(trunkCategory); - - this.uniqueId = null;// Todo: mapping - this.name = trunkCategory.getName(); - - CategoryLocalizationCollection categoryLocalization = trunkCategory - .getCategoryLocalizationCollection(); - Locale locale = new Locale(categoryLocalization.getLocale()); - this.title.addValue(locale, categoryLocalization.getName()); - this.description.addValue(locale, categoryLocalization.getDescription()); - - this.enabled = trunkCategory.isEnabled(); - this.visible = trunkCategory.isVisible(); - this.abstractCategory = trunkCategory.isAbstract(); - - CategorizedCollection categorizedCollection = trunkCategory.getObjects( - trunkCategory.getObjectType().toString()); - this.objects = CollectionConverter.convertCategorizations( - categorizedCollection, this); - - this.subCategories = convertCategories(trunkCategory.getChildren()); - this.parentCategory = trunkCategory.getParentCategoryCount() >= 1 ? - new Category(trunkCategory.getParents().getCategory()) : null; - this.categoryOrder = 0; } diff --git a/ccm-core/src/com/arsdigita/portation/modules/core/categorization/utils/CollectionConverter.java b/ccm-core/src/com/arsdigita/portation/modules/core/categorization/utils/CollectionConverter.java index 94c22bec9..f45dc3e1b 100644 --- a/ccm-core/src/com/arsdigita/portation/modules/core/categorization/utils/CollectionConverter.java +++ b/ccm-core/src/com/arsdigita/portation/modules/core/categorization/utils/CollectionConverter.java @@ -48,8 +48,7 @@ public class CollectionConverter { List categorizations = new ArrayList<>(); if (categorizedCollection != null) { while (categorizedCollection.next()) { - categorizations.add(new Categorization(categorizedCollection - .getACSObject(), category)); + //categorizations.add(); } categorizedCollection.close(); } else { @@ -70,7 +69,7 @@ public class CollectionConverter { List categories = new ArrayList<>(); if (categoryCollection != null) { while (categoryCollection.next()) { - categories.add(new Category(categoryCollection.getCategory())); + //.add(new Category()); } categoryCollection.close(); } else { diff --git a/ccm-core/src/com/arsdigita/portation/modules/core/core/CcmObject.java b/ccm-core/src/com/arsdigita/portation/modules/core/core/CcmObject.java index 2a3f2c242..0d3c07dfd 100644 --- a/ccm-core/src/com/arsdigita/portation/modules/core/core/CcmObject.java +++ b/ccm-core/src/com/arsdigita/portation/modules/core/core/CcmObject.java @@ -54,11 +54,7 @@ public class CcmObject implements Identifiable { public CcmObject(final ACSObject trunkObject) { - this.objectId = trunkObject.getID().longValue(); - this.uuid = null; - this.displayName = trunkObject.getDisplayName(); - this.permissions = null;// Todo: mapping - this.categories = null;// Todo: mapping + } @Override 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 0ba36f675..d41f61a32 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 @@ -32,7 +32,8 @@ public class EmailAddress implements Identifiable { private boolean verified; - public EmailAddress() { + public EmailAddress(final com.arsdigita.kernel.EmailAddress + trunkEmailAddress) { } @@ -40,4 +41,28 @@ public class EmailAddress implements Identifiable { public AbstractMarshaller getMarshaller() { return new EmailAddressMarshaller(); } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public boolean isBouncing() { + return bouncing; + } + + public void setBouncing(boolean bouncing) { + this.bouncing = bouncing; + } + + public boolean isVerified() { + return verified; + } + + public void setVerified(boolean verified) { + this.verified = verified; + } } 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 3d718e947..b8cc7ad2b 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 @@ -32,9 +32,20 @@ public class Group extends Party { private Set memberships = new HashSet<>(); + public Group(final com.arsdigita.kernel.Group trunkGroup) { + super(trunkGroup); + } @Override public AbstractMarshaller getMarshaller() { return new GroupMarshaller(); } + + public Set getMemberships() { + return memberships; + } + + public void setMemberships(Set memberships) { + this.memberships = memberships; + } } diff --git a/ccm-core/src/com/arsdigita/portation/modules/core/security/GroupMembership.java b/ccm-core/src/com/arsdigita/portation/modules/core/security/GroupMembership.java index f9d493941..fe906a8dc 100644 --- a/ccm-core/src/com/arsdigita/portation/modules/core/security/GroupMembership.java +++ b/ccm-core/src/com/arsdigita/portation/modules/core/security/GroupMembership.java @@ -31,7 +31,6 @@ public class GroupMembership implements Identifiable { private Group group; private User member; - public GroupMembership() { } @@ -40,4 +39,28 @@ public class GroupMembership implements Identifiable { public AbstractMarshaller getMarshaller() { return new GroupMembershipMarshaller(); } + + public long getMembershipId() { + return membershipId; + } + + public void setMembershipId(long membershipId) { + this.membershipId = membershipId; + } + + public Group getGroup() { + return group; + } + + public void setGroup(Group group) { + this.group = group; + } + + public User getMember() { + return member; + } + + public void setMember(User member) { + this.member = member; + } } 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 5587348a6..d1a530010 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 @@ -34,8 +34,7 @@ public class Party implements Identifiable { private String name; private Set roleMemberships = new HashSet<>(); - - public Party() { + public Party(final com.arsdigita.kernel.Party trunkParty) { } @@ -43,4 +42,28 @@ public class Party implements Identifiable { public AbstractMarshaller getMarshaller() { return new PartyMarshaller(); } + + public long getPartyId() { + return partyId; + } + + public void setPartyId(long partyId) { + this.partyId = partyId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Set getRoleMemberships() { + return roleMemberships; + } + + public void setRoleMemberships(Set roleMemberships) { + this.roleMemberships = roleMemberships; + } } diff --git a/ccm-core/src/com/arsdigita/portation/modules/core/security/Permission.java b/ccm-core/src/com/arsdigita/portation/modules/core/security/Permission.java index ba3ec3323..1c30d83ff 100644 --- a/ccm-core/src/com/arsdigita/portation/modules/core/security/Permission.java +++ b/ccm-core/src/com/arsdigita/portation/modules/core/security/Permission.java @@ -38,9 +38,7 @@ public class Permission implements Identifiable { private Date creationDate; private String creationIp; - - - public Permission() { + public Permission(final com.arsdigita.kernel.permissions.Permission permission) { } @@ -48,4 +46,60 @@ public class Permission implements Identifiable { public AbstractMarshaller getMarshaller() { return new PermissionMarshaller(); } + + public long getPermissionId() { + return permissionId; + } + + public void setPermissionId(long permissionId) { + this.permissionId = permissionId; + } + + public String getGrantedPrivilege() { + return grantedPrivilege; + } + + public void setGrantedPrivilege(String grantedPrivilege) { + this.grantedPrivilege = grantedPrivilege; + } + + public CcmObject getObject() { + return object; + } + + public void setObject(CcmObject object) { + this.object = object; + } + + public Role getGrantee() { + return grantee; + } + + public void setGrantee(Role grantee) { + this.grantee = grantee; + } + + public User getCreationUser() { + return creationUser; + } + + public void setCreationUser(User creationUser) { + this.creationUser = creationUser; + } + + public Date getCreationDate() { + return creationDate; + } + + public void setCreationDate(Date creationDate) { + this.creationDate = creationDate; + } + + public String getCreationIp() { + return creationIp; + } + + public void setCreationIp(String creationIp) { + this.creationIp = creationIp; + } } 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 a406a1f68..6876e3457 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 @@ -39,9 +39,52 @@ public class Role implements Identifiable { private ArrayList permissions = new ArrayList(); private List assignedTasks; + public Role() { + + } @Override public AbstractMarshaller getMarshaller() { return new RoleMarshaller(); } + + public long getRoleId() { + return roleId; + } + + public void setRoleId(long roleId) { + this.roleId = roleId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Set getMemberships() { + return memberships; + } + + public void setMemberships(Set memberships) { + this.memberships = memberships; + } + + public ArrayList getPermissions() { + return permissions; + } + + public void setPermissions(ArrayList permissions) { + this.permissions = permissions; + } + + public List getAssignedTasks() { + return assignedTasks; + } + + public void setAssignedTasks(List assignedTasks) { + this.assignedTasks = assignedTasks; + } } diff --git a/ccm-core/src/com/arsdigita/portation/modules/core/security/RoleMembership.java b/ccm-core/src/com/arsdigita/portation/modules/core/security/RoleMembership.java index 6792b803b..eeceb0dbd 100644 --- a/ccm-core/src/com/arsdigita/portation/modules/core/security/RoleMembership.java +++ b/ccm-core/src/com/arsdigita/portation/modules/core/security/RoleMembership.java @@ -35,9 +35,32 @@ public class RoleMembership implements Identifiable { } - @Override public AbstractMarshaller getMarshaller() { return new RoleMembershipMarshaller(); } + + public long getMembershipId() { + return membershipId; + } + + public void setMembershipId(long membershipId) { + this.membershipId = membershipId; + } + + public Role getRole() { + return role; + } + + public void setRole(Role role) { + this.role = role; + } + + public Party getMember() { + return member; + } + + public void setMember(Party member) { + this.member = member; + } } 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 f6a8d6208..46ccce7e3 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 @@ -41,13 +41,76 @@ public class User extends Party { private boolean passwordResetRequired; private Set groupMemberships = new HashSet<>(); - - public User() { - + public User(final com.arsdigita.kernel.User trunkUser) { + super(trunkUser); } @Override public AbstractMarshaller getMarshaller() { return new UserMarshaller(); } + + public String getGivenName() { + return givenName; + } + + public void setGivenName(String givenName) { + this.givenName = givenName; + } + + public String getFamilyName() { + return familyName; + } + + public void setFamilyName(String familyName) { + this.familyName = familyName; + } + + public EmailAddress getPrimaryEmailAddress() { + return primaryEmailAddress; + } + + public void setPrimaryEmailAddress(EmailAddress primaryEmailAddress) { + this.primaryEmailAddress = primaryEmailAddress; + } + + public List getEmailAddresses() { + return emailAddresses; + } + + public void setEmailAddresses(List emailAddresses) { + this.emailAddresses = emailAddresses; + } + + public boolean isBanned() { + return banned; + } + + public void setBanned(boolean banned) { + this.banned = banned; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public boolean isPasswordResetRequired() { + return passwordResetRequired; + } + + public void setPasswordResetRequired(boolean passwordResetRequired) { + this.passwordResetRequired = passwordResetRequired; + } + + public Set getGroupMemberships() { + return groupMemberships; + } + + public void setGroupMemberships(Set groupMemberships) { + this.groupMemberships = groupMemberships; + } } 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 5db65f6be..b3e1554ea 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 @@ -40,8 +40,7 @@ public class Task implements Identifiable { private List dependsOn; private List comments; - - public Task() { + public Task(final com.arsdigita.workflow.simple.Task trunkTask) { } @@ -49,4 +48,76 @@ public class Task implements Identifiable { public AbstractMarshaller getMarshaller() { return new TaskMarshaller(); } + + public long getTaskId() { + return taskId; + } + + public void setTaskId(long taskId) { + this.taskId = taskId; + } + + public LocalizedString getLabel() { + return label; + } + + public void setLabel(LocalizedString label) { + this.label = label; + } + + public LocalizedString getDescription() { + return description; + } + + public void setDescription(LocalizedString description) { + this.description = description; + } + + public boolean isActive() { + return active; + } + + public void setActive(boolean active) { + this.active = active; + } + + public String getTaskState() { + return taskState; + } + + public void setTaskState(String taskState) { + this.taskState = taskState; + } + + public Workflow getWorkflow() { + return workflow; + } + + public void setWorkflow(Workflow workflow) { + this.workflow = workflow; + } + + public List getDependentTasks() { + return dependentTasks; + } + + public void setDependentTasks(List dependentTasks) { + this.dependentTasks = dependentTasks; + } + + public List getDependsOn() { + return dependsOn; + } + + public void setDependsOn(List dependsOn) { + this.dependsOn = dependsOn; + } + + public List getComments() { + return comments; + } + + public void setComments(List comments) { + this.comments = comments; + } } diff --git a/ccm-core/src/com/arsdigita/portation/modules/core/workflow/TaskAssignment.java b/ccm-core/src/com/arsdigita/portation/modules/core/workflow/TaskAssignment.java index 2ce45fca7..391128605 100644 --- a/ccm-core/src/com/arsdigita/portation/modules/core/workflow/TaskAssignment.java +++ b/ccm-core/src/com/arsdigita/portation/modules/core/workflow/TaskAssignment.java @@ -40,4 +40,28 @@ public class TaskAssignment implements Identifiable { public AbstractMarshaller getMarshaller() { return new TaskAssignmentMarshaller(); } + + public long getTaskAssignmentId() { + return taskAssignmentId; + } + + public void setTaskAssignmentId(long taskAssignmentId) { + this.taskAssignmentId = taskAssignmentId; + } + + public UserTask getTask() { + return task; + } + + public void setTask(UserTask task) { + this.task = task; + } + + public Role getRole() { + return role; + } + + public void setRole(Role role) { + this.role = role; + } } diff --git a/ccm-core/src/com/arsdigita/portation/modules/core/workflow/UserTask.java b/ccm-core/src/com/arsdigita/portation/modules/core/workflow/UserTask.java index c6ed60721..ac40a801f 100644 --- a/ccm-core/src/com/arsdigita/portation/modules/core/workflow/UserTask.java +++ b/ccm-core/src/com/arsdigita/portation/modules/core/workflow/UserTask.java @@ -39,8 +39,9 @@ public class UserTask extends Task { private User notificationSender; private List assignments; - - public UserTask() { + public UserTask(final com.arsdigita.workflow.simple.UserTask + trunkUserTask) { + super(trunkUserTask); } @@ -48,4 +49,60 @@ public class UserTask extends Task { public AbstractMarshaller getMarshaller() { return new UserTaskMarshaller(); } + + public boolean isLocked() { + return locked; + } + + public void setLocked(boolean locked) { + this.locked = locked; + } + + public User getLockingUser() { + return lockingUser; + } + + public void setLockingUser(User lockingUser) { + this.lockingUser = lockingUser; + } + + public Date getStartDate() { + return startDate; + } + + public void setStartDate(Date startDate) { + this.startDate = startDate; + } + + public Date getDueDate() { + return dueDate; + } + + public void setDueDate(Date dueDate) { + this.dueDate = dueDate; + } + + public long getDurationMinutes() { + return durationMinutes; + } + + public void setDurationMinutes(long durationMinutes) { + this.durationMinutes = durationMinutes; + } + + public User getNotificationSender() { + return notificationSender; + } + + public void setNotificationSender(User notificationSender) { + this.notificationSender = notificationSender; + } + + public List getAssignments() { + return assignments; + } + + public void setAssignments(List assignments) { + this.assignments = assignments; + } } diff --git a/ccm-core/src/com/arsdigita/portation/modules/core/workflow/Workflow.java b/ccm-core/src/com/arsdigita/portation/modules/core/workflow/Workflow.java index f76260c14..89cd0e06d 100644 --- a/ccm-core/src/com/arsdigita/portation/modules/core/workflow/Workflow.java +++ b/ccm-core/src/com/arsdigita/portation/modules/core/workflow/Workflow.java @@ -30,16 +30,13 @@ import java.util.List; */ public class Workflow implements Identifiable { - private String trunkClass; - private long workflowId; private LocalizedString name; private LocalizedString description; private List tasks; - - - public Workflow() { + public Workflow(final com.arsdigita.workflow.simple.Workflow + trunkWorkFlow) { } @@ -47,4 +44,36 @@ public class Workflow implements Identifiable { public AbstractMarshaller getMarshaller() { return new WorkflowMarshaller(); } + + public long getWorkflowId() { + return workflowId; + } + + public void setWorkflowId(long workflowId) { + this.workflowId = workflowId; + } + + public LocalizedString getName() { + return name; + } + + public void setName(LocalizedString name) { + this.name = name; + } + + public LocalizedString getDescription() { + return description; + } + + public void setDescription(LocalizedString description) { + this.description = description; + } + + public List getTasks() { + return tasks; + } + + public void setTasks(List tasks) { + this.tasks = tasks; + } }