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 com.entwinemedia.fn.data.Opt;
24  
25  import java.util.Date;
26  import java.util.HashMap;
27  import java.util.HashSet;
28  import java.util.Map;
29  import java.util.Set;
30  
31  /**
32   * An in-memory construct to represent the technical metadata of an scheduled event
33   */
34  public class TechnicalMetadataImpl implements TechnicalMetadata {
35  
36    private String eventId;
37    private String agentId;
38    private Date startDate;
39    private Date endDate;
40    private Set<String> presenters = new HashSet<>();
41    private Map<String, String> workflowProperties = new HashMap<>();
42    private Map<String, String> agentConfig = new HashMap<>();
43    private Opt<Recording> recording;
44  
45    /**
46     * Builds a representation of the technical metadata.
47     *
48     * @param eventId
49     *          the event identifier
50     * @param agentId
51     *          the agent identifier
52     * @param startDate
53     *          the start date
54     * @param endDate
55     *          the end date
56     * @param presenters
57     *          the list of presenters
58     * @param workflowProperties
59     *          the workflow properties
60     * @param agentConfig
61     *          the capture agent configuration
62     * @param recording
63     *          the recording
64     */
65    public TechnicalMetadataImpl(String eventId, String agentId, Date startDate, Date endDate,
66            Set<String> presenters, Map<String, String> workflowProperties, Map<String, String> agentConfig,
67            Opt<Recording> recording) {
68      this.eventId = eventId;
69      this.agentId = agentId;
70      this.startDate = startDate;
71      this.endDate = endDate;
72      this.presenters = presenters;
73      this.workflowProperties = workflowProperties;
74      this.agentConfig = agentConfig;
75      this.recording = recording;
76    }
77  
78    @Override
79    public String getEventId() {
80      return eventId;
81    }
82  
83    public void setEventId(String eventId) {
84      this.eventId = eventId;
85    }
86  
87    @Override
88    public String getAgentId() {
89      return agentId;
90    }
91  
92    public void setAgentId(String agentId) {
93      this.agentId = agentId;
94    }
95  
96    @Override
97    public Date getStartDate() {
98      return startDate;
99    }
100 
101   public void setStartDate(Date startDate) {
102     this.startDate = startDate;
103   }
104 
105   @Override
106   public Date getEndDate() {
107     return endDate;
108   }
109 
110   public void setEndDate(Date endDate) {
111     this.endDate = endDate;
112   }
113 
114   @Override
115   public Set<String> getPresenters() {
116     return presenters;
117   }
118 
119   public void setPresenters(Set<String> presenters) {
120     this.presenters = presenters;
121   }
122 
123   @Override
124   public Opt<Recording> getRecording() {
125     return recording;
126   }
127 
128   public void setRecording(Opt<Recording> recording) {
129     this.recording = recording;
130   }
131 
132   @Override
133   public Map<String, String> getWorkflowProperties() {
134     return workflowProperties;
135   }
136 
137   public void setWorkflowProperties(Map<String, String> workflowProperties) {
138     this.workflowProperties = workflowProperties;
139   }
140 
141   @Override
142   public Map<String, String> getCaptureAgentConfiguration() {
143     return agentConfig;
144   }
145 
146   public void setCaptureAgentConfiguration(Map<String, String> agentConfig) {
147     this.agentConfig = agentConfig;
148   }
149 
150 }