001/**
002 * Copyright 2014 Tampere University of Technology, Pori Department
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 service.tut.pori.cawebsocket;
017
018import javax.xml.bind.annotation.XmlAccessType;
019import javax.xml.bind.annotation.XmlAccessorType;
020import javax.xml.bind.annotation.XmlElement;
021import javax.xml.bind.annotation.XmlRootElement;
022import javax.xml.bind.annotation.XmlType;
023
024import service.tut.pori.contentanalysis.AsyncTask.TaskType;
025import service.tut.pori.contentanalysis.BackendStatusList;
026
027/**
028 * Details of a finished task
029 *
030 */
031@XmlRootElement(name=Definitions.ELEMENT_TASK_STATUS)
032@XmlAccessorType(XmlAccessType.NONE)
033@XmlType(name="websocketTaskStatus") // change the type name as JAXB does not play nice with identical Class Names (ASyncTask.TaskStatus)
034public class TaskStatus {
035  @XmlElement(name=service.tut.pori.contentanalysis.Definitions.ELEMENT_BACKEND_STATUS_LIST)
036  private BackendStatusList _backendStatusList = null;
037  @XmlElement(name=service.tut.pori.contentanalysis.Definitions.ELEMENT_TASK_ID)
038  private Long _taskId = null;
039  @XmlElement(name=service.tut.pori.contentanalysis.Definitions.ELEMENT_TASK_TYPE)
040  private TaskType _taskType = null;
041  
042  /**
043   * @return the backendStatusList
044   */
045  public BackendStatusList getBackendStatusList() {
046    return _backendStatusList;
047  }
048  
049  /**
050   * @param backendStatusList the backendStatusList to set
051   */
052  public void setBackendStatusList(BackendStatusList backendStatusList) {
053    _backendStatusList = backendStatusList;
054  }
055  
056  /**
057   * @return the taskId
058   */
059  public Long getTaskId() {
060    return _taskId;
061  }
062  
063  /**
064   * @param taskId the taskId to set
065   */
066  public void setTaskId(Long taskId) {
067    _taskId = taskId;
068  }
069
070  /**
071   * @return the taskType
072   */
073  public TaskType getTaskType() {
074    return _taskType;
075  }
076
077  /**
078   * @param taskType the taskType to set
079   */
080  public void setTaskType(TaskType taskType) {
081    _taskType = taskType;
082  } 
083}