001/*
002 *  Copyright 2016 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.explorer.tasks;
017
018import java.util.Date;
019import java.util.List;
020
021import org.ametys.core.user.UserIdentity;
022import org.ametys.plugins.repository.ModifiableAmetysObject;
023import org.ametys.plugins.repository.RemovableAmetysObject;
024import org.ametys.plugins.repository.metadata.ModifiableRichText;
025
026/**
027 * Explorer task that can be modified
028 */
029public interface ModifiableTask extends Task, ModifiableAmetysObject, RemovableAmetysObject
030{
031    
032    /**
033     * Set the identifier of a task
034     * @param taskId The id
035     */
036    public void setTaskId(String taskId);
037    
038    /**
039     * Set the title of the task
040     * @param title The title
041     */
042    public void setLabel(String title);
043    
044    @Override
045    public ModifiableRichText getDescription();
046    
047    /**
048     * Set the author of this task.
049     * @param author the author
050     */
051    public void setAuthor(UserIdentity author);
052    
053    /**
054     * Set the starting date of the task
055     * @param startDate The start date
056     */
057    public void setStartDate(Date startDate);
058    
059    /**
060     * Set the ending date of the task
061     * @param endDate The end date
062     */
063    public void setEndDate(Date endDate);
064    
065    /**
066     * Set the status of the task
067     * @param status The status
068     */
069    public void setStatus(TaskStatus status);
070    
071    /**
072     * Set the task priority
073     * @param priority the priority
074     */
075    public void setPriority(TaskPriority priority);
076    
077    /**
078     * Set the initial load estimated for this task
079     * @param initialLoad The initial load
080     */
081    public void setInitialLoad(Double initialLoad);
082    
083    /**
084     * Set the progress of the task
085     * @param progress The progress, in percentage
086     */
087    public void setProgress(Double progress);
088    
089    /**
090     * Set the list of user assigned to this task
091     * @param assignment The assignment list
092     */
093    public void setAssignment(List<UserIdentity> assignment);
094    
095    /**
096     * Set the list of user subscribed to this task
097     * @param subscribers The list of subscribers
098     */
099    public void setSubscribers(List<UserIdentity> subscribers);
100    
101    /**
102     * Set the post's creation date.
103     * @param startDate the post's creation date.
104     */
105    public void setCreationDate(Date startDate);
106    
107    /**
108     * Set the post's modification date.
109     * @param date the last modification date to set.
110     */
111    public void setLastModified(Date date);
112    
113}