head	1.3;
access;
symbols
	dlr:1.1.1
	HELM_PEER_PORT_BRANCH:1.1.1.1;
locks; strict;
comment	@# @;


1.3
date	2001.03.07.01.14.51;	author lucas;	state dead;
branches;
next	1.2;

1.2
date	2001.02.21.03.02.28;	author edk;	state Exp;
branches;
next	1.1;

1.1
date	2001.01.28.01.18.25;	author dlr;	state dead;
branches
	1.1.1.1
	1.1.2.1;
next	;

1.1.1.1
date	2001.02.21.00.33.08;	author dlr;	state Exp;
branches;
next	;

1.1.2.1
date	2001.01.28.01.18.25;	author dlr;	state Exp;
branches;
next	1.1.2.2;

1.1.2.2
date	2001.02.09.20.26.40;	author dlr;	state Exp;
branches;
next	1.1.2.3;

1.1.2.3
date	2001.02.09.20.27.21;	author dlr;	state Exp;
branches;
next	1.1.2.4;

1.1.2.4
date	2001.02.09.20.39.35;	author dlr;	state Exp;
branches;
next	1.1.2.5;

1.1.2.5
date	2001.02.15.20.50.39;	author leonardr;	state Exp;
branches;
next	1.1.2.6;

1.1.2.6
date	2001.02.16.03.01.32;	author dlr;	state Exp;
branches;
next	1.1.2.7;

1.1.2.7
date	2001.02.20.09.49.20;	author edk;	state Exp;
branches;
next	;


desc
@@


1.3
log
@Deprecated by Torque changes. -dlr
@
text
@/* ================================================================
 * Copyright (c) 2000-2001 CollabNet.  All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 * 
 * 1. Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 * 
 * 2. Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * 
 * 3. The end-user documentation included with the redistribution, if
 * any, must include the following acknowlegement: "This product includes
 * software developed by CollabNet (http://www.collab.net/)."
 * Alternately, this acknowlegement may appear in the software itself, if
 * and wherever such third-party acknowlegements normally appear.
 * 
 * 4. The hosted project names must not be used to endorse or promote
 * products derived from this software without prior written
 * permission. For written permission, please contact info@@collab.net.
 * 
 * 5. Products derived from this software may not use the "Tigris" name
 * nor may "Tigris" appear in their names without prior written
 * permission of CollabNet.
 * 
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL COLLABNET OR ITS CONTRIBUTORS BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * ====================================================================
 * 
 * This software consists of voluntary contributions made by many
 * individuals on behalf of CollabNet.
 */

package org.tigris.helm.om.peer;

import org.apache.turbine.util.db.Criteria;

import org.tigris.helm.om.base.*;
import org.tigris.helm.om.*;
import org.tigris.helm.tool.PeerTool;
import org.tigris.helm.DoesNotExist;

/**
 * Extension of generated Peer BaseMailinglistPeer.
 *
 * @@author <a href="mailto:dlr@@collab.net">Daniel Rall</a>
 */
public class MailingListPeer extends BaseMailingListPeer
{
    /**
     * Gets an instance of the list specified by the database key and project..
     *
     * @@param project Assures that the list belongs a specific project.
     * @@param listID  The database key of the desired mailing list.
     */
    public static MailingList getInstance(Project project, String listID)
        throws DoesNotExist, Exception
    {
        Criteria c = new Criteria()
            .add(MAILINGLIST_ID, listID)
            .add(PROJECT_ID, project.getProjectId());
        return (MailingList)PeerTool.getFirstBO(doSelect(c),
                                                "List with id " + listID,
                                                "project named " +
                                                project.getName());
    }

    public static MailingList getInstanceByName(Project project, String name)
        throws DoesNotExist, Exception
    {
        Criteria c = new Criteria()
            .add(LIST_NAME, name)
            .add(PROJECT_ID, project.getProjectId());
        return (MailingList)PeerTool.getFirstBO(doSelect(c),
                                                "List with name " + name,
                                                "project named " +
                                                project.getName());
    }
}
@


1.2
log
@adding files from the branch to the head
@
text
@@


1.1
log
@file MailingListPeer.java was initially added on branch HELM_PEER_PORT_BRANCH.
@
text
@d1 92
@


1.1.1.1
log
@Replacing the HEAD with the HELM_PEER_PORT_BRANCH.
@
text
@a0 92
/* ================================================================
 * Copyright (c) 2000-2001 CollabNet.  All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 * 
 * 1. Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 * 
 * 2. Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * 
 * 3. The end-user documentation included with the redistribution, if
 * any, must include the following acknowlegement: "This product includes
 * software developed by CollabNet (http://www.collab.net/)."
 * Alternately, this acknowlegement may appear in the software itself, if
 * and wherever such third-party acknowlegements normally appear.
 * 
 * 4. The hosted project names must not be used to endorse or promote
 * products derived from this software without prior written
 * permission. For written permission, please contact info@@collab.net.
 * 
 * 5. Products derived from this software may not use the "Tigris" name
 * nor may "Tigris" appear in their names without prior written
 * permission of CollabNet.
 * 
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL COLLABNET OR ITS CONTRIBUTORS BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * ====================================================================
 * 
 * This software consists of voluntary contributions made by many
 * individuals on behalf of CollabNet.
 */

