Page History
...
Code Block |
---|
package org.kie.internal.task.api; public interface TaskPersistenceContext { Task findTask(Long taskId); Task persistTask(Task task); Task updateTask(Task task); Task removeTask(Task task); Group findGroup(String groupId); Group persistGroup(Group group); Group updateGroup(Group group); Group removeGroup(Group group); User findUser(String userId); User persistUser(User user); User updateUser(User user); User removeUser(User user); OrganizationalEntity findOrgEntity(String orgEntityId); OrganizationalEntity persistOrgEntity(OrganizationalEntity orgEntity); OrganizationalEntity updateOrgEntity(OrganizationalEntity orgEntity); OrganizationalEntity removeOrgEntity(OrganizationalEntity orgEntity); Content findContent(Long contentId); Content persistContent(Content content); Content updateContent(Content content); Content removeContent(Content content); Attachment findAttachment(Long attachmentId); Attachment persistAttachment(Attachment attachment); Attachment updateAttachment(Attachment attachment); Attachment removeAttachment(Attachment attachment); Comment findComment(Long commentId); Comment persistComment(Comment comment); Comment updateComment(Comment comment); Comment removeComment(Comment comment); Deadline findDeadline(Long deadlineId); Deadline persistDeadline(Deadline deadline); Deadline updateDeadline(Deadline deadline); Deadline removeDeadline(Deadline deadline); /* * Query related methods */ ... /* * Following are optional methods that are more like extension to * default data model to allow flexible add-ons */ <T> T persist(T object); <T> T find(Class<T> entityClass, Object primaryKey); <T> T remove(T entity); <T> T merge(T entity); /* * life cycle methods */ boolean isOpen(); void joinTransaction(); void close(); } |
Custom approach
Continue down the road we chose and ignore User Tasks:
<Insert magic here>
Hybrid Approach
Introduce own implementation of TaskService
which delegates to Magnolia's TaskManager
.
Overview
Content Tools