You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by tv...@apache.org on 2007/05/05 08:58:51 UTC
svn commit: r535465 [28/49] - in /jakarta/turbine/fulcrum/trunk: ./ bsf/
bsf/src/java/org/apache/fulcrum/bsf/ bsf/src/test/ bsf/xdocs/ cache/
cache/src/java/org/apache/fulcrum/cache/
cache/src/java/org/apache/fulcrum/cache/impl/ cache/src/test/ cache/s...
Modified: jakarta/turbine/fulcrum/trunk/security/torque/project.xml
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/torque/project.xml?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/torque/project.xml (original)
+++ jakarta/turbine/fulcrum/trunk/security/torque/project.xml Fri May 4 23:58:06 2007
@@ -1,134 +1,152 @@
-<?xml version="1.0"?>
-<project>
- <extend>${basedir}/../project.xml</extend>
- <id>fulcrum-security-torque</id>
- <name>Fulcrum Security Torque Impl</name>
-
- <dependencies>
- <dependency>
- <groupId>fulcrum</groupId>
- <artifactId>fulcrum-security-api</artifactId>
- <version>1.0.8-dev</version>
- </dependency>
- <dependency>
- <groupId>fulcrum</groupId>
- <artifactId>fulcrum-crypto</artifactId>
- <version>1.0.5</version>
- </dependency>
-
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.0.4</version>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.1</version>
- </dependency>
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.1</version>
- </dependency>
- <dependency>
- <groupId>cryptix</groupId>
- <artifactId>cryptix</artifactId>
- <version>3.2.0</version>
- <url>http://www.cryptix.org/</url>
- </dependency>
-
-<!-- Needed for Torque -->
- <dependency>
- <artifactId>torque</artifactId>
- <groupId>torque</groupId>
- <version>3.3-RC1</version>
- <url>http://db.apache.org/torque</url>
- </dependency>
-
- <dependency>
- <artifactId>commons-beanutils</artifactId>
- <groupId>commons-beanutils</groupId>
- <version>1.7.0</version>
- <url>http://jakarta.apache.org/commons/beanutils/</url>
- </dependency>
-
- <dependency>
- <artifactId>commons-configuration</artifactId>
- <groupId>commons-configuration</groupId>
- <version>1.2</version>
- <url>http://jakarta.apache.org/commons/configuration/</url>
- </dependency>
-
- <dependency>
- <artifactId>commons-dbcp</artifactId>
- <groupId>commons-dbcp</groupId>
- <version>1.2.1</version>
- <url>http://jakarta.apache.org/commons/dbcp/</url>
- </dependency>
-
- <dependency>
- <artifactId>commons-pool</artifactId>
- <groupId>commons-pool</groupId>
- <version>1.3</version>
- <url>http://jakarta.apache.org/commons/pool/</url>
- </dependency>
-
- <dependency>
- <artifactId>jcs</artifactId>
- <groupId>jcs</groupId>
- <version>20030822.182132</version>
- <!-- version>1.2.7.0</version -->
- <url>http://jakarta.apache.org/jcs/</url>
- </dependency>
-
- <!-- dependency>
- <artifactId>concurrent</artifactId>
- <groupId>concurrent</groupId>
- <version>1.0</version>
- </dependency -->
-
- <dependency>
- <artifactId>village</artifactId>
- <groupId>village</groupId>
- <version>2.0</version>
- </dependency>
-
- <dependency>
- <artifactId>maven-torque-plugin</artifactId>
- <groupId>torque</groupId>
- <version>3.3-RC1</version>
- <type>plugin</type>
- </dependency>
-
- <dependency>
- <artifactId>hsqldb</artifactId>
- <groupId>hsqldb</groupId>
- <version>1.8.0.7</version>
- </dependency>
-
- </dependencies>
- <build>
- <sourceDirectory>${basedir}/src/java/</sourceDirectory>
- <unitTestSourceDirectory>${basedir}/src/test/</unitTestSourceDirectory>
- <unitTest>
- <includes>
- <include>**/*Test.*</include>
- <include>**/*TestCase.*</include>
- </includes>
- <excludes>
- <include>**/Abstract*.*</include>
- </excludes>
- <resources>
- <resource>
- <directory>${basedir}/src/test</directory>
- <includes>
- <include>**/*.*</include>
- </includes>
- </resource>
- </resources>
- </unitTest>
- </build>
-
-</project>
-
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<project>
+ <extend>${basedir}/../project.xml</extend>
+ <id>fulcrum-security-torque</id>
+ <name>Fulcrum Security Torque Impl</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>fulcrum</groupId>
+ <artifactId>fulcrum-security-api</artifactId>
+ <version>1.0.8-dev</version>
+ </dependency>
+ <dependency>
+ <groupId>fulcrum</groupId>
+ <artifactId>fulcrum-crypto</artifactId>
+ <version>1.0.5</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.0.4</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>cryptix</groupId>
+ <artifactId>cryptix</artifactId>
+ <version>3.2.0</version>
+ <url>http://www.cryptix.org/</url>
+ </dependency>
+
+<!-- Needed for Torque -->
+ <dependency>
+ <artifactId>torque</artifactId>
+ <groupId>torque</groupId>
+ <version>3.3-RC1</version>
+ <url>http://db.apache.org/torque</url>
+ </dependency>
+
+ <dependency>
+ <artifactId>commons-beanutils</artifactId>
+ <groupId>commons-beanutils</groupId>
+ <version>1.7.0</version>
+ <url>http://jakarta.apache.org/commons/beanutils/</url>
+ </dependency>
+
+ <dependency>
+ <artifactId>commons-configuration</artifactId>
+ <groupId>commons-configuration</groupId>
+ <version>1.2</version>
+ <url>http://jakarta.apache.org/commons/configuration/</url>
+ </dependency>
+
+ <dependency>
+ <artifactId>commons-dbcp</artifactId>
+ <groupId>commons-dbcp</groupId>
+ <version>1.2.1</version>
+ <url>http://jakarta.apache.org/commons/dbcp/</url>
+ </dependency>
+
+ <dependency>
+ <artifactId>commons-pool</artifactId>
+ <groupId>commons-pool</groupId>
+ <version>1.3</version>
+ <url>http://jakarta.apache.org/commons/pool/</url>
+ </dependency>
+
+ <dependency>
+ <artifactId>jcs</artifactId>
+ <groupId>jcs</groupId>
+ <version>20030822.182132</version>
+ <!-- version>1.2.7.0</version -->
+ <url>http://jakarta.apache.org/jcs/</url>
+ </dependency>
+
+ <!-- dependency>
+ <artifactId>concurrent</artifactId>
+ <groupId>concurrent</groupId>
+ <version>1.0</version>
+ </dependency -->
+
+ <dependency>
+ <artifactId>village</artifactId>
+ <groupId>village</groupId>
+ <version>2.0</version>
+ </dependency>
+
+ <dependency>
+ <artifactId>maven-torque-plugin</artifactId>
+ <groupId>torque</groupId>
+ <version>3.3-RC1</version>
+ <type>plugin</type>
+ </dependency>
+
+ <dependency>
+ <artifactId>hsqldb</artifactId>
+ <groupId>hsqldb</groupId>
+ <version>1.8.0.7</version>
+ </dependency>
+
+ </dependencies>
+ <build>
+ <sourceDirectory>${basedir}/src/java/</sourceDirectory>
+ <unitTestSourceDirectory>${basedir}/src/test/</unitTestSourceDirectory>
+ <unitTest>
+ <includes>
+ <include>**/*Test.*</include>
+ <include>**/*TestCase.*</include>
+ </includes>
+ <excludes>
+ <include>**/Abstract*.*</include>
+ </excludes>
+ <resources>
+ <resource>
+ <directory>${basedir}/src/test</directory>
+ <includes>
+ <include>**/*.*</include>
+ </includes>
+ </resource>
+ </resources>
+ </unitTest>
+ </build>
+
+</project>
+
Modified: jakarta/turbine/fulcrum/trunk/security/torque/schema/fulcrum-basic-schema.xml
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/torque/schema/fulcrum-basic-schema.xml?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/torque/schema/fulcrum-basic-schema.xml (original)
+++ jakarta/turbine/fulcrum/trunk/security/torque/schema/fulcrum-basic-schema.xml Fri May 4 23:58:06 2007
@@ -1,76 +1,79 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
- Copyright 2001-2005 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.
--->
-<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_3.dtd">
-
-<!-- ==================================================================== -->
-<!-- -->
-<!-- F U L C R U M B A S I C S E C U R I T Y S C H E M A -->
-<!-- -->
-<!-- ==================================================================== -->
-<!-- @author: <a href="mailto:tv@apache.org">Thomas Vandahl</a> -->
-<!-- @version $Id: torque-security-schema.xml,v 1.1 2005/09/26 14:10:04 tvan Exp $ -->
-<!-- ==================================================================== -->
-
-<database name="@DATABASE_DEFAULT@">
-
- <table name="FULCRUM_BASIC_GROUP" javaName="TorqueBasicGroup" idMethod="idbroker"
- baseClass="org.apache.fulcrum.security.torque.basic.TorqueAbstractBasicGroup">
- <column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
- <column name="GROUP_NAME" required="true" type="VARCHAR" size="64" javaName="EntityName"/>
-
- <unique>
- <unique-column name="GROUP_NAME"/>
- </unique>
-
- </table>
-
- <table name="FULCRUM_BASIC_USER" javaName="TorqueBasicUser" idMethod="idbroker"
- baseClass="org.apache.fulcrum.security.torque.basic.TorqueAbstractBasicUser">
- <column name="USER_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
- <column name="LOGIN_NAME" required="true" size="64" type="VARCHAR" javaName="EntityName"/>
- <column name="PASSWORD_VALUE" required="true" size="16" type="VARCHAR" javaName="Password"/>
-<!--
- <column name="FIRST_NAME" required="true" size="64" type="VARCHAR"/>
- <column name="LAST_NAME" required="true" size="64" type="VARCHAR"/>
- <column name="EMAIL" size="64" type="VARCHAR"/>
- <column name="CONFIRM_VALUE" size="16" type="VARCHAR" javaName="Confirmed"/>
- <column name="MODIFIED" type="TIMESTAMP"/>
- <column name="CREATED" type="TIMESTAMP" javaName="CreateDate"/>
- <column name="LAST_LOGIN" type="TIMESTAMP"/>
- <column name="OBJECTDATA" type="VARBINARY"/>
--->
- <unique>
- <unique-column name="LOGIN_NAME"/>
- </unique>
-
- </table>
-
- <!-- Basic Security Model -->
- <table name="FULCRUM_BASIC_USER_GROUP" javaName="TorqueBasicUserGroup">
- <column name="USER_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
- <column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
-
- <foreign-key foreignTable="FULCRUM_BASIC_USER">
- <reference local="USER_ID" foreign="USER_ID"/>
- </foreign-key>
-
- <foreign-key foreignTable="FULCRUM_BASIC_GROUP">
- <reference local="GROUP_ID" foreign="GROUP_ID"/>
- </foreign-key>
- </table>
-
-</database>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_3.dtd">
+
+<!-- ==================================================================== -->
+<!-- -->
+<!-- F U L C R U M B A S I C S E C U R I T Y S C H E M A -->
+<!-- -->
+<!-- ==================================================================== -->
+<!-- @author: <a href="mailto:tv@apache.org">Thomas Vandahl</a> -->
+<!-- @version $Id: torque-security-schema.xml,v 1.1 2005/09/26 14:10:04 tvan Exp $ -->
+<!-- ==================================================================== -->
+
+<database name="@DATABASE_DEFAULT@">
+
+ <table name="FULCRUM_BASIC_GROUP" javaName="TorqueBasicGroup" idMethod="idbroker"
+ baseClass="org.apache.fulcrum.security.torque.basic.TorqueAbstractBasicGroup">
+ <column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
+ <column name="GROUP_NAME" required="true" type="VARCHAR" size="64" javaName="EntityName"/>
+
+ <unique>
+ <unique-column name="GROUP_NAME"/>
+ </unique>
+
+ </table>
+
+ <table name="FULCRUM_BASIC_USER" javaName="TorqueBasicUser" idMethod="idbroker"
+ baseClass="org.apache.fulcrum.security.torque.basic.TorqueAbstractBasicUser">
+ <column name="USER_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
+ <column name="LOGIN_NAME" required="true" size="64" type="VARCHAR" javaName="EntityName"/>
+ <column name="PASSWORD_VALUE" required="true" size="16" type="VARCHAR" javaName="Password"/>
+<!--
+ <column name="FIRST_NAME" required="true" size="64" type="VARCHAR"/>
+ <column name="LAST_NAME" required="true" size="64" type="VARCHAR"/>
+ <column name="EMAIL" size="64" type="VARCHAR"/>
+ <column name="CONFIRM_VALUE" size="16" type="VARCHAR" javaName="Confirmed"/>
+ <column name="MODIFIED" type="TIMESTAMP"/>
+ <column name="CREATED" type="TIMESTAMP" javaName="CreateDate"/>
+ <column name="LAST_LOGIN" type="TIMESTAMP"/>
+ <column name="OBJECTDATA" type="VARBINARY"/>
+-->
+ <unique>
+ <unique-column name="LOGIN_NAME"/>
+ </unique>
+
+ </table>
+
+ <!-- Basic Security Model -->
+ <table name="FULCRUM_BASIC_USER_GROUP" javaName="TorqueBasicUserGroup">
+ <column name="USER_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
+ <column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
+
+ <foreign-key foreignTable="FULCRUM_BASIC_USER">
+ <reference local="USER_ID" foreign="USER_ID"/>
+ </foreign-key>
+
+ <foreign-key foreignTable="FULCRUM_BASIC_GROUP">
+ <reference local="GROUP_ID" foreign="GROUP_ID"/>
+ </foreign-key>
+ </table>
+
+</database>
Modified: jakarta/turbine/fulcrum/trunk/security/torque/schema/fulcrum-dynamic-schema.xml
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/torque/schema/fulcrum-dynamic-schema.xml?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/torque/schema/fulcrum-dynamic-schema.xml (original)
+++ jakarta/turbine/fulcrum/trunk/security/torque/schema/fulcrum-dynamic-schema.xml Fri May 4 23:58:06 2007
@@ -1,137 +1,140 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
- Copyright 2001-2005 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.
--->
-<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_3.dtd">
-
-<!-- ==================================================================== -->
-<!-- -->
-<!-- F U L C R U M D Y N A M I C S E C U R I T Y S C H E M A -->
-<!-- -->
-<!-- ==================================================================== -->
-<!-- @author: <a href="mailto:tv@apache.org">Thomas Vandahl</a> -->
-<!-- @version $Id: torque-security-schema.xml,v 1.1 2005/09/26 14:10:04 tvan Exp $ -->
-<!-- ==================================================================== -->
-
-<database name="@DATABASE_DEFAULT@">
-
- <table name="FULCRUM_DYNAMIC_PERMISSION" javaName="TorqueDynamicPermission" idMethod="idbroker"
- baseClass="org.apache.fulcrum.security.torque.dynamic.TorqueAbstractDynamicPermission">
- <column name="PERMISSION_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
- <column name="PERMISSION_NAME" required="true" size="64" type="VARCHAR" javaName="EntityName"/>
-
- <unique>
- <unique-column name="PERMISSION_NAME"/>
- </unique>
-
- </table>
-
- <table name="FULCRUM_DYNAMIC_ROLE" javaName="TorqueDynamicRole" idMethod="idbroker"
- baseClass="org.apache.fulcrum.security.torque.dynamic.TorqueAbstractDynamicRole">
- <column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
- <column name="ROLE_NAME" required="true" size="64" type="VARCHAR" javaName="EntityName"/>
-
- <unique>
- <unique-column name="ROLE_NAME"/>
- </unique>
-
- </table>
-
- <table name="FULCRUM_DYNAMIC_GROUP" javaName="TorqueDynamicGroup" idMethod="idbroker"
- baseClass="org.apache.fulcrum.security.torque.dynamic.TorqueAbstractDynamicGroup">
- <column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
- <column name="GROUP_NAME" required="true" type="VARCHAR" size="64" javaName="EntityName"/>
-
- <unique>
- <unique-column name="GROUP_NAME"/>
- </unique>
-
- </table>
-
- <table name="FULCRUM_DYNAMIC_USER" javaName="TorqueDynamicUser" idMethod="idbroker"
- baseClass="org.apache.fulcrum.security.torque.dynamic.TorqueAbstractDynamicUser">
- <column name="USER_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
- <column name="LOGIN_NAME" required="true" size="64" type="VARCHAR" javaName="EntityName"/>
- <column name="PASSWORD_VALUE" required="true" size="16" type="VARCHAR" javaName="Password"/>
-<!--
- <column name="FIRST_NAME" required="true" size="64" type="VARCHAR"/>
- <column name="LAST_NAME" required="true" size="64" type="VARCHAR"/>
- <column name="EMAIL" size="64" type="VARCHAR"/>
- <column name="CONFIRM_VALUE" size="16" type="VARCHAR" javaName="Confirmed"/>
- <column name="MODIFIED" type="TIMESTAMP"/>
- <column name="CREATED" type="TIMESTAMP" javaName="CreateDate"/>
- <column name="LAST_LOGIN" type="TIMESTAMP"/>
- <column name="OBJECTDATA" type="VARBINARY"/>
--->
- <unique>
- <unique-column name="LOGIN_NAME"/>
- </unique>
-
- </table>
-
- <!-- Dynamic Security Model -->
- <table name="DYNAMIC_ROLE_PERMISSION" javaName="TorqueDynamicRolePermission">
- <column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
- <column name="PERMISSION_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
-
- <foreign-key foreignTable="FULCRUM_DYNAMIC_ROLE">
- <reference local="ROLE_ID" foreign="ROLE_ID"/>
- </foreign-key>
-
- <foreign-key foreignTable="FULCRUM_DYNAMIC_PERMISSION">
- <reference local="PERMISSION_ID" foreign="PERMISSION_ID"/>
- </foreign-key>
- </table>
-
- <table name="DYNAMIC_USER_GROUP" javaName="TorqueDynamicUserGroup">
- <column name="USER_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
- <column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
-
- <foreign-key foreignTable="FULCRUM_DYNAMIC_USER">
- <reference local="USER_ID" foreign="USER_ID"/>
- </foreign-key>
-
- <foreign-key foreignTable="FULCRUM_DYNAMIC_GROUP">
- <reference local="GROUP_ID" foreign="GROUP_ID"/>
- </foreign-key>
- </table>
-
- <table name="DYNAMIC_GROUP_ROLE" javaName="TorqueDynamicGroupRole">
- <column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
- <column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
-
- <foreign-key foreignTable="FULCRUM_DYNAMIC_GROUP">
- <reference local="GROUP_ID" foreign="GROUP_ID"/>
- </foreign-key>
-
- <foreign-key foreignTable="FULCRUM_DYNAMIC_ROLE">
- <reference local="ROLE_ID" foreign="ROLE_ID"/>
- </foreign-key>
- </table>
-
- <table name="DYNAMIC_USER_DELEGATES" javaName="TorqueDynamicUserDelegates">
- <column name="DELEGATOR_USER_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
- <column name="DELEGATEE_USER_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
-
- <foreign-key foreignTable="FULCRUM_DYNAMIC_USER">
- <reference local="DELEGATOR_USER_ID" foreign="USER_ID"/>
- </foreign-key>
-
- <foreign-key foreignTable="FULCRUM_DYNAMIC_USER">
- <reference local="DELEGATEE_USER_ID" foreign="USER_ID"/>
- </foreign-key>
- </table>
-
-</database>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_3.dtd">
+
+<!-- ==================================================================== -->
+<!-- -->
+<!-- F U L C R U M D Y N A M I C S E C U R I T Y S C H E M A -->
+<!-- -->
+<!-- ==================================================================== -->
+<!-- @author: <a href="mailto:tv@apache.org">Thomas Vandahl</a> -->
+<!-- @version $Id: torque-security-schema.xml,v 1.1 2005/09/26 14:10:04 tvan Exp $ -->
+<!-- ==================================================================== -->
+
+<database name="@DATABASE_DEFAULT@">
+
+ <table name="FULCRUM_DYNAMIC_PERMISSION" javaName="TorqueDynamicPermission" idMethod="idbroker"
+ baseClass="org.apache.fulcrum.security.torque.dynamic.TorqueAbstractDynamicPermission">
+ <column name="PERMISSION_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
+ <column name="PERMISSION_NAME" required="true" size="64" type="VARCHAR" javaName="EntityName"/>
+
+ <unique>
+ <unique-column name="PERMISSION_NAME"/>
+ </unique>
+
+ </table>
+
+ <table name="FULCRUM_DYNAMIC_ROLE" javaName="TorqueDynamicRole" idMethod="idbroker"
+ baseClass="org.apache.fulcrum.security.torque.dynamic.TorqueAbstractDynamicRole">
+ <column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
+ <column name="ROLE_NAME" required="true" size="64" type="VARCHAR" javaName="EntityName"/>
+
+ <unique>
+ <unique-column name="ROLE_NAME"/>
+ </unique>
+
+ </table>
+
+ <table name="FULCRUM_DYNAMIC_GROUP" javaName="TorqueDynamicGroup" idMethod="idbroker"
+ baseClass="org.apache.fulcrum.security.torque.dynamic.TorqueAbstractDynamicGroup">
+ <column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
+ <column name="GROUP_NAME" required="true" type="VARCHAR" size="64" javaName="EntityName"/>
+
+ <unique>
+ <unique-column name="GROUP_NAME"/>
+ </unique>
+
+ </table>
+
+ <table name="FULCRUM_DYNAMIC_USER" javaName="TorqueDynamicUser" idMethod="idbroker"
+ baseClass="org.apache.fulcrum.security.torque.dynamic.TorqueAbstractDynamicUser">
+ <column name="USER_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
+ <column name="LOGIN_NAME" required="true" size="64" type="VARCHAR" javaName="EntityName"/>
+ <column name="PASSWORD_VALUE" required="true" size="16" type="VARCHAR" javaName="Password"/>
+<!--
+ <column name="FIRST_NAME" required="true" size="64" type="VARCHAR"/>
+ <column name="LAST_NAME" required="true" size="64" type="VARCHAR"/>
+ <column name="EMAIL" size="64" type="VARCHAR"/>
+ <column name="CONFIRM_VALUE" size="16" type="VARCHAR" javaName="Confirmed"/>
+ <column name="MODIFIED" type="TIMESTAMP"/>
+ <column name="CREATED" type="TIMESTAMP" javaName="CreateDate"/>
+ <column name="LAST_LOGIN" type="TIMESTAMP"/>
+ <column name="OBJECTDATA" type="VARBINARY"/>
+-->
+ <unique>
+ <unique-column name="LOGIN_NAME"/>
+ </unique>
+
+ </table>
+
+ <!-- Dynamic Security Model -->
+ <table name="DYNAMIC_ROLE_PERMISSION" javaName="TorqueDynamicRolePermission">
+ <column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
+ <column name="PERMISSION_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
+
+ <foreign-key foreignTable="FULCRUM_DYNAMIC_ROLE">
+ <reference local="ROLE_ID" foreign="ROLE_ID"/>
+ </foreign-key>
+
+ <foreign-key foreignTable="FULCRUM_DYNAMIC_PERMISSION">
+ <reference local="PERMISSION_ID" foreign="PERMISSION_ID"/>
+ </foreign-key>
+ </table>
+
+ <table name="DYNAMIC_USER_GROUP" javaName="TorqueDynamicUserGroup">
+ <column name="USER_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
+ <column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
+
+ <foreign-key foreignTable="FULCRUM_DYNAMIC_USER">
+ <reference local="USER_ID" foreign="USER_ID"/>
+ </foreign-key>
+
+ <foreign-key foreignTable="FULCRUM_DYNAMIC_GROUP">
+ <reference local="GROUP_ID" foreign="GROUP_ID"/>
+ </foreign-key>
+ </table>
+
+ <table name="DYNAMIC_GROUP_ROLE" javaName="TorqueDynamicGroupRole">
+ <column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
+ <column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
+
+ <foreign-key foreignTable="FULCRUM_DYNAMIC_GROUP">
+ <reference local="GROUP_ID" foreign="GROUP_ID"/>
+ </foreign-key>
+
+ <foreign-key foreignTable="FULCRUM_DYNAMIC_ROLE">
+ <reference local="ROLE_ID" foreign="ROLE_ID"/>
+ </foreign-key>
+ </table>
+
+ <table name="DYNAMIC_USER_DELEGATES" javaName="TorqueDynamicUserDelegates">
+ <column name="DELEGATOR_USER_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
+ <column name="DELEGATEE_USER_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
+
+ <foreign-key foreignTable="FULCRUM_DYNAMIC_USER">
+ <reference local="DELEGATOR_USER_ID" foreign="USER_ID"/>
+ </foreign-key>
+
+ <foreign-key foreignTable="FULCRUM_DYNAMIC_USER">
+ <reference local="DELEGATEE_USER_ID" foreign="USER_ID"/>
+ </foreign-key>
+ </table>
+
+</database>
Modified: jakarta/turbine/fulcrum/trunk/security/torque/schema/fulcrum-turbine-schema.xml
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/torque/schema/fulcrum-turbine-schema.xml?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/torque/schema/fulcrum-turbine-schema.xml (original)
+++ jakarta/turbine/fulcrum/trunk/security/torque/schema/fulcrum-turbine-schema.xml Fri May 4 23:58:06 2007
@@ -1,116 +1,119 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
- Copyright 2001-2005 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.
--->
-<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_3.dtd">
-
-<!-- ==================================================================== -->
-<!-- -->
-<!-- F U L C R U M T U R B I N E S E C U R I T Y S C H E M A -->
-<!-- -->
-<!-- ==================================================================== -->
-<!-- @author: <a href="mailto:tv@apache.org">Thomas Vandahl</a> -->
-<!-- @version $Id: torque-security-schema.xml,v 1.1 2005/09/26 14:10:04 tvan Exp $ -->
-<!-- ==================================================================== -->
-
-<database name="@DATABASE_DEFAULT@">
-
- <table name="FULCRUM_TURBINE_PERMISSION" javaName="TorqueTurbinePermission" idMethod="idbroker"
- baseClass="org.apache.fulcrum.security.torque.turbine.TorqueAbstractTurbinePermission">
- <column name="PERMISSION_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
- <column name="PERMISSION_NAME" required="true" size="64" type="VARCHAR" javaName="EntityName"/>
-
- <unique>
- <unique-column name="PERMISSION_NAME"/>
- </unique>
-
- </table>
-
- <table name="FULCRUM_TURBINE_ROLE" javaName="TorqueTurbineRole" idMethod="idbroker"
- baseClass="org.apache.fulcrum.security.torque.turbine.TorqueAbstractTurbineRole">
- <column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
- <column name="ROLE_NAME" required="true" size="64" type="VARCHAR" javaName="EntityName"/>
-
- <unique>
- <unique-column name="ROLE_NAME"/>
- </unique>
-
- </table>
-
- <table name="FULCRUM_TURBINE_GROUP" javaName="TorqueTurbineGroup" idMethod="idbroker"
- baseClass="org.apache.fulcrum.security.torque.turbine.TorqueAbstractTurbineGroup">
- <column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
- <column name="GROUP_NAME" required="true" type="VARCHAR" size="64" javaName="EntityName"/>
-
- <unique>
- <unique-column name="GROUP_NAME"/>
- </unique>
-
- </table>
-
- <table name="FULCRUM_TURBINE_USER" javaName="TorqueTurbineUser" idMethod="idbroker"
- baseClass="org.apache.fulcrum.security.torque.turbine.TorqueAbstractTurbineUser">
- <column name="USER_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
- <column name="LOGIN_NAME" required="true" size="64" type="VARCHAR" javaName="EntityName"/>
- <column name="PASSWORD_VALUE" required="true" size="16" type="VARCHAR" javaName="Password"/>
-<!--
- <column name="FIRST_NAME" required="true" size="64" type="VARCHAR"/>
- <column name="LAST_NAME" required="true" size="64" type="VARCHAR"/>
- <column name="EMAIL" size="64" type="VARCHAR"/>
- <column name="CONFIRM_VALUE" size="16" type="VARCHAR" javaName="Confirmed"/>
- <column name="MODIFIED" type="TIMESTAMP"/>
- <column name="CREATED" type="TIMESTAMP" javaName="CreateDate"/>
- <column name="LAST_LOGIN" type="TIMESTAMP"/>
- <column name="OBJECTDATA" type="VARBINARY"/>
--->
- <unique>
- <unique-column name="LOGIN_NAME"/>
- </unique>
-
- </table>
-
- <!-- Turbine Security Model -->
- <table name="TURBINE_ROLE_PERMISSION" javaName="TorqueTurbineRolePermission">
- <column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
- <column name="PERMISSION_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
-
- <foreign-key foreignTable="FULCRUM_TURBINE_ROLE">
- <reference local="ROLE_ID" foreign="ROLE_ID"/>
- </foreign-key>
-
- <foreign-key foreignTable="FULCRUM_TURBINE_PERMISSION">
- <reference local="PERMISSION_ID" foreign="PERMISSION_ID"/>
- </foreign-key>
- </table>
-
- <table name="TURBINE_USER_GROUP_ROLE" javaName="TorqueTurbineUserGroupRole">
- <column name="USER_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
- <column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
- <column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
-
- <foreign-key foreignTable="FULCRUM_TURBINE_USER">
- <reference local="USER_ID" foreign="USER_ID"/>
- </foreign-key>
-
- <foreign-key foreignTable="FULCRUM_TURBINE_GROUP">
- <reference local="GROUP_ID" foreign="GROUP_ID"/>
- </foreign-key>
-
- <foreign-key foreignTable="FULCRUM_TURBINE_ROLE">
- <reference local="ROLE_ID" foreign="ROLE_ID"/>
- </foreign-key>
- </table>
-
-</database>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_3.dtd">
+
+<!-- ==================================================================== -->
+<!-- -->
+<!-- F U L C R U M T U R B I N E S E C U R I T Y S C H E M A -->
+<!-- -->
+<!-- ==================================================================== -->
+<!-- @author: <a href="mailto:tv@apache.org">Thomas Vandahl</a> -->
+<!-- @version $Id: torque-security-schema.xml,v 1.1 2005/09/26 14:10:04 tvan Exp $ -->
+<!-- ==================================================================== -->
+
+<database name="@DATABASE_DEFAULT@">
+
+ <table name="FULCRUM_TURBINE_PERMISSION" javaName="TorqueTurbinePermission" idMethod="idbroker"
+ baseClass="org.apache.fulcrum.security.torque.turbine.TorqueAbstractTurbinePermission">
+ <column name="PERMISSION_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
+ <column name="PERMISSION_NAME" required="true" size="64" type="VARCHAR" javaName="EntityName"/>
+
+ <unique>
+ <unique-column name="PERMISSION_NAME"/>
+ </unique>
+
+ </table>
+
+ <table name="FULCRUM_TURBINE_ROLE" javaName="TorqueTurbineRole" idMethod="idbroker"
+ baseClass="org.apache.fulcrum.security.torque.turbine.TorqueAbstractTurbineRole">
+ <column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
+ <column name="ROLE_NAME" required="true" size="64" type="VARCHAR" javaName="EntityName"/>
+
+ <unique>
+ <unique-column name="ROLE_NAME"/>
+ </unique>
+
+ </table>
+
+ <table name="FULCRUM_TURBINE_GROUP" javaName="TorqueTurbineGroup" idMethod="idbroker"
+ baseClass="org.apache.fulcrum.security.torque.turbine.TorqueAbstractTurbineGroup">
+ <column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
+ <column name="GROUP_NAME" required="true" type="VARCHAR" size="64" javaName="EntityName"/>
+
+ <unique>
+ <unique-column name="GROUP_NAME"/>
+ </unique>
+
+ </table>
+
+ <table name="FULCRUM_TURBINE_USER" javaName="TorqueTurbineUser" idMethod="idbroker"
+ baseClass="org.apache.fulcrum.security.torque.turbine.TorqueAbstractTurbineUser">
+ <column name="USER_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
+ <column name="LOGIN_NAME" required="true" size="64" type="VARCHAR" javaName="EntityName"/>
+ <column name="PASSWORD_VALUE" required="true" size="16" type="VARCHAR" javaName="Password"/>
+<!--
+ <column name="FIRST_NAME" required="true" size="64" type="VARCHAR"/>
+ <column name="LAST_NAME" required="true" size="64" type="VARCHAR"/>
+ <column name="EMAIL" size="64" type="VARCHAR"/>
+ <column name="CONFIRM_VALUE" size="16" type="VARCHAR" javaName="Confirmed"/>
+ <column name="MODIFIED" type="TIMESTAMP"/>
+ <column name="CREATED" type="TIMESTAMP" javaName="CreateDate"/>
+ <column name="LAST_LOGIN" type="TIMESTAMP"/>
+ <column name="OBJECTDATA" type="VARBINARY"/>
+-->
+ <unique>
+ <unique-column name="LOGIN_NAME"/>
+ </unique>
+
+ </table>
+
+ <!-- Turbine Security Model -->
+ <table name="TURBINE_ROLE_PERMISSION" javaName="TorqueTurbineRolePermission">
+ <column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
+ <column name="PERMISSION_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
+
+ <foreign-key foreignTable="FULCRUM_TURBINE_ROLE">
+ <reference local="ROLE_ID" foreign="ROLE_ID"/>
+ </foreign-key>
+
+ <foreign-key foreignTable="FULCRUM_TURBINE_PERMISSION">
+ <reference local="PERMISSION_ID" foreign="PERMISSION_ID"/>
+ </foreign-key>
+ </table>
+
+ <table name="TURBINE_USER_GROUP_ROLE" javaName="TorqueTurbineUserGroupRole">
+ <column name="USER_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
+ <column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
+ <column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
+
+ <foreign-key foreignTable="FULCRUM_TURBINE_USER">
+ <reference local="USER_ID" foreign="USER_ID"/>
+ </foreign-key>
+
+ <foreign-key foreignTable="FULCRUM_TURBINE_GROUP">
+ <reference local="GROUP_ID" foreign="GROUP_ID"/>
+ </foreign-key>
+
+ <foreign-key foreignTable="FULCRUM_TURBINE_ROLE">
+ <reference local="ROLE_ID" foreign="ROLE_ID"/>
+ </foreign-key>
+ </table>
+
+</database>
Modified: jakarta/turbine/fulcrum/trunk/security/torque/schema/id-table-schema.xml
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/torque/schema/id-table-schema.xml?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/torque/schema/id-table-schema.xml (original)
+++ jakarta/turbine/fulcrum/trunk/security/torque/schema/id-table-schema.xml Fri May 4 23:58:06 2007
@@ -1,43 +1,46 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
- Copyright 2001-2005 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.
--->
-<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_2.dtd">
-
-<!-- ==================================================================== -->
-<!-- -->
-<!-- I D B R O K E R S C H E M A -->
-<!-- -->
-<!-- ==================================================================== -->
-<!-- This is the XML schema use by Torque to generate the SQL for -->
-<!-- ID_TABLE table used by the id broker mechanism in Torque. -->
-<!-- ==================================================================== -->
-<!-- @author: <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a> -->
-<!-- @version $Id: id-table-schema.xml,v 1.2 2005/09/23 12:19:52 tvan Exp $ -->
-<!-- ==================================================================== -->
-
-<database name="@DATABASE_DEFAULT@">
- <table name="ID_TABLE" idMethod="idbroker">
- <column name="ID_TABLE_ID" required="true" primaryKey="true" type="INTEGER"/>
- <column name="TABLE_NAME" required="true" size="255" type="VARCHAR"/>
- <column name="NEXT_ID" type="INTEGER"/>
- <column name="QUANTITY" type="INTEGER"/>
-
- <unique>
- <unique-column name="TABLE_NAME"/>
- </unique>
-
- </table>
-</database>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_2.dtd">
+
+<!-- ==================================================================== -->
+<!-- -->
+<!-- I D B R O K E R S C H E M A -->
+<!-- -->
+<!-- ==================================================================== -->
+<!-- This is the XML schema use by Torque to generate the SQL for -->
+<!-- ID_TABLE table used by the id broker mechanism in Torque. -->
+<!-- ==================================================================== -->
+<!-- @author: <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a> -->
+<!-- @version $Id: id-table-schema.xml,v 1.2 2005/09/23 12:19:52 tvan Exp $ -->
+<!-- ==================================================================== -->
+
+<database name="@DATABASE_DEFAULT@">
+ <table name="ID_TABLE" idMethod="idbroker">
+ <column name="ID_TABLE_ID" required="true" primaryKey="true" type="INTEGER"/>
+ <column name="TABLE_NAME" required="true" size="255" type="VARCHAR"/>
+ <column name="NEXT_ID" type="INTEGER"/>
+ <column name="QUANTITY" type="INTEGER"/>
+
+ <unique>
+ <unique-column name="TABLE_NAME"/>
+ </unique>
+
+ </table>
+</database>
Modified: jakarta/turbine/fulcrum/trunk/security/torque/src/java/org/apache/fulcrum/security/torque/TorqueAbstractGroupManager.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/torque/src/java/org/apache/fulcrum/security/torque/TorqueAbstractGroupManager.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/torque/src/java/org/apache/fulcrum/security/torque/TorqueAbstractGroupManager.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/torque/src/java/org/apache/fulcrum/security/torque/TorqueAbstractGroupManager.java Fri May 4 23:58:06 2007
@@ -1,354 +1,357 @@
-package org.apache.fulcrum.security.torque;
-/*
- * Copyright 2001-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.
- */
-import java.sql.Connection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.fulcrum.security.entity.Group;
-import org.apache.fulcrum.security.spi.AbstractGroupManager;
-import org.apache.fulcrum.security.util.DataBackendException;
-import org.apache.fulcrum.security.util.GroupSet;
-import org.apache.fulcrum.security.util.UnknownEntityException;
-import org.apache.torque.NoRowsException;
-import org.apache.torque.TooManyRowsException;
-import org.apache.torque.TorqueException;
-import org.apache.torque.util.Transaction;
-
-/**
- * This implementation persists to a database via Torque.
- *
- * @author <a href="mailto:tv@apache.org">Thomas Vandahl</a>
- * @version $Id:$
- */
-public abstract class TorqueAbstractGroupManager extends AbstractGroupManager
-{
- /**
- * Get all specialized Groups
- *
- * @param con a database connection
- *
- * @return a List of Group instances
- *
- * @throws TorqueException if any database error occurs
- */
- protected abstract List doSelectAllGroups(Connection con)
- throws TorqueException;
-
- /**
- * Get a specialized Group by name
- *
- * @param name the name of the group
- * @param con a database connection
- *
- * @return a Group instance
- *
- * @throws NoRowsException if no such group exists
- * @throws TooManyRowsException if multiple groups with the given name exist
- * @throws TorqueException if any other database error occurs
- */
- protected abstract Group doSelectByName(String name, Connection con)
- throws NoRowsException, TooManyRowsException, TorqueException;
-
- /**
- * Get a specialized Group by id
- *
- * @param id the id of the group
- * @param con a database connection
- *
- * @return a Group instance
- *
- * @throws NoRowsException if no such group exists
- * @throws TooManyRowsException if multiple groups with the given id exist
- * @throws TorqueException if any other database error occurs
- */
- protected abstract Group doSelectById(Integer id, Connection con)
- throws NoRowsException, TooManyRowsException, TorqueException;
-
- /**
- * Creates a new group with specified attributes.
- *
- * @param group the object describing the group to be created.
- * @return a new Group object that has id set up properly.
- * @throws DataBackendException if there was an error accessing the data
- * backend.
- * @throws EntityExistsException if the group already exists.
- */
- protected synchronized Group persistNewGroup(Group group) throws DataBackendException
- {
- try
- {
- ((TorqueAbstractSecurityEntity)group).save();
- }
- catch (Exception e)
- {
- throw new DataBackendException("Adding Group '" + group.getName() + "' failed", e);
- }
-
- return group;
- }
-
- /**
- * Renames an existing Group.
- *
- * @param group The object describing the group to be renamed.
- * @param name the new name for the group.
- * @throws DataBackendException if there was an error accessing the data
- * backend.
- * @throws UnknownEntityException if the group does not exist.
- */
- public synchronized void renameGroup(Group group, String name) throws DataBackendException, UnknownEntityException
- {
- if (checkExists(group))
- {
- group.setName(name);
-
- try
- {
- TorqueAbstractSecurityEntity g = (TorqueAbstractSecurityEntity)group;
- g.setNew(false);
- g.save();
- }
- catch (Exception e)
- {
- throw new DataBackendException("Renaming Group '" + group.getName() + "' failed", e);
- }
- }
- else
- {
- throw new UnknownEntityException("Unknown group '" + group.getName() + "'");
- }
- }
-
- /**
- * Removes a Group from the system.
- *
- * @param group The object describing the group to be removed.
- * @throws DataBackendException if there was an error accessing the data
- * backend.
- * @throws UnknownEntityException if the group does not exist.
- */
- public synchronized void removeGroup(Group group) throws DataBackendException, UnknownEntityException
- {
- try
- {
- ((TorqueAbstractSecurityEntity)group).delete();
- }
- catch (TorqueException e)
- {
- throw new DataBackendException("Removing Group '" + group.getName() + "' failed", e);
- }
- }
-
- /**
- * Retrieve a Group object with specified name.
- *
- * @param name the name of the Group.
- * @return an object representing the Group with specified name.
- * @throws DataBackendException if there was an error accessing the
- * data backend.
- * @throws UnknownEntityException if the group does not exist.
- */
- public Group getGroupByName(String name) throws DataBackendException, UnknownEntityException
- {
- Group group = null;
- Connection con = null;
-
- try
- {
- con = Transaction.begin(((TorqueAbstractSecurityEntity)getGroupInstance()).getDatabaseName());
-
- group = doSelectByName(name, con);
-
- // Add dependent objects if they exist
- ((TorqueAbstractSecurityEntity)group).retrieveAttachedObjects(con);
-
- Transaction.commit(con);
- con = null;
- }
- catch (NoRowsException e)
- {
- throw new UnknownEntityException("Could not find group" + name);
- }
- catch (TooManyRowsException e)
- {
- throw new DataBackendException("Multiple Groups with same name '" + name + "'");
- }
- catch (TorqueException e)
- {
- throw new DataBackendException("Error retrieving group information", e);
- }
- finally
- {
- if (con != null)
- {
- Transaction.safeRollback(con);
- }
- }
-
- return group;
- }
-
- /**
- * Retrieves all groups defined in the system.
- *
- * @return the names of all groups defined in the system.
- * @throws DataBackendException if there was an error accessing the
- * data backend.
- */
- public GroupSet getAllGroups() throws DataBackendException
- {
- GroupSet groupSet = new GroupSet();
- Connection con = null;
-
- try
- {
- con = Transaction.begin(((TorqueAbstractSecurityEntity)getGroupInstance()).getDatabaseName());
-
- List groups = doSelectAllGroups(con);
-
- for (Iterator i = groups.iterator(); i.hasNext();)
- {
- Group group = (Group)i.next();
-
- // Add dependent objects if they exist
- ((TorqueAbstractSecurityEntity)group).retrieveAttachedObjects(con);
-
- groupSet.add(group);
- }
-
- Transaction.commit(con);
- con = null;
- }
- catch (TorqueException e)
- {
- throw new DataBackendException("Error retrieving group information", e);
- }
- finally
- {
- if (con != null)
- {
- Transaction.safeRollback(con);
- }
- }
-
- return groupSet;
- }
-
- /**
- * Determines if the <code>Group</code> exists in the security system.
- *
- * @param groupName a <code>Group</code> value
- * @return true if the group name exists in the system, false otherwise
- * @throws DataBackendException when more than one Group with
- * the same name exists.
- */
- public boolean checkExists(String groupName) throws DataBackendException
- {
- boolean exists = false;
-
- Connection con = null;
-
- try
- {
- con = Transaction.begin(((TorqueAbstractSecurityEntity)getGroupInstance()).getDatabaseName());
-
- doSelectByName(groupName, con);
-
- Transaction.commit(con);
- con = null;
-
- exists = true;
- }
- catch (NoRowsException e)
- {
- exists = false;
- }
- catch (TooManyRowsException e)
- {
- throw new DataBackendException(
- "Multiple groups with same name '" + groupName + "'");
- }
- catch (TorqueException e)
- {
- throw new DataBackendException("Error retrieving group information", e);
- }
- finally
- {
- if (con != null)
- {
- Transaction.safeRollback(con);
- }
- }
-
- return exists;
- }
-
- /**
- * Retrieve a Group object with specified id.
- *
- * @param id
- * the id of the Group.
- * @return an object representing the Group with specified id.
- * @throws DataBackendException
- * if there was an error accessing the data backend.
- * @throws UnknownEntityException
- * if the group does not exist.
- */
- public Group getGroupById(Object id) throws DataBackendException, UnknownEntityException
- {
- Group group;
-
- if (id != null && id instanceof Integer)
- {
- Connection con = null;
-
- try
- {
- con = Transaction.begin(((TorqueAbstractSecurityEntity)getGroupInstance()).getDatabaseName());
-
- group = doSelectById((Integer)id, con);
-
- // Add dependent objects if they exist
- ((TorqueAbstractSecurityEntity)group).retrieveAttachedObjects(con);
-
- Transaction.commit(con);
- con = null;
- }
- catch (NoRowsException e)
- {
- throw new UnknownEntityException("Group with id '" + id + "' does not exist.", e);
- }
- catch (TorqueException e)
- {
- throw new DataBackendException("Error retrieving group information", e);
- }
- finally
- {
- if (con != null)
- {
- Transaction.safeRollback(con);
- }
- }
- }
- else
- {
- throw new UnknownEntityException("Invalid group id '" + id + "'");
- }
-
- return group;
- }
-}
\ No newline at end of file
+package org.apache.fulcrum.security.torque;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+import java.sql.Connection;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.fulcrum.security.entity.Group;
+import org.apache.fulcrum.security.spi.AbstractGroupManager;
+import org.apache.fulcrum.security.util.DataBackendException;
+import org.apache.fulcrum.security.util.GroupSet;
+import org.apache.fulcrum.security.util.UnknownEntityException;
+import org.apache.torque.NoRowsException;
+import org.apache.torque.TooManyRowsException;
+import org.apache.torque.TorqueException;
+import org.apache.torque.util.Transaction;
+
+/**
+ * This implementation persists to a database via Torque.
+ *
+ * @author <a href="mailto:tv@apache.org">Thomas Vandahl</a>
+ * @version $Id:$
+ */
+public abstract class TorqueAbstractGroupManager extends AbstractGroupManager
+{
+ /**
+ * Get all specialized Groups
+ *
+ * @param con a database connection
+ *
+ * @return a List of Group instances
+ *
+ * @throws TorqueException if any database error occurs
+ */
+ protected abstract List doSelectAllGroups(Connection con)
+ throws TorqueException;
+
+ /**
+ * Get a specialized Group by name
+ *
+ * @param name the name of the group
+ * @param con a database connection
+ *
+ * @return a Group instance
+ *
+ * @throws NoRowsException if no such group exists
+ * @throws TooManyRowsException if multiple groups with the given name exist
+ * @throws TorqueException if any other database error occurs
+ */
+ protected abstract Group doSelectByName(String name, Connection con)
+ throws NoRowsException, TooManyRowsException, TorqueException;
+
+ /**
+ * Get a specialized Group by id
+ *
+ * @param id the id of the group
+ * @param con a database connection
+ *
+ * @return a Group instance
+ *
+ * @throws NoRowsException if no such group exists
+ * @throws TooManyRowsException if multiple groups with the given id exist
+ * @throws TorqueException if any other database error occurs
+ */
+ protected abstract Group doSelectById(Integer id, Connection con)
+ throws NoRowsException, TooManyRowsException, TorqueException;
+
+ /**
+ * Creates a new group with specified attributes.
+ *
+ * @param group the object describing the group to be created.
+ * @return a new Group object that has id set up properly.
+ * @throws DataBackendException if there was an error accessing the data
+ * backend.
+ * @throws EntityExistsException if the group already exists.
+ */
+ protected synchronized Group persistNewGroup(Group group) throws DataBackendException
+ {
+ try
+ {
+ ((TorqueAbstractSecurityEntity)group).save();
+ }
+ catch (Exception e)
+ {
+ throw new DataBackendException("Adding Group '" + group.getName() + "' failed", e);
+ }
+
+ return group;
+ }
+
+ /**
+ * Renames an existing Group.
+ *
+ * @param group The object describing the group to be renamed.
+ * @param name the new name for the group.
+ * @throws DataBackendException if there was an error accessing the data
+ * backend.
+ * @throws UnknownEntityException if the group does not exist.
+ */
+ public synchronized void renameGroup(Group group, String name) throws DataBackendException, UnknownEntityException
+ {
+ if (checkExists(group))
+ {
+ group.setName(name);
+
+ try
+ {
+ TorqueAbstractSecurityEntity g = (TorqueAbstractSecurityEntity)group;
+ g.setNew(false);
+ g.save();
+ }
+ catch (Exception e)
+ {
+ throw new DataBackendException("Renaming Group '" + group.getName() + "' failed", e);
+ }
+ }
+ else
+ {
+ throw new UnknownEntityException("Unknown group '" + group.getName() + "'");
+ }
+ }
+
+ /**
+ * Removes a Group from the system.
+ *
+ * @param group The object describing the group to be removed.
+ * @throws DataBackendException if there was an error accessing the data
+ * backend.
+ * @throws UnknownEntityException if the group does not exist.
+ */
+ public synchronized void removeGroup(Group group) throws DataBackendException, UnknownEntityException
+ {
+ try
+ {
+ ((TorqueAbstractSecurityEntity)group).delete();
+ }
+ catch (TorqueException e)
+ {
+ throw new DataBackendException("Removing Group '" + group.getName() + "' failed", e);
+ }
+ }
+
+ /**
+ * Retrieve a Group object with specified name.
+ *
+ * @param name the name of the Group.
+ * @return an object representing the Group with specified name.
+ * @throws DataBackendException if there was an error accessing the
+ * data backend.
+ * @throws UnknownEntityException if the group does not exist.
+ */
+ public Group getGroupByName(String name) throws DataBackendException, UnknownEntityException
+ {
+ Group group = null;
+ Connection con = null;
+
+ try
+ {
+ con = Transaction.begin(((TorqueAbstractSecurityEntity)getGroupInstance()).getDatabaseName());
+
+ group = doSelectByName(name, con);
+
+ // Add dependent objects if they exist
+ ((TorqueAbstractSecurityEntity)group).retrieveAttachedObjects(con);
+
+ Transaction.commit(con);
+ con = null;
+ }
+ catch (NoRowsException e)
+ {
+ throw new UnknownEntityException("Could not find group" + name);
+ }
+ catch (TooManyRowsException e)
+ {
+ throw new DataBackendException("Multiple Groups with same name '" + name + "'");
+ }
+ catch (TorqueException e)
+ {
+ throw new DataBackendException("Error retrieving group information", e);
+ }
+ finally
+ {
+ if (con != null)
+ {
+ Transaction.safeRollback(con);
+ }
+ }
+
+ return group;
+ }
+
+ /**
+ * Retrieves all groups defined in the system.
+ *
+ * @return the names of all groups defined in the system.
+ * @throws DataBackendException if there was an error accessing the
+ * data backend.
+ */
+ public GroupSet getAllGroups() throws DataBackendException
+ {
+ GroupSet groupSet = new GroupSet();
+ Connection con = null;
+
+ try
+ {
+ con = Transaction.begin(((TorqueAbstractSecurityEntity)getGroupInstance()).getDatabaseName());
+
+ List groups = doSelectAllGroups(con);
+
+ for (Iterator i = groups.iterator(); i.hasNext();)
+ {
+ Group group = (Group)i.next();
+
+ // Add dependent objects if they exist
+ ((TorqueAbstractSecurityEntity)group).retrieveAttachedObjects(con);
+
+ groupSet.add(group);
+ }
+
+ Transaction.commit(con);
+ con = null;
+ }
+ catch (TorqueException e)
+ {
+ throw new DataBackendException("Error retrieving group information", e);
+ }
+ finally
+ {
+ if (con != null)
+ {
+ Transaction.safeRollback(con);
+ }
+ }
+
+ return groupSet;
+ }
+
+ /**
+ * Determines if the <code>Group</code> exists in the security system.
+ *
+ * @param groupName a <code>Group</code> value
+ * @return true if the group name exists in the system, false otherwise
+ * @throws DataBackendException when more than one Group with
+ * the same name exists.
+ */
+ public boolean checkExists(String groupName) throws DataBackendException
+ {
+ boolean exists = false;
+
+ Connection con = null;
+
+ try
+ {
+ con = Transaction.begin(((TorqueAbstractSecurityEntity)getGroupInstance()).getDatabaseName());
+
+ doSelectByName(groupName, con);
+
+ Transaction.commit(con);
+ con = null;
+
+ exists = true;
+ }
+ catch (NoRowsException e)
+ {
+ exists = false;
+ }
+ catch (TooManyRowsException e)
+ {
+ throw new DataBackendException(
+ "Multiple groups with same name '" + groupName + "'");
+ }
+ catch (TorqueException e)
+ {
+ throw new DataBackendException("Error retrieving group information", e);
+ }
+ finally
+ {
+ if (con != null)
+ {
+ Transaction.safeRollback(con);
+ }
+ }
+
+ return exists;
+ }
+
+ /**
+ * Retrieve a Group object with specified id.
+ *
+ * @param id
+ * the id of the Group.
+ * @return an object representing the Group with specified id.
+ * @throws DataBackendException
+ * if there was an error accessing the data backend.
+ * @throws UnknownEntityException
+ * if the group does not exist.
+ */
+ public Group getGroupById(Object id) throws DataBackendException, UnknownEntityException
+ {
+ Group group;
+
+ if (id != null && id instanceof Integer)
+ {
+ Connection con = null;
+
+ try
+ {
+ con = Transaction.begin(((TorqueAbstractSecurityEntity)getGroupInstance()).getDatabaseName());
+
+ group = doSelectById((Integer)id, con);
+
+ // Add dependent objects if they exist
+ ((TorqueAbstractSecurityEntity)group).retrieveAttachedObjects(con);
+
+ Transaction.commit(con);
+ con = null;
+ }
+ catch (NoRowsException e)
+ {
+ throw new UnknownEntityException("Group with id '" + id + "' does not exist.", e);
+ }
+ catch (TorqueException e)
+ {
+ throw new DataBackendException("Error retrieving group information", e);
+ }
+ finally
+ {
+ if (con != null)
+ {
+ Transaction.safeRollback(con);
+ }
+ }
+ }
+ else
+ {
+ throw new UnknownEntityException("Invalid group id '" + id + "'");
+ }
+
+ return group;
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org