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.cms.data.ametysobject.ModifiableModelAwareDataAwareAmetysObject; 022import org.ametys.core.user.UserIdentity; 023import org.ametys.plugins.repository.RemovableAmetysObject; 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 tasks list color 068 * @return the tasks list color 069 */ 070 public String getColor(); 071 072 /** 073 * Set the tasks list color 074 * @param colorId the color id 075 */ 076 public void setColor(String colorId); 077 078 /** 079 * Get the tasks list icon 080 * @return the tasks list icon 081 */ 082 public String getIcon(); 083 084 /** 085 * Set the tasks list icon 086 * @param iconId the icon id 087 */ 088 public void setIcon(String iconId); 089 090 /** 091 * Get the list of tasks 092 * @return The list of tasks 093 */ 094 public List<Task> getTasks(); 095 096 /** 097 * Add a task 098 * @param task The task 099 */ 100 public void addTask(Task task); 101 102 /** 103 * Get the author of the task 104 * @return the author 105 */ 106 public UserIdentity getAuthor(); 107 108 /** 109 * Set the author of this task. 110 * @param author the author 111 */ 112 public void setAuthor(UserIdentity author); 113 114 /** 115 * Get the task's creation date. 116 * @return the task's creation date. 117 */ 118 public ZonedDateTime getCreationDate(); 119 120 /** 121 * Set the post's creation date. 122 * @param startDate the post's creation date. 123 */ 124 public void setCreationDate(ZonedDateTime startDate); 125 126 /** 127 * Get the task's last modification date. 128 * @return the task's last modification date. 129 */ 130 public ZonedDateTime getLastModified(); 131 132 /** 133 * Set the post's modification date. 134 * @param date the last modification date to set. 135 */ 136 public void setLastModified(ZonedDateTime date); 137}