package org.tigris.helm.om.peer;

import org.apache.turbine.util.db.Criteria;

import org.tigris.helm.om.base.*;
import org.tigris.helm.om.*;
import org.tigris.helm.tool.PeerTool;
import org.tigris.helm.DoesNotExist;

/**
 * Extension of generated Peer BaseMailinglistPeer.
 *
 * @@author <a href="mailto:dlr@@collab.net">Daniel Rall</a>
 */
public class MailingListPeer extends BaseMailingListPeer
{
    /**
     * Gets an instance of the list specified by the database key and project..
     *
     * @@param project Assures that the list belongs a specific project.
     * @@param listID  The database key of the desired mailing list.
     */
    public static MailingList getInstance(Project project, String listID)
        throws DoesNotExist, Exception
    {
        Criteria c = new Criteria()
            .add(MAILINGLIST_ID, listID)
            .add(PROJECT_ID, project.getProjectId());
        return (MailingList)PeerTool.getFirstBO(doSelect(c),
                                                "List with id " + listID,
                                                "project named " +
                                                project.getName());
    }

    public static MailingList getInstanceByName(Project project, String name)
        throws DoesNotExist, Exception
    {
        Criteria c = new Criteria()
            .add(LIST_NAME, name)
            .add(PROJECT_ID, project.getProjectId());
        return (MailingList)PeerTool.getFirstBO(doSelect(c),
                                                "List with name " + name,
                                                "project named " +
                                                project.getName());
    }
}
@


1.1.2.1
log
@Classes ported to the Turbine Peer system. -dlr and leonardr
@
text
@a0 58
/* ================================================================
 * Copyright (c) 2001 CollabNet.  All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 * 
 * 1. Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 * 
 * 2. Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * 
 * 3. The end-user documentation included with the redistribution, if
 * any, must include the following acknowlegement: "This product includes
 * software developed by CollabNet (http://www.collab.net/)."
 * Alternately, this acknowlegement may appear in the software itself, if
 * and wherever such third-party acknowlegements normally appear.
 * 
 * 4. The hosted project names must not be used to endorse or promote
 * products derived from this software without prior written
 * permission. For written permission, please contact info@@collab.net.
 * 
 * 5. Products derived from this software may not use the "Tigris" name
 * nor may "Tigris" appear in their names without prior written
 * permission of CollabNet.
 * 
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL COLLABNET OR ITS CONTRIBUTORS BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * ====================================================================
 * 
 * This software consists of voluntary contributions made by many
 * individuals on behalf of CollabNet.
 */

package org.tigris.helm.om.peer;



/**
 * Extension of generated Peer BaseMailinglistPeer.
 *
 * @@author <a href="mailto:leonardr@@collab.net">Leonard Richardson</a>
 */
public class MailingListPeer extends BaseMailingListPeer
{
}
@


1.1.2.2
log
@Basic stub for Eyebrowse porting.
@
text
@a48 1
import org.apache.turbine.util.db.Criteria;
a49 3
import org.tigris.helm.om.*;
import org.tigris.helm.tool.PeerTool;
import org.tigris.helm.DoesNotExist;
d54 1
a54 1
 * @@author <a href="mailto:dlr@@collab.net">Daniel Rall</a>
a57 14
    /**
     * Gets an instance of the list specified by the database key and project..
     *
     * @@param listID  The database key of the desired mailing list.
     * @@param project TODO: Figured out why Eyebrowse passes this parameter.
     */
    public MailingList getInstance(String listID, Project project)
        throws DoesNotExist, Exception
    {
        Criteria c = new Criteria()
            .add(MAILINGLIST_ID, listID);
        return (MailingList)PeerTool.getFirstBO(doSelect(c),
                                                "List with id " + listID);
    }
@


1.1.2.3
log
@Made static.
@
text
@d68 1
a68 1
    public static MailingList getInstance(String listID, Project project)
@


1.1.2.4
log
@This factor method also checks for the existance of the mailing list
in the specified project.
@
text
@a64 1
     * @@param project Assures that the list belongs a specific project.
d66 1
d68 1
a68 1
    public static MailingList getInstance(Project project, String listID)
d72 1
a72 2
            .add(MAILINGLIST_ID, listID)
            .add(PROJECT_ID, project.getProjectId());
d74 1
a74 3
                                                "List with id " + listID,
                                                "project named " +
                                                project.getName());
@


1.1.2.5
log
@Normalized copyright dates.
@
text
@d2 1
a2 1
 * Copyright (c) 2000-2001 CollabNet.  All rights reserved.
@


1.1.2.6
log
@Added new imports necessitated by Torque.
@
text
@a50 1
import org.tigris.helm.om.base.*;
@


1.1.2.7
log
@* port MailingList* to the peer system
* add some necessary methods to MailingList, update AnzuTask to use those
* this compiles, but some methods still need to be implemented, so it
  doesn't all work
@
text
@a79 12

    public static MailingList getInstanceByName(Project project, String name)
        throws DoesNotExist, Exception
    {
        Criteria c = new Criteria()
            .add(LIST_NAME, name)
            .add(PROJECT_ID, project.getProjectId());
        return (MailingList)PeerTool.getFirstBO(doSelect(c),
                                                "List with name " + name,
                                                "project named " +
                                                project.getName());
    }
@


