View Javadoc
1   /*
2    * Copyright (c) 2002-2021, 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  package fr.paris.lutece.plugins.subscribe.business;
35  
36  /**
37   * This is the filter class for Subscription
38   */
39  public class SubscriptionFilter
40  {
41      private String _strUserId;
42      private String _strSubscriptionProvider;
43      private String _strSubscriptionKey;
44      private String _strIdSubscribedResource;
45  
46      /**
47       * Create a new SubscriptionFilter
48       */
49      public SubscriptionFilter( )
50      {
51          // Do nothing
52      }
53  
54      /**
55       * Create a new SubscriptionFilter with every field initialized
56       * 
57       * @param strUserId
58       *            The lutece user name
59       * @param strSubscriptionProvider
60       *            The subscription provider of subscriptions to get
61       * @param strSubscriptionKey
62       *            The subscription key of subscriptions to get
63       * @param strIdSubscribedResource
64       *            The id of the subscribed resource of subscriptions to get
65       */
66      public SubscriptionFilter( String strUserId, String strSubscriptionProvider, String strSubscriptionKey, String strIdSubscribedResource )
67      {
68          this._strUserId = strUserId;
69          this._strSubscriptionProvider = strSubscriptionProvider;
70          this._strSubscriptionKey = strSubscriptionKey;
71          this._strIdSubscribedResource = strIdSubscribedResource;
72      }
73  
74      /**
75       * Get the id of the subscriber
76       * 
77       * @return The id of the subscriber
78       */
79      public String getUserId( )
80      {
81          return _strUserId;
82      }
83  
84      /**
85       * Set the lutece user name associated with this filter
86       * 
87       * @param strUserId
88       *            The lutece user name
89       */
90      public void setIdSubscriber( String strUserId )
91      {
92          this._strUserId = strUserId;
93      }
94  
95      /**
96       * Returns the provider of the subscription
97       * 
98       * @return The provider of the subscription
99       */
100     public String getSubscriptionProvider( )
101     {
102         return _strSubscriptionProvider;
103     }
104 
105     /**
106      * Sets the SubscriptionProvider
107      * 
108      * @param strSubscriptionProvider
109      *            The SubscriptionProvider
110      */
111     public void setSubscriptionProvider( String strSubscriptionProvider )
112     {
113         _strSubscriptionProvider = strSubscriptionProvider;
114     }
115 
116     /**
117      * Returns the ActionKey
118      * 
119      * @return The ActionKey
120      */
121     public String getSubscriptionKey( )
122     {
123         return _strSubscriptionKey;
124     }
125 
126     /**
127      * Sets the ActionKey
128      * 
129      * @param strActionKey
130      *            The ActionKey
131      */
132     public void setSubscriptionKey( String strActionKey )
133     {
134         _strSubscriptionKey = strActionKey;
135     }
136 
137     /**
138      * Returns the IdSubscribedResource
139      * 
140      * @return The IdSubscribedResource
141      */
142     public String getIdSubscribedResource( )
143     {
144         return _strIdSubscribedResource;
145     }
146 
147     /**
148      * Sets the IdSubscribedResource
149      * 
150      * @param strIdSubscribedResource
151      *            The IdSubscribedResource
152      */
153     public void setIdSubscribedResource( String strIdSubscribedResource )
154     {
155         _strIdSubscribedResource = strIdSubscribedResource;
156     }
157 }