From: <jm...@us...> - 2005-09-23 06:38:11
|
Update of /cvsroot/struts/dialogs/src/net/jspcontrols/mailreader/business In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17798/src/net/jspcontrols/mailreader/business Added Files: Subscription.java User.java Log Message: Added MailReader Demo; Added component RuleSet --- NEW FILE: Subscription.java --- /* * $Id: Subscription.java,v 1.1 2005/09/23 06:37:57 jmikus Exp $ * * Copyright 1999-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package net.jspcontrols.mailreader.business; /** * <p>A <strong>Subscription</strong> which is stored, along with the * associated {@link net.jspcontrols.mailreader.business.User}, in a {@link net.jspcontrols.mailreader.memory.UserDatabase}.</p> * * @version $Rev: 54929 $ $Date: 2005/09/23 06:37:57 $ */ public interface Subscription { // ------------------------------------------------------------- Properties /** * Return the auto-connect flag. */ public boolean getAutoConnect(); /** * Set the auto-connect flag. * * @param autoConnect The new auto-connect flag */ public void setAutoConnect(boolean autoConnect); /** * Return the host name. */ public String getHost(); /** * Sets the host name. */ public void setHost(String host); /** * Return the password. */ public String getPassword(); /** * Set the password. * * @param password The new password */ public void setPassword(String password); /** * Return the subscription type. */ public String getType(); /** * Set the subscription type. * * @param type The new subscription type */ public void setType(String type); /** * Return the {@link net.jspcontrols.mailreader.business.User} owning this Subscription. */ public User getUser(); /** * Return the username. */ public String getUsername(); /** * Set the username. * * @param username The new username */ public void setUsername(String username); } --- NEW FILE: User.java --- /* * $Id: User.java,v 1.1 2005/09/23 06:37:57 jmikus Exp $ * * Copyright 1999-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package net.jspcontrols.mailreader.business; import net.jspcontrols.mailreader.business.Subscription; import net.jspcontrols.mailreader.memory.UserDatabase; import java.util.Collection; /** * <p>A <strong>User</strong> which is stored, along with his or her * associated {@link net.jspcontrols.mailreader.business.Subscription}s, in a {@link net.jspcontrols.mailreader.memory.UserDatabase}.</p> * * @version $Rev: 54929 $ $Date: 2005/09/23 06:37:57 $ * @since Struts 1.1 */ public interface User { // ------------------------------------------------------------- Properties /** * Return the {@link net.jspcontrols.mailreader.memory.UserDatabase} with which we are associated. */ public UserDatabase getDatabase(); /** * Return the from address. */ public String getFromAddress(); /** * Set the from address. * * @param fromAddress The new from address */ public void setFromAddress(String fromAddress); /** * Return the full name. */ public String getFullName(); /** * Set the full name. * * @param fullName The new full name */ public void setFullName(String fullName); /** * Return the password. */ public String getPassword(); /** * Set the password. * * @param password The new password */ public void setPassword(String password); /** * Return the reply-to address. */ public String getReplyToAddress(); /** * Set the reply-to address. * * @param replyToAddress The new reply-to address */ public void setReplyToAddress(String replyToAddress); /** * Find and return all {@link net.jspcontrols.mailreader.business.Subscription}s associated with this user. * If there are none, a zero-length array is returned. */ public Subscription[] getSubscriptions(); /** * Return the username. */ public String getUsername(); /** * Setus username */ public void setUsername(String username); // --------------------------------------------------------- Public Methods /** * Create and return a new {@link net.jspcontrols.mailreader.business.Subscription} associated with this * User, for the specified host name. * * @param host Host name for which to create a subscription * * @exception java.lang.IllegalArgumentException if the host name is not unique * for this user */ public Subscription createSubscription(String host); /** * Find and return the {@link net.jspcontrols.mailreader.business.Subscription} associated with the specified * host. If none is found, return <code>null</code>. * * @param host Host name to look up */ public Subscription findSubscription(String host); /** * Remove the specified {@link net.jspcontrols.mailreader.business.Subscription} from being associated * with this User. * * @param subscription Subscription to be removed * * @exception java.lang.IllegalArgumentException if the specified subscription is not * associated with this User */ public void removeSubscription(Subscription subscription); public Collection getSubscriptionCollection(); } |