001    /*
002     * Copyright (C) The Apache Software Foundation. All rights reserved.
003     *
004     * This software is published under the terms of the Apache Software License
005     * version 1.1, a copy of which has been included with this distribution in
006     * the LICENSE file.
007     * 
008     * $Id: SubscriptionList.java 155459 2005-02-26 13:24:44Z dirkv $
009     */
010    package org.apache.commons.messagelet.model;
011    
012    import java.util.ArrayList;
013    import java.util.List;
014    
015    /** <p><code>SubscriptionList</code> a bean used by the digester to 
016      * create a list of JMS subscriptions.</p>
017      *
018      * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
019      * @version $Revision: 155459 $
020      */
021    public class SubscriptionList {
022    
023        private List subscriptions = new ArrayList();
024        
025        public SubscriptionList() {
026        }
027        
028    /*    
029        public void subscribe(JmsConnector connector) throws JMSException {
030            for ( Iterator iter = subscriptions.iterator(); iter.hasNext(); ) {
031                Subscription subscription = (Subscription) iter.next();
032                subscription.subscribe( connector );
033            }
034        }
035    */
036        
037        public void addSubscription(Subscription subscription) {
038            subscriptions.add( subscription );
039        }
040        
041        public void removeSubscription(Subscription subscription) {
042            subscriptions.remove( subscription );
043        }
044        
045        public List getSubscriptions() {
046            return subscriptions;
047        }
048        
049        public void setSubscriptions(List subscriptions) {
050            this.subscriptions = subscriptions;
051        }
052        
053    }