head	1.10;
access;
symbols
	TIGRIS_0_9_2_4:1.5
	TIGRIS_0_9_2_3:1.5
	HELM_PEER_PORT_BRANCH:1.9.0.2
	TURBINE_PEER:1.9
	TIGRIS_0_9_2_1:1.9
	TIGRIS_0_9_2:1.5.0.2
	TIGRIS_0_9_0:1.3.0.2;
locks; strict;
comment	@# @;


1.10
date	2001.02.21.03.23.57;	author edk;	state dead;
branches;
next	1.9;

1.9
date	2001.01.26.18.29.02;	author edk;	state Exp;
branches
	1.9.2.1;
next	1.8;

1.8
date	2001.01.26.05.24.05;	author edk;	state dead;
branches;
next	1.7;

1.7
date	2001.01.25.01.44.21;	author leonardr;	state Exp;
branches;
next	1.6;

1.6
date	2001.01.24.23.45.39;	author leonardr;	state Exp;
branches;
next	1.5;

1.5
date	2000.12.23.00.48.18;	author dlr;	state Exp;
branches;
next	1.4;

1.4
date	2000.12.22.03.02.59;	author dlr;	state Exp;
branches;
next	1.3;

1.3
date	2000.12.13.02.01.05;	author leonardr;	state Exp;
branches;
next	1.2;

1.2
date	2000.12.05.23.53.30;	author leonardr;	state Exp;
branches;
next	1.1;

1.1
date	2000.12.05.23.28.58;	author leonardr;	state Exp;
branches;
next	;

1.9.2.1
date	2001.01.28.01.02.17;	author dlr;	state dead;
branches;
next	;


desc
@@


1.10
log
@delete stuff from the head which is obsolete in the branch (more changes
are still needed for a clean compile)
@
text
@/* ================================================================
 * Copyright (c) 2000 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.domain;

import java.sql.*;
import java.util.Dictionary;

import org.webmacro.util.Log;

import com.workingdogs.village.*;

import org.joist.database.*;
import org.tigris.helm.domain.Action;
import org.tigris.helm.domain.Resource;
import org.tigris.helm.DoesNotExist;

/**
 * Business object representing a permission (action + resource)
 *
 * @@author <a href="mailto:leonardr@@collab.net">Leonard Richardson</a>
 */
public class Permission extends BusinessObject
{
    private Action action;
    private Resource resource;

    public Permission (Connection conn, DataManager dMgr,
                       Action action, Resource resource)
	throws SQLException, DataSetException, JoistDatabaseException
    {
        super(conn, dMgr);        
        this.action = action;
        this.resource = resource;
    }

    public Permission (Connection conn, DataManager dMgr,
                       String actionID, String resourceID)
	throws SQLException, DataSetException, JoistDatabaseException,
               DoesNotExist
    {
        super(conn, dMgr);        
        this.action = new Action(conn, dMgr, actionID);
        this.resource = new Resource(conn, dMgr, resourceID);
    }

    protected void createManagers()
    {
        //No data managers in this class.
    }

    protected final String getTableName() { return null; }

    public final String getID() { return null; }

    public Action getAction()
    {
        return action;
    }

    public Resource getResource()
    {
        return resource;
    }
}

@


1.9
log
@readding all the files as part of the process of returning to the way
things were as of tuesday
@
text
@@


1.9.2.1
log
@Porting to the Turbine Peer system.  -dlr and leonardr
@
text
@@


1.8
log
@revert this stuff to its state as of 2001/01/24 12:42:00 GMT -- with
the following exceptions, which have some different modifications so
they'll work with changes which have happened in joist:

ProjectNewsEdit.java
SkinManager.java
SkinStyleElementValueManager.java
StyleElementManager.java
StyleManager.java

it compiles.  i dunno if it works, though.
@
text
@d50 1
d56 1
a56 1
import org.tigris.helm.database.DBException;
a64 1
 * @@author <a href="mailto:dlr@@collab.net">Daniel Rall</a>
a67 3
    /**
     * The represented action.
     */
a68 4

    /**
     * The resource that the action is on.
     */
d71 3
a73 2
    public Permission (DataManager dMgr, Action action, Resource resource)
	throws DBException
d75 1
a75 1
        super(dMgr);        
d80 8
a87 4
    public Permission (DataManager dMgr, String actionID, String resourceID)
	throws DoesNotExist, DBException
    {
        this(dMgr, new Action(dMgr, actionID), new Resource(dMgr, resourceID));
d95 1
a95 4
    protected final String getTableName()
    {
        return null;
    }
d97 1
a97 4
    public final String getID()
    {
        return null;
    }
d109 1
@


1.7
log
@Imported DBException.
@
text
@@


1.6
log
@* Removed all references to JDBC connections.  Connections are now pulled
  directly from the connection pool.
* Made use of DBException.
- dlr@@collab.net
@
text
@d55 1
a55 1
import org.joist.database.*;
@


1.5
log
@Removed unnecessary getCache() implementations in BusinessObject subclasses and migrated to a factory method for User's primary database key ctor.
@
text
@a49 1
import java.util.Dictionary;
d64 1
d68 3
d72 4
d78 2
a79 3
    public Permission (Connection conn, DataManager dMgr,
                       Action action, Resource resource)
	throws SQLException, DataSetException, JoistDatabaseException
d81 1
a81 1
        super(conn, dMgr);        
d86 4
a89 8
    public Permission (Connection conn, DataManager dMgr,
                       String actionID, String resourceID)
	throws SQLException, DataSetException, JoistDatabaseException,
               DoesNotExist
    {
        super(conn, dMgr);        
        this.action = new Action(conn, dMgr, actionID);
        this.resource = new Resource(conn, dMgr, resourceID);
d97 4
a100 1
    protected final String getTableName() { return null; }
d102 4
a105 1
    public final String getID() { return null; }
a116 1

@


1.4
log
@Propogated object cache interface.
@
text
@a89 5
    protected Dictionary getCache ()
    {
        return null;
    }

@


1.3
log
@Added support for an audit log. Actually getting the log to contain things comes next.
@
text
@d50 4
a53 1
import org.webmacro.util.*;
a70 8
    protected void createManagers()
    {
        //No data managers in this class.
    }

    protected final String getTableName() { return null; }
    public final String getID() { return null; }

d89 14
@


1.2
log
@Enabled security check of records passed into business objects.
@
text
@d74 1
@


1.1
log
@Added a check so that business objects cannot be created with records from the wrong table. Also added some new business objects.
@
text
@d73 2
d82 10
@

