[CCM][FEATURE]
- adds import capabilities for workflow templates, workflows and task comments - fixes problems in workflow imports git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@5014 8810af33-2d31-482b-a856-94f89814c4dfccm-docs
parent
edea9cb9a9
commit
82c6b50d7c
|
|
@ -143,6 +143,7 @@ public class Permission implements Serializable, Portable {
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
@JoinColumn(name = "CREATION_USER_ID")
|
@JoinColumn(name = "CREATION_USER_ID")
|
||||||
@XmlElement(name = "creation-user", namespace = CORE_XML_NS)
|
@XmlElement(name = "creation-user", namespace = CORE_XML_NS)
|
||||||
|
@JsonIdentityReference(alwaysAsId = true)
|
||||||
private User creationUser;
|
private User creationUser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
package org.libreccm.workflow;
|
package org.libreccm.workflow;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIdentityReference;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||||
import org.libreccm.portation.Portable;
|
import org.libreccm.portation.Portable;
|
||||||
|
|
@ -100,6 +101,7 @@ public class AssignableTask extends Task implements Serializable, Portable {
|
||||||
*/
|
*/
|
||||||
@OneToOne
|
@OneToOne
|
||||||
@JoinColumn(name = "LOCKING_USER_ID")
|
@JoinColumn(name = "LOCKING_USER_ID")
|
||||||
|
@JsonIdentityReference(alwaysAsId = true)
|
||||||
private User lockingUser;
|
private User lockingUser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -128,6 +130,7 @@ public class AssignableTask extends Task implements Serializable, Portable {
|
||||||
@OneToOne
|
@OneToOne
|
||||||
@JoinColumn(name = "NOTIFICATION_SENDER")
|
@JoinColumn(name = "NOTIFICATION_SENDER")
|
||||||
@SuppressWarnings("PMD.LongVariable") //Shorter name would not be descriptive
|
@SuppressWarnings("PMD.LongVariable") //Shorter name would not be descriptive
|
||||||
|
@JsonIdentityReference(alwaysAsId = true)
|
||||||
private User notificationSender;
|
private User notificationSender;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ public class AssignableTaskIdResolver implements ObjectIdResolver {
|
||||||
return assignableTaskRepository
|
return assignableTaskRepository
|
||||||
.findByUuid(id.key.toString())
|
.findByUuid(id.key.toString())
|
||||||
.orElseThrow(() -> new IllegalArgumentException(String
|
.orElseThrow(() -> new IllegalArgumentException(String
|
||||||
.format("No assignableTasks with uuid %s in the " +
|
.format("No assignable tasks with uuid %s in the " +
|
||||||
"database.", id.key.toString())));
|
"database.", id.key.toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,8 @@ import java.util.stream.Collectors;
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
public class AssignableTaskRepository
|
public class AssignableTaskRepository extends AbstractEntityRepository<Long,
|
||||||
extends AbstractEntityRepository<Long, AssignableTask> {
|
AssignableTask> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Class<AssignableTask> getEntityClass() {
|
public Class<AssignableTask> getEntityClass() {
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,12 @@
|
||||||
*/
|
*/
|
||||||
package org.libreccm.workflow;
|
package org.libreccm.workflow;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||||
|
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||||
import org.hibernate.annotations.Type;
|
import org.hibernate.annotations.Type;
|
||||||
import org.libreccm.core.CoreConstants;
|
import org.libreccm.core.CoreConstants;
|
||||||
import org.libreccm.core.Identifiable;
|
import org.libreccm.core.Identifiable;
|
||||||
|
import org.libreccm.portation.Portable;
|
||||||
import org.libreccm.security.User;
|
import org.libreccm.security.User;
|
||||||
|
|
||||||
import javax.persistence.*;
|
import javax.persistence.*;
|
||||||
|
|
@ -36,7 +39,15 @@ import java.util.Objects;
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "WORKFLOW_TASK_COMMENTS", schema = CoreConstants.DB_SCHEMA)
|
@Table(name = "WORKFLOW_TASK_COMMENTS", schema = CoreConstants.DB_SCHEMA)
|
||||||
public class TaskComment implements Identifiable, Serializable {
|
@NamedQueries({
|
||||||
|
@NamedQuery(
|
||||||
|
name = "TaskComment.findByUuid",
|
||||||
|
query = "SELECT c FROM TaskComment c WHERE c.uuid = :uuid")
|
||||||
|
})
|
||||||
|
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class,
|
||||||
|
resolver = TaskCommentIdResolver.class,
|
||||||
|
property = "uuid")
|
||||||
|
public class TaskComment implements Identifiable, Serializable, Portable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 3842991529698351698L;
|
private static final long serialVersionUID = 3842991529698351698L;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2015 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
package org.libreccm.workflow;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.ObjectIdGenerator;
|
||||||
|
import com.fasterxml.jackson.annotation.ObjectIdResolver;
|
||||||
|
import org.libreccm.cdi.utils.CdiUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||||
|
* @version created the 9/27/17
|
||||||
|
*/
|
||||||
|
public class TaskCommentIdResolver implements ObjectIdResolver {
|
||||||
|
@Override
|
||||||
|
public void bindItem(ObjectIdGenerator.IdKey id,
|
||||||
|
Object pojo) {
|
||||||
|
// According to the Jackson JavaDoc, this method can be used to keep
|
||||||
|
// track of objects directly in a resolver implementation. We don't need
|
||||||
|
// this here therefore this method is empty.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object resolveId(ObjectIdGenerator.IdKey id) {
|
||||||
|
final CdiUtil cdiUtil = CdiUtil.createCdiUtil();
|
||||||
|
final TaskCommentRepository taskCommentRepository = cdiUtil
|
||||||
|
.findBean(TaskCommentRepository.class);
|
||||||
|
|
||||||
|
return taskCommentRepository
|
||||||
|
.findByUuid(id.key.toString())
|
||||||
|
.orElseThrow(() -> new IllegalArgumentException(String
|
||||||
|
.format("No task comments with uuid %s in the " +
|
||||||
|
"database.", id.key.toString())));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ObjectIdResolver newForDeserialization(Object context) {
|
||||||
|
return new TaskCommentIdResolver();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canUseFor(ObjectIdResolver resolverType) {
|
||||||
|
return resolverType instanceof TaskCommentIdResolver;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2015 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
package org.libreccm.workflow;
|
||||||
|
|
||||||
|
import org.libreccm.portation.AbstractMarshaller;
|
||||||
|
import org.libreccm.portation.Marshals;
|
||||||
|
|
||||||
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||||
|
* @version created the 9/27/17
|
||||||
|
*/
|
||||||
|
@RequestScoped
|
||||||
|
@Marshals(TaskComment.class)
|
||||||
|
public class TaskCommentMarshaller extends AbstractMarshaller<TaskComment> {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private TaskCommentRepository taskCommentRepository;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<TaskComment> getObjectClass() {
|
||||||
|
return TaskComment.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void insertIntoDb(TaskComment portableObject) {
|
||||||
|
taskCommentRepository.save(portableObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,63 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2015 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
package org.libreccm.workflow;
|
||||||
|
|
||||||
|
import org.libreccm.core.AbstractEntityRepository;
|
||||||
|
|
||||||
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
import javax.persistence.NoResultException;
|
||||||
|
import javax.persistence.TypedQuery;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||||
|
* @version created the 9/27/17
|
||||||
|
*/
|
||||||
|
@RequestScoped
|
||||||
|
public class TaskCommentRepository extends AbstractEntityRepository<Long,
|
||||||
|
TaskComment> {
|
||||||
|
@Override
|
||||||
|
public Class<TaskComment> getEntityClass() {
|
||||||
|
return TaskComment.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isNew(TaskComment entity) {
|
||||||
|
return entity.getCommentId() == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds a {@link TaskComment} by its uuid.
|
||||||
|
*
|
||||||
|
* @param uuid The uuid of the item to find
|
||||||
|
*
|
||||||
|
* @return An optional either with the found item or empty
|
||||||
|
*/
|
||||||
|
public Optional<TaskComment> findByUuid(final String uuid) {
|
||||||
|
final TypedQuery<TaskComment> query = getEntityManager()
|
||||||
|
.createNamedQuery("TaskComment.findByUuid", TaskComment.class);
|
||||||
|
query.setParameter("uuid", uuid);
|
||||||
|
|
||||||
|
try {
|
||||||
|
return Optional.of(query.getSingleResult());
|
||||||
|
} catch (NoResultException ex) {
|
||||||
|
return Optional.empty();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
package org.libreccm.workflow;
|
package org.libreccm.workflow;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIdentityReference;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||||
import org.libreccm.core.CcmObject;
|
import org.libreccm.core.CcmObject;
|
||||||
|
|
@ -48,12 +49,12 @@ import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
||||||
@NamedQueries({
|
@NamedQueries({
|
||||||
@NamedQuery(
|
@NamedQuery(
|
||||||
name = "Workflow.findByUuid",
|
name = "Workflow.findByUuid",
|
||||||
query = "SELECT W FROM Workflow w WHERE w.uuid = :uuid")
|
query = "SELECT w FROM Workflow w WHERE w.uuid = :uuid")
|
||||||
,
|
,
|
||||||
@NamedQuery(
|
@NamedQuery(
|
||||||
name = "Workflow.findForObject",
|
name = "Workflow.findForObject",
|
||||||
query = "SELECT w FROM Workflow w "
|
query = "SELECT w FROM Workflow w "
|
||||||
+ "WHERE W.object = :object")
|
+ "WHERE w.object = :object")
|
||||||
})
|
})
|
||||||
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class,
|
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class,
|
||||||
resolver = WorkflowIdResolver.class,
|
resolver = WorkflowIdResolver.class,
|
||||||
|
|
@ -82,6 +83,7 @@ public class Workflow implements Identifiable, Serializable, Portable {
|
||||||
*/
|
*/
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
@JoinColumn(name = "TEMPLATE_ID")
|
@JoinColumn(name = "TEMPLATE_ID")
|
||||||
|
@JsonIdentityReference(alwaysAsId = true)
|
||||||
private WorkflowTemplate template;
|
private WorkflowTemplate template;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -136,6 +138,7 @@ public class Workflow implements Identifiable, Serializable, Portable {
|
||||||
*/
|
*/
|
||||||
@OneToOne
|
@OneToOne
|
||||||
@JoinColumn(name = "OBJECT_ID")
|
@JoinColumn(name = "OBJECT_ID")
|
||||||
|
@JsonIdentityReference(alwaysAsId = true)
|
||||||
private CcmObject object;
|
private CcmObject object;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,8 @@ import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
||||||
@NamedQueries({
|
@NamedQueries({
|
||||||
@NamedQuery(
|
@NamedQuery(
|
||||||
name = "WorkflowTemplate.findByUuid",
|
name = "WorkflowTemplate.findByUuid",
|
||||||
query = "SELECT T FROM WorkflowTemplate t WHERE t.uuid = :uuid")
|
query = "SELECT t FROM WorkflowTemplate t " +
|
||||||
|
"WHERE t.uuid = :uuid")
|
||||||
})
|
})
|
||||||
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class,
|
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class,
|
||||||
resolver = WorkflowTemplateIdResolver.class,
|
resolver = WorkflowTemplateIdResolver.class,
|
||||||
|
|
|
||||||
|
|
@ -38,16 +38,16 @@ public class WorkflowTemplateIdResolver implements ObjectIdResolver {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object resolveId(ObjectIdGenerator.IdKey idKey) {
|
public Object resolveId(ObjectIdGenerator.IdKey id) {
|
||||||
final CdiUtil cdiUtil = CdiUtil.createCdiUtil();
|
final CdiUtil cdiUtil = CdiUtil.createCdiUtil();
|
||||||
final WorkflowTemplateRepository workflowTemplateRepository = cdiUtil
|
final WorkflowTemplateRepository workflowTemplateRepository = cdiUtil
|
||||||
.findBean(WorkflowTemplateRepository.class);
|
.findBean(WorkflowTemplateRepository.class);
|
||||||
|
|
||||||
return workflowTemplateRepository
|
return workflowTemplateRepository
|
||||||
.findByUuid(idKey.toString())
|
.findByUuid(id.key.toString())
|
||||||
.orElseThrow(() -> new IllegalArgumentException(String
|
.orElseThrow(() -> new IllegalArgumentException(String
|
||||||
.format("No workflow templates with uuid %s in the " +
|
.format("No workflow templates with uuid %s in the " +
|
||||||
"database.", idKey.toString())));
|
"database.", id.key.toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -127,24 +127,14 @@ public class CoreDataImportTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@InSequence(100)
|
@InSequence(100)
|
||||||
public void objectsShouldBeImported() throws InterruptedException {
|
public void objectsShouldBeImported() {
|
||||||
// assert for no errors
|
// assert for no errors
|
||||||
Assert.assertFalse(importHelper.importUsers());
|
Assert.assertFalse(importHelper.importUsers());
|
||||||
Assert.assertFalse(importHelper.importGroups());
|
Assert.assertFalse(importHelper.importGroups());
|
||||||
Assert.assertFalse(importHelper.importGroupMemberships());
|
Assert.assertFalse(importHelper.importGroupMemberships());
|
||||||
|
|
||||||
Assert.assertFalse(importHelper.importRoles());
|
Assert.assertFalse(importHelper.importRoles());
|
||||||
Assert.assertFalse(importHelper.importRoleMemberships());
|
Assert.assertFalse(importHelper.importRoleMemberships());
|
||||||
|
|
||||||
|
|
||||||
/*final String name = "research_Administration_Publisher";
|
|
||||||
Group group = groupRepository
|
|
||||||
.findByName(name)
|
|
||||||
.orElseThrow(() -> new IllegalArgumentException(String
|
|
||||||
.format("No Group fount with the name: %s", name)));
|
|
||||||
System.err.println(group.toString());*/
|
|
||||||
|
|
||||||
|
|
||||||
Assert.assertFalse(importHelper.importCategories());
|
Assert.assertFalse(importHelper.importCategories());
|
||||||
Assert.assertFalse(importHelper.importCategorizations());
|
Assert.assertFalse(importHelper.importCategorizations());
|
||||||
Assert.assertFalse(importHelper.importResourceTypes());
|
Assert.assertFalse(importHelper.importResourceTypes());
|
||||||
|
|
@ -155,9 +145,10 @@ public class CoreDataImportTest {
|
||||||
Assert.assertFalse(importHelper.importPermissions());
|
Assert.assertFalse(importHelper.importPermissions());
|
||||||
|
|
||||||
Assert.assertFalse(importHelper.importWorkflowTemplates());
|
Assert.assertFalse(importHelper.importWorkflowTemplates());
|
||||||
//Assert.assertFalse(importHelper.importWorkflows());
|
Assert.assertFalse(importHelper.importWorkflows());
|
||||||
|
Assert.assertFalse(importHelper.importTaskComments());
|
||||||
|
//Assert.assertFalse(importHelper.importAssignableTasks());
|
||||||
|
//Assert.assertFalse(importHelper.importTaskAssignments());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,10 @@ class ImportHelper {
|
||||||
@Marshals(DomainOwnership.class)
|
@Marshals(DomainOwnership.class)
|
||||||
private DomainOwnershipMarshaller domainOwnershipMarshaller;
|
private DomainOwnershipMarshaller domainOwnershipMarshaller;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
@Marshals(Permission.class)
|
||||||
|
private PermissionMarshaller permissionMarshaller;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@Marshals(WorkflowTemplate.class)
|
@Marshals(WorkflowTemplate.class)
|
||||||
private WorkflowTemplateMarshaller workflowTemplateMarshaller;
|
private WorkflowTemplateMarshaller workflowTemplateMarshaller;
|
||||||
|
|
@ -86,15 +90,15 @@ class ImportHelper {
|
||||||
@Marshals(Workflow.class)
|
@Marshals(Workflow.class)
|
||||||
private WorkflowMarshaller workflowMarshaller;
|
private WorkflowMarshaller workflowMarshaller;
|
||||||
@Inject
|
@Inject
|
||||||
|
@Marshals(TaskComment.class)
|
||||||
|
private TaskCommentMarshaller taskCommentMarshaller;
|
||||||
|
@Inject
|
||||||
@Marshals(AssignableTask.class)
|
@Marshals(AssignableTask.class)
|
||||||
private AssignableTaskMarshaller assignableTaskMarshaller;
|
private AssignableTaskMarshaller assignableTaskMarshaller;
|
||||||
@Inject
|
@Inject
|
||||||
@Marshals(TaskAssignment.class)
|
@Marshals(TaskAssignment.class)
|
||||||
private TaskAssignmentMarshaller taskAssignmentMarshaller;
|
private TaskAssignmentMarshaller taskAssignmentMarshaller;
|
||||||
|
|
||||||
@Inject
|
|
||||||
@Marshals(Permission.class)
|
|
||||||
private PermissionMarshaller permissionMarshaller;
|
|
||||||
|
|
||||||
|
|
||||||
boolean importUsers() {
|
boolean importUsers() {
|
||||||
|
|
@ -223,6 +227,15 @@ class ImportHelper {
|
||||||
return workflowMarshaller.importFile();
|
return workflowMarshaller.importFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean importTaskComments() {
|
||||||
|
taskCommentMarshaller.prepare(
|
||||||
|
Format.XML,
|
||||||
|
repoPath + projectPath,
|
||||||
|
"taskComments.xml",
|
||||||
|
indentation);
|
||||||
|
return taskCommentMarshaller.importFile();
|
||||||
|
}
|
||||||
|
|
||||||
boolean importAssignableTasks() {
|
boolean importAssignableTasks() {
|
||||||
assignableTaskMarshaller.prepare(
|
assignableTaskMarshaller.prepare(
|
||||||
Format.XML,
|
Format.XML,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue