View Javadoc
1   /*
2    * Copyright (c) 2002-2020, City of Paris
3    * All rights reserved.
4    *
5    * Redistribution and use in source and binary forms, with or without
6    * modification, are permitted provided that the following conditions
7    * are met:
8    *
9    *  1. Redistributions of source code must retain the above copyright notice
10   *     and the following disclaimer.
11   *
12   *  2. Redistributions in binary form must reproduce the above copyright notice
13   *     and the following disclaimer in the documentation and/or other materials
14   *     provided with the distribution.
15   *
16   *  3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its
17   *     contributors may be used to endorse or promote products derived from
18   *     this software without specific prior written permission.
19   *
20   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23   * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
24   * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25   * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26   * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27   * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28   * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30   * POSSIBILITY OF SUCH DAMAGE.
31   *
32   * License 1.0
33   */
34  /*
35   * To change this license header, choose License Headers in Project Properties.
36   * To change this template file, choose Tools | Templates
37   * and open the template in the editor.
38   */
39  package fr.paris.lutece.plugins.broadcastproxy.business;
40  
41  import java.util.Map;
42  
43  /**
44   *
45   * @author leridons
46   */
47  public class Feed
48  {
49      private String _name;
50      private String _id;
51      private String _description;
52      private String _type;
53      private boolean _active;
54      private Map<String, String> _data;
55  
56      /**
57       * constructor
58       */
59      public Feed( )
60      {
61          this._active = true;
62      }
63  
64      /**
65       * constructor
66       * 
67       * @param _id
68       * @param _name
69       * @param _type
70       */
71      public Feed( String _id, String _name, String _type )
72      {
73          this._name = _name;
74          this._id = _id;
75          this._type = _type;
76          this._active = true;
77      }
78  
79      /**
80       * get name
81       * 
82       * @return the name
83       */
84      public String getName( )
85      {
86          return _name;
87      }
88  
89      /**
90       * set name
91       * 
92       * @param _name
93       */
94      public void setName( String _name )
95      {
96          this._name = _name;
97      }
98  
99      /**
100      * get id
101      * 
102      * @return the id
103      */
104     public String getId( )
105     {
106         return _id;
107     }
108 
109     /**
110      * set id
111      * 
112      * @param _id
113      */
114     public void setId( String _id )
115     {
116         this._id = _id;
117     }
118 
119     /**
120      * get description
121      * 
122      * @return the description
123      */
124     public String getDescription( )
125     {
126         return _description;
127     }
128 
129     /**
130      * set description
131      * 
132      * @param _description
133      */
134     public void setDescription( String _description )
135     {
136         this._description = _description;
137     }
138 
139     /**
140      * get type
141      * 
142      * @return the type
143      */
144     public String getType( )
145     {
146         return _type;
147     }
148 
149     /**
150      * set type
151      * 
152      * @param _type
153      */
154     public void setType( String _type )
155     {
156         this._type = _type;
157     }
158 
159     /**
160      * get datas
161      * 
162      * @return the map of datas
163      */
164     public Map<String, String> getData( )
165     {
166         return _data;
167     }
168 
169     /**
170      * set datas map
171      * 
172      * @param _datas
173      */
174     public void setData( Map<String, String> _data )
175     {
176         this._data = _data;
177     }
178 
179     /**
180      * get the active state of the feed
181      * 
182      * @return true if active
183      */
184     public boolean isActive( )
185     {
186         return _active;
187     }
188 
189     /**
190      * set the active state
191      * 
192      * @param _active
193      */
194     public void setActive( boolean _active )
195     {
196         this._active = _active;
197     }
198 
199 }