View Javadoc
1   /*
2    * Licensed to The Apereo Foundation under one or more contributor license
3    * agreements. See the NOTICE file distributed with this work for additional
4    * information regarding copyright ownership.
5    *
6    *
7    * The Apereo Foundation licenses this file to you under the Educational
8    * Community License, Version 2.0 (the "License"); you may not use this file
9    * except in compliance with the License. You may obtain a copy of the License
10   * at:
11   *
12   *   http://opensource.org/licenses/ecl2.txt
13   *
14   * Unless required by applicable law or agreed to in writing, software
15   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
17   * License for the specific language governing permissions and limitations under
18   * the License.
19   *
20   */
21  package org.opencastproject.scheduler.api;
22  
23  import java.util.Date;
24  import java.util.HashMap;
25  import java.util.HashSet;
26  import java.util.Map;
27  import java.util.Optional;
28  import java.util.Set;
29  
30  /**
31   * An in-memory construct to represent the technical metadata of an scheduled event
32   */
33  public class TechnicalMetadataImpl implements TechnicalMetadata {
34  
35    private String eventId;
36    private String agentId;
37    private Date startDate;
38    private Date endDate;
39    private Set<String> presenters = new HashSet<>();
40    private Map<String, String> workflowProperties = new HashMap<>();
41    private Map<String, String> agentConfig = new HashMap<>();
42    private Optional<Recording> recording;
43  
44    /**
45     * Builds a representation of the technical metadata.
46     *
47     * @param eventId
48     *          the event identifier
49     * @param agentId
50     *          the agent identifier
51     * @param startDate
52     *          the start date
53     * @param endDate
54     *          the end date
55     * @param presenters
56     *          the list of presenters
57     * @param workflowProperties
58     *          the workflow properties
59     * @param agentConfig
60     *          the capture agent configuration
61     * @param recording
62     *          the recording
63     */
64    public TechnicalMetadataImpl(String eventId, String agentId, Date startDate, Date endDate,
65            Set<String> presenters, Map<String, String> workflowProperties, Map<String, String> agentConfig,
66            Optional<Recording> recording) {
67      this.eventId = eventId;
68      this.agentId = agentId;
69      this.startDate = startDate;
70      this.endDate = endDate;
71      this.presenters = presenters;
72      this.workflowProperties = workflowProperties;
73      this.agentConfig = agentConfig;
74      this.recording = recording;
75    }
76  
77    @Override
78    public String getEventId() {
79      return eventId;
80    }
81  
82    public void setEventId(String eventId) {
83      this.eventId = eventId;
84    }
85  
86    @Override
87    public String getAgentId() {
88      return agentId;
89    }
90  
91    public void setAgentId(String agentId) {
92      this.agentId = agentId;
93    }
94  
95    @Override
96    public Date getStartDate() {
97      return startDate;
98    }
99  
100   public void setStartDate(Date startDate) {
101     this.startDate = startDate;
102   }
103 
104   @Override
105   public Date getEndDate() {
106     return endDate;
107   }
108 
109   public void setEndDate(Date endDate) {
110     this.endDate = endDate;
111   }
112 
113   @Override
114   public Set<String> getPresenters() {
115     return presenters;
116   }
117 
118   public void setPresenters(Set<String> presenters) {
119     this.presenters = presenters;
120   }
121 
122   @Override
123   public Optional<Recording> getRecording() {
124     return recording;
125   }
126 
127   public void setRecording(Optional<Recording> recording) {
128     this.recording = recording;
129   }
130 
131   @Override
132   public Map<String, String> getWorkflowProperties() {
133     return workflowProperties;
134   }
135 
136   public void setWorkflowProperties(Map<String, String> workflowProperties) {
137     this.workflowProperties = workflowProperties;
138   }
139 
140   @Override
141   public Map<String, String> getCaptureAgentConfiguration() {
142     return agentConfig;
143   }
144 
145   public void setCaptureAgentConfiguration(Map<String, String> agentConfig) {
146     this.agentConfig = agentConfig;
147   }
148 
149 }