001/* 002 * Copyright 2020 Anyware Services 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.ametys.plugins.workspaces.tasks; 017 018import java.time.ZonedDateTime; 019import java.util.List; 020 021import org.ametys.core.user.UserIdentity; 022import org.ametys.plugins.repository.RemovableAmetysObject; 023import org.ametys.plugins.repository.data.ametysobject.ModifiableModelAwareDataAwareAmetysObject; 024 025/** 026 * Task list interface 027 */ 028public interface TasksList extends ModifiableModelAwareDataAwareAmetysObject, RemovableAmetysObject 029{ 030 /** 031 * The id of the task list 032 * @return The id 033 */ 034 public String getListId(); 035 036 /** 037 * Set the tasks list id 038 * @param id the id 039 */ 040 public void setListId(String id); 041 042 /** 043 * The position of the task list 044 * @return The position 045 */ 046 public Long getPosition(); 047 048 /** 049 * Set the tasks list position 050 * @param position the position 051 */ 052 public void setPosition(Long position); 053 054 /** 055 * The title of the task 056 * @return The title 057 */ 058 public String getLabel(); 059 060 /** 061 * Set the tasks list label 062 * @param label the label 063 */ 064 public void setLabel(String label); 065 066 /** 067 * Get the list of tasks 068 * @return The list of tasks 069 */ 070 public List<Task> getTasks(); 071 072 /** 073 * Add a task 074 * @param task The task 075 */ 076 public void addTask(Task task); 077 078 /** 079 * Get the author of the task 080 * @return the author 081 */ 082 public UserIdentity getAuthor(); 083 084 /** 085 * Set the author of this task. 086 * @param author the author 087 */ 088 public void setAuthor(UserIdentity author); 089 090 /** 091 * Get the task's creation date. 092 * @return the task's creation date. 093 */ 094 public ZonedDateTime getCreationDate(); 095 096 /** 097 * Set the post's creation date. 098 * @param startDate the post's creation date. 099 */ 100 public void setCreationDate(ZonedDateTime startDate); 101 102 /** 103 * Get the task's last modification date. 104 * @return the task's last modification date. 105 */ 106 public ZonedDateTime getLastModified(); 107 108 /** 109 * Set the post's modification date. 110 * @param date the last modification date to set. 111 */ 112 public void setLastModified(ZonedDateTime date); 113}