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 [25/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/hibernate/src/java/org/apache/fulcrum/security/hibernate/turbine/HibernateModelManagerImpl.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/java/org/apache/fulcrum/security/hibernate/turbine/HibernateModelManagerImpl.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/java/org/apache/fulcrum/security/hibernate/turbine/HibernateModelManagerImpl.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/java/org/apache/fulcrum/security/hibernate/turbine/HibernateModelManagerImpl.java Fri May 4 23:58:06 2007
@@ -1,18 +1,21 @@
package org.apache.fulcrum.security.hibernate.turbine;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.util.Iterator;
@@ -32,7 +35,7 @@
import org.apache.fulcrum.security.util.UnknownEntityException;
/**
* This implementation persists to a database via Hibernate.
- *
+ *
* @author <a href="mailto:epugh@upstate.com">Eric Pugh</a>
* @version $Id$
*/
@@ -41,7 +44,7 @@
private PersistenceHelper persistenceHelper;
/**
* Grants a Role a Permission
- *
+ *
* @param role the Role.
* @param permission the Permission.
* @throws DataBackendException if there was an error accessing the data backend.
@@ -56,13 +59,13 @@
{
roleExists = getRoleManager().checkExists(role);
permissionExists = getPermissionManager().checkExists(permission);
-
+
if (roleExists && permissionExists)
{
((TurbineRole) role).addPermission(permission);
((TurbinePermission) permission).addRole(role);
getPersistenceHelper().updateEntity(permission);
- getPersistenceHelper().updateEntity(role);
+ getPersistenceHelper().updateEntity(role);
return;
}
}
@@ -81,7 +84,7 @@
}
/**
* Revokes a Permission from a Role.
- *
+ *
* @param role the Role.
* @param permission the Permission.
* @throws DataBackendException if there was an error accessing the data backend.
@@ -120,7 +123,7 @@
{
throw new UnknownEntityException("Unknown permission '" + permission.getName() + "'");
}
- }
+ }
/**
* @return Returns the persistenceHelper.
@@ -133,7 +136,7 @@
}
return persistenceHelper;
}
-
+
public void grant(User user, Group group, Role role) throws DataBackendException, UnknownEntityException {
boolean roleExists = false;
boolean userExists = false;
@@ -215,5 +218,5 @@
throw new UnknownEntityException("Unknown user '" + user.getName() + "'");
}
- }
-}
\ No newline at end of file
+ }
+}
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/BasicHibernate.hbm.xml
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/BasicHibernate.hbm.xml?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/BasicHibernate.hbm.xml (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/BasicHibernate.hbm.xml Fri May 4 23:58:06 2007
@@ -1,34 +1,52 @@
<?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.
+-->
<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
- "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
+ "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping auto-import="true">
-
+
<class name="org.apache.fulcrum.security.model.basic.entity.impl.BasicGroupImpl" table="GROUPS" >
<id name="id" type="long" column="GROUP_ID" unsaved-value="0">
<generator class="native"/>
</id>
- <property name="name" column="NAME" type="string"/>
-
+ <property name="name" column="NAME" type="string"/>
+
<set name="usersAsSet" lazy="true" table="HIBUSER_GROUP" cascade="none" >
<key column="GROUP_ID"/>
- <many-to-many class="org.apache.fulcrum.security.model.basic.entity.impl.BasicUserImpl" column="USER_ID"/>
- </set>
- </class>
+ <many-to-many class="org.apache.fulcrum.security.model.basic.entity.impl.BasicUserImpl" column="USER_ID"/>
+ </set>
+ </class>
<class name="org.apache.fulcrum.security.model.basic.entity.impl.BasicUserImpl" table="HIBUSER" >
<id name="id" type="long" column="HIBUSER_ID" unsaved-value="0">
<generator class="native"/>
</id>
- <property name="name" column="USERNAME" type="string"/>
- <property name="password" column="PASSWORD" type="string"/>
-
+ <property name="name" column="USERNAME" type="string"/>
+ <property name="password" column="PASSWORD" type="string"/>
+
<set name="groupsAsSet" lazy="true" table="HIBUSER_GROUP" inverse="true" cascade="none">
<key column="USER_ID"/>
- <many-to-many class="org.apache.fulcrum.security.model.basic.entity.impl.BasicGroupImpl" column="GROUP_ID"/>
+ <many-to-many class="org.apache.fulcrum.security.model.basic.entity.impl.BasicGroupImpl" column="GROUP_ID"/>
</set>
- </class>
+ </class>
+
-
- </hibernate-mapping>
\ No newline at end of file
+ </hibernate-mapping>
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/BasicHibernateComponentConfig.xml
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/BasicHibernateComponentConfig.xml?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/BasicHibernateComponentConfig.xml (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/BasicHibernateComponentConfig.xml Fri May 4 23:58:06 2007
@@ -1,15 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
<my-system>
<securityService/>
<authenticator/>
<modelManager/>
<aclFactory/>
-
- <userManager><className>org.apache.fulcrum.security.model.basic.entity.impl.BasicUserImpl</className></userManager>
- <groupManager><className>org.apache.fulcrum.security.model.basic.entity.impl.BasicGroupImpl</className></groupManager>
-
+
+ <userManager><className>org.apache.fulcrum.security.model.basic.entity.impl.BasicUserImpl</className></userManager>
+ <groupManager><className>org.apache.fulcrum.security.model.basic.entity.impl.BasicGroupImpl</className></groupManager>
+
<persistenceHelper/>
<hibernateService>
- <parameter name="default.configuration" value="false"/>
+ <parameter name="default.configuration" value="false"/>
<session-factory >
<property name="show_sql">false</property>
<property name="use_outer_join">auto</property>
@@ -20,12 +39,12 @@
<property name="connection.username">test</property>
<property name="connection.password">test</property>
<property name="connection.url">jdbc:mckoi:local://./src/test/mcKoi.conf?create=true</property>
- <property name="dialect">net.sf.hibernate.dialect.MckoiDialect</property>
+ <property name="dialect">net.sf.hibernate.dialect.MckoiDialect</property>
<!-- mapping files -->
- </session-factory>
+ </session-factory>
<mappings>
<resource>BasicHibernate.hbm.xml</resource>
- </mappings>
+ </mappings>
</hibernateService>
-</my-system>
\ No newline at end of file
+</my-system>
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/BasicHibernateRoleConfig.xml
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/BasicHibernateRoleConfig.xml?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/BasicHibernateRoleConfig.xml (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/BasicHibernateRoleConfig.xml Fri May 4 23:58:06 2007
@@ -1,3 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
<!-- This configuration file for Avalon components is used for testing the TestComponent -->
<role-list>
<role
@@ -16,24 +35,24 @@
<role
name="org.apache.fulcrum.security.ModelManager"
shorthand="modelManager"
- default-class="org.apache.fulcrum.security.hibernate.basic.HibernateModelManagerImpl"/>
+ default-class="org.apache.fulcrum.security.hibernate.basic.HibernateModelManagerImpl"/>
<role
name="org.apache.fulcrum.security.authenticator.Authenticator"
shorthand="authenticator"
- default-class="org.apache.fulcrum.security.authenticator.TextMatchAuthenticator"/>
+ default-class="org.apache.fulcrum.security.authenticator.TextMatchAuthenticator"/>
<role
name="org.apache.fulcrum.security.model.ACLFactory"
shorthand="aclFactory"
- default-class="org.apache.fulcrum.security.model.basic.BasicACLFactory"/>
+ default-class="org.apache.fulcrum.security.model.basic.BasicACLFactory"/>
<role
name="org.apache.fulcrum.security.hibernate.PersistenceHelper"
shorthand="persistenceHelper"
- default-class="org.apache.fulcrum.security.hibernate.PersistenceHelperHibernateServiceImpl"/>
+ default-class="org.apache.fulcrum.security.hibernate.PersistenceHelperHibernateServiceImpl"/>
<role
name="net.sf.hibernate.avalon.HibernateService"
shorthand="hibernateService"
- default-class="net.sf.hibernate.avalon.HibernateServiceImpl"/>
+ default-class="net.sf.hibernate.avalon.HibernateServiceImpl"/>
</role-list>
-
\ No newline at end of file
+
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/DynamicHibernate.hbm.xml
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/DynamicHibernate.hbm.xml?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/DynamicHibernate.hbm.xml (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/DynamicHibernate.hbm.xml Fri May 4 23:58:06 2007
@@ -1,88 +1,106 @@
<?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.
+-->
<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
- "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
+ "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping auto-import="true">
<class name="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicPermissionImpl" table="PERMISSION" >
<id name="id" type="long" column="PERMISSION_ID" unsaved-value="0">
<generator class="native"/>
</id>
- <property name="name" column="NAME" type="string"/>
-
+ <property name="name" column="NAME" type="string"/>
+
<set name="rolesAsSet" lazy="true" table="ROLE_PERMISSION" inverse="true" cascade="none">
<key column="PERMISSION_ID"/>
- <many-to-many class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicRoleImpl" column="ROLE_ID"/>
- </set>
+ <many-to-many class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicRoleImpl" column="ROLE_ID"/>
+ </set>
</class>
-
+
<class name="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicRoleImpl" table="ROLE" >
<id name="id" type="long" column="ROLE_ID" unsaved-value="0">
<generator class="native"/>
</id>
- <property name="name" column="NAME" type="string"/>
-
+ <property name="name" column="NAME" type="string"/>
+
<set name="permissionsAsSet" lazy="true" table="ROLE_PERMISSION" cascade="none">
<key column="ROLE_ID"/>
- <many-to-many class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicPermissionImpl" column="PERMISSION_ID"/>
+ <many-to-many class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicPermissionImpl" column="PERMISSION_ID"/>
</set>
-
+
<set name="groupsAsSet" lazy="true" table="GROUP_ROLE" inverse="true" cascade="none">
<key column="ROLE_ID"/>
- <many-to-many class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicGroupImpl" column="GROUP_ID"/>
- </set>
- </class>
+ <many-to-many class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicGroupImpl" column="GROUP_ID"/>
+ </set>
+ </class>
<class name="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicGroupImpl" table="GROUPS" >
<id name="id" type="long" column="GROUP_ID" unsaved-value="0">
<generator class="native"/>
</id>
- <property name="name" column="NAME" type="string"/>
-
+ <property name="name" column="NAME" type="string"/>
+
<set name="rolesAsSet" lazy="true" table="GROUP_ROLE" cascade="none" >
<key column="GROUP_ID"/>
- <many-to-many class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicRoleImpl" column="ROLE_ID"/>
+ <many-to-many class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicRoleImpl" column="ROLE_ID"/>
</set>
-
+
<set name="usersAsSet" lazy="true" table="HIBUSER_GROUP" cascade="none" >
<key column="GROUP_ID"/>
- <many-to-many class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicUserImpl" column="USER_ID"/>
- </set>
- </class>
+ <many-to-many class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicUserImpl" column="USER_ID"/>
+ </set>
+ </class>
- <class name="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicUserImpl"
+ <class name="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicUserImpl"
table="HIBUSER" >
<id name="id" type="long" column="HIBUSER_ID" unsaved-value="0">
<generator class="native"/>
</id>
<property name="name" column="USERNAME" type="string"/>
<property name="password" column="PASSWORD" type="string"/>
- <set name="groupsAsSet" lazy="true" table="HIBUSER_GROUP"
+ <set name="groupsAsSet" lazy="true" table="HIBUSER_GROUP"
inverse="true" cascade="none">
<key column="USER_ID"/>
- <many-to-many
- class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicGroupImpl"
+ <many-to-many
+ class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicGroupImpl"
column="GROUP_ID"/>
</set>
- <set name="delegators"
- lazy="true"
- table="HIBUSER_DELEGATES"
+ <set name="delegators"
+ lazy="true"
+ table="HIBUSER_DELEGATES"
cascade="save-update">
<key column="DELEGATOR_USER_ID"/>
- <many-to-many
- class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicUserImpl"
+ <many-to-many
+ class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicUserImpl"
column="DELEGATEE_USER_ID"/>
</set>
- <set name="delegatees"
- lazy="true"
- table="HIBUSER_DELEGATES"
+ <set name="delegatees"
+ lazy="true"
+ table="HIBUSER_DELEGATES"
cascade="save-update"
inverse="true">
<key column="DELEGATEE_USER_ID"/>
- <many-to-many
- class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicUserImpl"
+ <many-to-many
+ class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicUserImpl"
column="DELEGATOR_USER_ID"/>
</set>
</class>
-
- </hibernate-mapping>
\ No newline at end of file
+
+ </hibernate-mapping>
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/DynamicHibernateComponentConfig.xml
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/DynamicHibernateComponentConfig.xml?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/DynamicHibernateComponentConfig.xml (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/DynamicHibernateComponentConfig.xml Fri May 4 23:58:06 2007
@@ -1,17 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
<my-system>
<securityService/>
<authenticator/>
<modelManager/>
<aclFactory/>
-
- <userManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicUserImpl</className></userManager>
- <groupManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicGroupImpl</className></groupManager>
- <roleManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicRoleImpl</className></roleManager>
- <permissionManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicPermissionImpl</className></permissionManager>
-
+
+ <userManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicUserImpl</className></userManager>
+ <groupManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicGroupImpl</className></groupManager>
+ <roleManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicRoleImpl</className></roleManager>
+ <permissionManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicPermissionImpl</className></permissionManager>
+
<persistenceHelper/>
<hibernateService>
- <parameter name="default.configuration" value="false"/>
+ <parameter name="default.configuration" value="false"/>
<session-factory >
<property name="show_sql">false</property>
<property name="use_outer_join">auto</property>
@@ -22,12 +41,12 @@
<property name="connection.username">test</property>
<property name="connection.password">test</property>
<property name="connection.url">jdbc:mckoi:local://./src/test/mcKoi.conf?create=true</property>
- <property name="dialect">net.sf.hibernate.dialect.MckoiDialect</property>
+ <property name="dialect">net.sf.hibernate.dialect.MckoiDialect</property>
<!-- mapping files -->
- </session-factory>
+ </session-factory>
<mappings>
<resource>DynamicHibernate.hbm.xml</resource>
- </mappings>
+ </mappings>
</hibernateService>
-</my-system>
\ No newline at end of file
+</my-system>
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/DynamicHibernateExtendedUserComponentConfig.xml
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/DynamicHibernateExtendedUserComponentConfig.xml?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/DynamicHibernateExtendedUserComponentConfig.xml (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/DynamicHibernateExtendedUserComponentConfig.xml Fri May 4 23:58:06 2007
@@ -1,17 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
<my-system>
<securityService/>
<authenticator/>
<modelManager/>
<aclFactory/>
-
- <userManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicUserImpl</className></userManager>
- <groupManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicGroupImpl</className></groupManager>
- <roleManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicRoleImpl</className></roleManager>
- <permissionManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicPermissionImpl</className></permissionManager>
-
+
+ <userManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicUserImpl</className></userManager>
+ <groupManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicGroupImpl</className></groupManager>
+ <roleManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicRoleImpl</className></roleManager>
+ <permissionManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicPermissionImpl</className></permissionManager>
+
<persistenceHelper/>
<hibernateService>
- <parameter name="default.configuration" value="false"/>
+ <parameter name="default.configuration" value="false"/>
<session-factory >
<property name="show_sql">false</property>
<property name="use_outer_join">auto</property>
@@ -22,12 +41,12 @@
<property name="connection.username">test</property>
<property name="connection.password">test</property>
<property name="connection.url">jdbc:mckoi:local://./src/test/mcKoi.conf?create=true</property>
- <property name="dialect">net.sf.hibernate.dialect.MckoiDialect</property>
+ <property name="dialect">net.sf.hibernate.dialect.MckoiDialect</property>
<!-- mapping files -->
- </session-factory>
+ </session-factory>
<mappings>
<resource>ExtendedUserHibernate.hbm.xml</resource>
- </mappings>
+ </mappings>
</hibernateService>
-</my-system>
\ No newline at end of file
+</my-system>
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/DynamicHibernateRoleConfig.xml
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/DynamicHibernateRoleConfig.xml?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/DynamicHibernateRoleConfig.xml (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/DynamicHibernateRoleConfig.xml Fri May 4 23:58:06 2007
@@ -1,3 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
<!-- This configuration file for Avalon components is used for testing the TestComponent -->
<role-list>
<role
@@ -24,24 +43,24 @@
<role
name="org.apache.fulcrum.security.ModelManager"
shorthand="modelManager"
- default-class="org.apache.fulcrum.security.hibernate.dynamic.HibernateModelManagerImpl"/>
+ default-class="org.apache.fulcrum.security.hibernate.dynamic.HibernateModelManagerImpl"/>
<role
name="org.apache.fulcrum.security.authenticator.Authenticator"
shorthand="authenticator"
- default-class="org.apache.fulcrum.security.authenticator.TextMatchAuthenticator"/>
+ default-class="org.apache.fulcrum.security.authenticator.TextMatchAuthenticator"/>
<role
name="org.apache.fulcrum.security.model.ACLFactory"
shorthand="aclFactory"
- default-class="org.apache.fulcrum.security.model.dynamic.DynamicACLFactory"/>
+ default-class="org.apache.fulcrum.security.model.dynamic.DynamicACLFactory"/>
<role
name="org.apache.fulcrum.security.hibernate.PersistenceHelper"
shorthand="persistenceHelper"
- default-class="org.apache.fulcrum.security.hibernate.PersistenceHelperHibernateServiceImpl"/>
+ default-class="org.apache.fulcrum.security.hibernate.PersistenceHelperHibernateServiceImpl"/>
<role
name="net.sf.hibernate.avalon.HibernateService"
shorthand="hibernateService"
- default-class="net.sf.hibernate.avalon.HibernateServiceImpl"/>
+ default-class="net.sf.hibernate.avalon.HibernateServiceImpl"/>
</role-list>
-
\ No newline at end of file
+
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/ExtendedUserHibernate.hbm.xml
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/ExtendedUserHibernate.hbm.xml?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/ExtendedUserHibernate.hbm.xml (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/ExtendedUserHibernate.hbm.xml Fri May 4 23:58:06 2007
@@ -1,64 +1,82 @@
<?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.
+-->
<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
- "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
+ "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping auto-import="true">
<class name="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicPermissionImpl" table="PERMISSION" >
<id name="id" type="long" column="PERMISSION_ID" unsaved-value="0">
<generator class="native"/>
</id>
- <property name="name" column="NAME" type="string"/>
+ <property name="name" column="NAME" type="string"/>
</class>
-
+
<class name="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicRoleImpl" table="ROLE" >
<id name="id" type="long" column="ROLE_ID" unsaved-value="0">
<generator class="native"/>
</id>
- <property name="name" column="NAME" type="string"/>
-
+ <property name="name" column="NAME" type="string"/>
+
<set name="permissionsAsSet" lazy="true" table="ROLE_PERMISSION">
<key column="ROLE_ID"/>
- <many-to-many class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicPermissionImpl" column="PERMISSION_ID"/>
+ <many-to-many class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicPermissionImpl" column="PERMISSION_ID"/>
</set>
-
+
<set name="groupsAsSet" lazy="true" table="GROUP_ROLE" inverse="true" cascade="none">
<key column="ROLE_ID"/>
- <many-to-many class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicGroupImpl" column="GROUP_ID"/>
- </set>
- </class>
+ <many-to-many class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicGroupImpl" column="GROUP_ID"/>
+ </set>
+ </class>
<class name="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicGroupImpl" table="GROUPS" >
<id name="id" type="long" column="GROUP_ID" unsaved-value="0">
<generator class="native"/>
</id>
- <property name="name" column="NAME" type="string"/>
-
+ <property name="name" column="NAME" type="string"/>
+
<set name="rolesAsSet" lazy="true" table="GROUP_ROLE" cascade="none" >
<key column="GROUP_ID"/>
- <many-to-many class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicRoleImpl" column="ROLE_ID"/>
+ <many-to-many class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicRoleImpl" column="ROLE_ID"/>
</set>
-
+
<set name="usersAsSet" lazy="true" table="HIBUSER_GROUP" cascade="none" >
<key column="GROUP_ID"/>
- <many-to-many class="org.apache.fulcrum.security.hibernate.dynamic.entity.ExtendedUser" column="USER_ID"/>
- </set>
- </class>
+ <many-to-many class="org.apache.fulcrum.security.hibernate.dynamic.entity.ExtendedUser" column="USER_ID"/>
+ </set>
+ </class>
<class name="org.apache.fulcrum.security.hibernate.dynamic.entity.ExtendedUser" table="EXTENDED_USER" >
<id name="id" type="long" column="HIBUSER_ID" unsaved-value="0">
<generator class="native"/>
</id>
- <property name="name" column="USERNAME" type="string"/>
- <property name="password" column="PASSWORD" type="string"/>
- <property name="NTDomain" column="NT_DOMAIN" type="string"/>
- <property name="NTName" column="NT_USERNAME" type="string"/>
- <property name="email" column="EMAIL" type="string"/>
+ <property name="name" column="USERNAME" type="string"/>
+ <property name="password" column="PASSWORD" type="string"/>
+ <property name="NTDomain" column="NT_DOMAIN" type="string"/>
+ <property name="NTName" column="NT_USERNAME" type="string"/>
+ <property name="email" column="EMAIL" type="string"/>
<set name="groupsAsSet" lazy="true" table="HIBUSER_GROUP" inverse="true" cascade="none">
<key column="USER_ID"/>
- <many-to-many class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicGroupImpl" column="GROUP_ID"/>
+ <many-to-many class="org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicGroupImpl" column="GROUP_ID"/>
</set>
- </class>
+ </class>
+
-
- </hibernate-mapping>
\ No newline at end of file
+ </hibernate-mapping>
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/Log4j.properties
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/Log4j.properties?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/Log4j.properties (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/Log4j.properties Fri May 4 23:58:06 2007
@@ -1,3 +1,19 @@
+# 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.
# ------------------------------------------------------------------------
#
# Logging Configuration
@@ -24,11 +40,11 @@
log4j.category.avalon = INFO, avalon
log4j.additivity.avalon = false
-########################################################################
+# #######################################################################
#
# Logfile definitions
#
-########################################################################
+# #######################################################################
#
# turbine.log
@@ -41,7 +57,7 @@
#
# torque.log
-#
+#
log4j.appender.torque = org.apache.log4j.FileAppender
log4j.appender.torque.file = target/torque.log
log4j.appender.torque.layout = org.apache.log4j.PatternLayout
@@ -60,31 +76,31 @@
# BEGIN HIBERNATE SECTION
-### direct log messages to stdout ###
+# ## direct log messages to stdout ###
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-### direct messages to file hibernate.log ###
-#log4j.appender.file=org.apache.log4j.FileAppender
-#log4j.appender.file.File=hibernate.log
-#log4j.appender.file.layout=org.apache.log4j.PatternLayout
-#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+# ## direct messages to file hibernate.log ###
+# log4j.appender.file=org.apache.log4j.FileAppender
+# log4j.appender.file.File=hibernate.log
+# log4j.appender.file.layout=org.apache.log4j.PatternLayout
+# log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-### set log levels - for more verbose logging change 'info' to 'debug' ##
+# ## set log levels - for more verbose logging change 'info' to 'debug' ##
log4j.rootLogger=warn, stdout
log4j.logger.net.sf.hibernate=warn
-### enable the following line if you want to track down connection ###
-### leakages when using DriverManagerConnectionProvider ###
-#log4j.logger.net.sf.hibernate.connection.DriverManagerConnectionProvider=trace
+# ## enable the following line if you want to track down connection ###
+# ## leakages when using DriverManagerConnectionProvider ###
+# log4j.logger.net.sf.hibernate.connection.DriverManagerConnectionProvider=trace
-### log JDBC bind parameters ###
+# ## log JDBC bind parameters ###
log4j.logger.net.sf.hibernate.type=info
-### log prepared statement cache activity ###
+# ## log prepared statement cache activity ###
log4j.logger.net.sf.hibernate.ps.PreparedStatementCache=info
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/PersistenceHelperDefaultImplComponentConfig.xml
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/PersistenceHelperDefaultImplComponentConfig.xml?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/PersistenceHelperDefaultImplComponentConfig.xml (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/PersistenceHelperDefaultImplComponentConfig.xml Fri May 4 23:58:06 2007
@@ -1,17 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
<my-system>
<securityService/>
<authenticator/>
<modelManager/>
<aclFactory/>
-
- <userManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicUserImpl</className></userManager>
- <groupManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicGroupImpl</className></groupManager>
- <roleManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicRoleImpl</className></roleManager>
- <permissionManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicPermissionImpl</className></permissionManager>
-
+
+ <userManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicUserImpl</className></userManager>
+ <groupManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicGroupImpl</className></groupManager>
+ <roleManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicRoleImpl</className></roleManager>
+ <permissionManager><className>org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicPermissionImpl</className></permissionManager>
+
<persistenceHelper/>
<hibernateService>
- <parameter name="default.configuration" value="false"/>
+ <parameter name="default.configuration" value="false"/>
<session-factory >
<property name="show_sql">false</property>
<property name="use_outer_join">auto</property>
@@ -22,12 +41,12 @@
<property name="connection.username">test</property>
<property name="connection.password">test</property>
<property name="connection.url">jdbc:mckoi:local://./src/test/mcKoi.conf?create=true</property>
- <property name="dialect">net.sf.hibernate.dialect.MckoiDialect</property>
+ <property name="dialect">net.sf.hibernate.dialect.MckoiDialect</property>
<!-- mapping files -->
- </session-factory>
+ </session-factory>
<mappings>
<resource>DynamicHibernate.hbm.xml</resource>
- </mappings>
+ </mappings>
</hibernateService>
-</my-system>
\ No newline at end of file
+</my-system>
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/PersistenceHelperDefaultImplRoleConfig.xml
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/PersistenceHelperDefaultImplRoleConfig.xml?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/PersistenceHelperDefaultImplRoleConfig.xml (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/PersistenceHelperDefaultImplRoleConfig.xml Fri May 4 23:58:06 2007
@@ -1,10 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
<!-- This configuration file for Avalon components is used for testing the TestComponent -->
<role-list>
<role
name="org.apache.fulcrum.security.SecurityService"
shorthand="securityService"
default-class="org.apache.fulcrum.security.BaseSecurityService"/>
-
+
<role
name="org.apache.fulcrum.security.GroupManager"
shorthand="groupManager"
@@ -13,13 +32,13 @@
<role
name="org.apache.fulcrum.security.ModelManager"
shorthand="modelManager"
- default-class="org.apache.fulcrum.security.hibernate.dynamic.HibernateModelManagerImpl"/>
+ default-class="org.apache.fulcrum.security.hibernate.dynamic.HibernateModelManagerImpl"/>
<role
name="org.apache.fulcrum.security.hibernate.PersistenceHelper"
shorthand="persistenceHelper"
- default-class="org.apache.fulcrum.security.hibernate.PersistenceHelperDefaultImpl"/>
+ default-class="org.apache.fulcrum.security.hibernate.PersistenceHelperDefaultImpl"/>
+
-
</role-list>
-
\ No newline at end of file
+
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/TurbineHibernate.hbm.xml
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/TurbineHibernate.hbm.xml?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/TurbineHibernate.hbm.xml (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/TurbineHibernate.hbm.xml Fri May 4 23:58:06 2007
@@ -1,52 +1,70 @@
<?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.
+-->
<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
- "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
+ "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping auto-import="true">
<class name="org.apache.fulcrum.security.model.turbine.entity.impl.TurbinePermissionImpl" table="PERMISSION" >
<id name="id" type="long" column="PERMISSION_ID" unsaved-value="0">
<generator class="native"/>
</id>
- <property name="name" column="NAME" type="string"/>
-
+ <property name="name" column="NAME" type="string"/>
+
<set name="rolesAsSet" lazy="true" table="ROLE_PERMISSION" inverse="true" cascade="none">
<key column="PERMISSION_ID"/>
- <many-to-many class="org.apache.fulcrum.security.model.turbine.entity.impl.TurbineRoleImpl" column="ROLE_ID"/>
- </set>
+ <many-to-many class="org.apache.fulcrum.security.model.turbine.entity.impl.TurbineRoleImpl" column="ROLE_ID"/>
+ </set>
</class>
-
+
<class name="org.apache.fulcrum.security.model.turbine.entity.impl.TurbineRoleImpl" table="ROLE" >
<id name="id" type="long" column="ROLE_ID" unsaved-value="0">
<generator class="native"/>
</id>
- <property name="name" column="NAME" type="string"/>
-
+ <property name="name" column="NAME" type="string"/>
+
<set name="permissionsAsSet" lazy="true" table="ROLE_PERMISSION" cascade="none">
<key column="ROLE_ID"/>
- <many-to-many class="org.apache.fulcrum.security.model.turbine.entity.impl.TurbinePermissionImpl" column="PERMISSION_ID"/>
+ <many-to-many class="org.apache.fulcrum.security.model.turbine.entity.impl.TurbinePermissionImpl" column="PERMISSION_ID"/>
</set>
-
+
<set inverse="true" name="userGroupRoleSet">
<key column="role_id" />
<one-to-many class="org.apache.fulcrum.security.model.turbine.entity.TurbineUserGroupRole" />
</set>
-
- </class>
+
+ </class>
<class name="org.apache.fulcrum.security.model.turbine.entity.impl.TurbineGroupImpl" table="GROUPS" >
<id name="id" type="long" column="GROUP_ID" unsaved-value="0">
<generator class="native"/>
</id>
- <property name="name" column="NAME" type="string"/>
-
+ <property name="name" column="NAME" type="string"/>
+
<set inverse="true" name="userGroupRoleSet">
<key column="group_id" />
<one-to-many class="org.apache.fulcrum.security.model.turbine.entity.TurbineUserGroupRole" />
- </set>
- </class>
+ </set>
+ </class>
- <class name="org.apache.fulcrum.security.model.turbine.entity.impl.TurbineUserImpl"
+ <class name="org.apache.fulcrum.security.model.turbine.entity.impl.TurbineUserImpl"
table="HIBUSER" >
<id name="id" type="long" column="HIBUSER_ID" unsaved-value="0">
<generator class="native"/>
@@ -57,23 +75,23 @@
<key column="user_id" />
<one-to-many class="org.apache.fulcrum.security.model.turbine.entity.TurbineUserGroupRole" />
</set>
-
+
</class>
-
+
<class name="org.apache.fulcrum.security.model.turbine.entity.TurbineUserGroupRole" table="turbine_user_group_role"
lazy="true">
<composite-id>
- <key-many-to-one name="Role" column="role_id"
- class="org.apache.fulcrum.security.model.turbine.entity.impl.TurbineRoleImpl"
+ <key-many-to-one name="Role" column="role_id"
+ class="org.apache.fulcrum.security.model.turbine.entity.impl.TurbineRoleImpl"
/>
- <key-many-to-one name="User" column="user_id"
- class="org.apache.fulcrum.security.model.turbine.entity.impl.TurbineUserImpl"
+ <key-many-to-one name="User" column="user_id"
+ class="org.apache.fulcrum.security.model.turbine.entity.impl.TurbineUserImpl"
/>
- <key-many-to-one name="Group" column="group_id"
- class="org.apache.fulcrum.security.model.turbine.entity.impl.TurbineGroupImpl"
+ <key-many-to-one name="Group" column="group_id"
+ class="org.apache.fulcrum.security.model.turbine.entity.impl.TurbineGroupImpl"
/>
</composite-id>
- </class>
-
- </hibernate-mapping>
\ No newline at end of file
+ </class>
+
+ </hibernate-mapping>
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/TurbineHibernate.xml
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/TurbineHibernate.xml?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/TurbineHibernate.xml (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/TurbineHibernate.xml Fri May 4 23:58:06 2007
@@ -1,45 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
<my-system>
<component
role="org.apache.fulcrum.security.SecurityService"
- class="org.apache.fulcrum.security.BaseSecurityService">
- </component>
+ class="org.apache.fulcrum.security.BaseSecurityService">
+ </component>
<component
role="org.apache.fulcrum.security.UserManager"
- class="org.apache.fulcrum.security.hibernate.HibernateUserManagerImpl">
- <className>org.apache.fulcrum.security.model.turbine.entity.impl.TurbineUserImpl</className>
- </component>
+ class="org.apache.fulcrum.security.hibernate.HibernateUserManagerImpl">
+ <className>org.apache.fulcrum.security.model.turbine.entity.impl.TurbineUserImpl</className>
+ </component>
<component
role="org.apache.fulcrum.security.GroupManager"
- class="org.apache.fulcrum.security.hibernate.HibernateGroupManagerImpl">
- <className>org.apache.fulcrum.security.model.turbine.entity.impl.TurbineGroupImpl</className>
- </component>
+ class="org.apache.fulcrum.security.hibernate.HibernateGroupManagerImpl">
+ <className>org.apache.fulcrum.security.model.turbine.entity.impl.TurbineGroupImpl</className>
+ </component>
<component
role="org.apache.fulcrum.security.RoleManager"
- class="org.apache.fulcrum.security.hibernate.HibernateRoleManagerImpl">
+ class="org.apache.fulcrum.security.hibernate.HibernateRoleManagerImpl">
<className>org.apache.fulcrum.security.model.turbine.entity.impl.TurbineRoleImpl</className>
- </component>
+ </component>
<component
role="org.apache.fulcrum.security.PermissionManager"
- class="org.apache.fulcrum.security.hibernate.HibernatePermissionManagerImpl">
- <className>org.apache.fulcrum.security.model.turbine.entity.impl.TurbinePermissionImpl</className>
- </component>
-
+ class="org.apache.fulcrum.security.hibernate.HibernatePermissionManagerImpl">
+ <className>org.apache.fulcrum.security.model.turbine.entity.impl.TurbinePermissionImpl</className>
+ </component>
+
<component
role="org.apache.fulcrum.security.hibernate.PersistenceHelper"
- class="org.apache.fulcrum.security.hibernate.PersistenceHelperHibernateServiceImpl">
+ class="org.apache.fulcrum.security.hibernate.PersistenceHelperHibernateServiceImpl">
</component>
-
+
<component
role="org.apache.fulcrum.security.ModelManager"
- class="org.apache.fulcrum.security.hibernate.turbine.HibernateModelManagerImpl">
- </component>
- <component
+ class="org.apache.fulcrum.security.hibernate.turbine.HibernateModelManagerImpl">
+ </component>
+ <component
role="net.sf.hibernate.avalon.HibernateService"
- class="net.sf.hibernate.avalon.HibernateServiceImpl">
- <parameter name="default.configuration" value="false"/>
+ class="net.sf.hibernate.avalon.HibernateServiceImpl">
+ <parameter name="default.configuration" value="false"/>
<session-factory >
<property name="show_sql">false</property>
<property name="use_outer_join">auto</property>
@@ -50,22 +69,22 @@
<property name="connection.username">test</property>
<property name="connection.password">test</property>
<property name="connection.url">jdbc:mckoi:local://./src/test/mcKoi.conf?create=true</property>
- <property name="dialect">net.sf.hibernate.dialect.MckoiDialect</property>
+ <property name="dialect">net.sf.hibernate.dialect.MckoiDialect</property>
<!-- mapping files -->
- </session-factory>
+ </session-factory>
<mappings>
<resource>TurbineHibernate.hbm.xml</resource>
- </mappings>
+ </mappings>
</component>
<component
role="org.apache.fulcrum.security.authenticator.Authenticator"
- class="org.apache.fulcrum.security.authenticator.TextMatchAuthenticator">
+ class="org.apache.fulcrum.security.authenticator.TextMatchAuthenticator">
</component>
-
+
<!--component
role="org.apache.fulcrum.security.model.ACLFactory"
- class="org.apache.fulcrum.security.model.turbine.TurbineACLFactory">
- </component-->
-</my-system>
\ No newline at end of file
+ class="org.apache.fulcrum.security.model.turbine.TurbineACLFactory">
+ </component-->
+</my-system>
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/TurbineHibernateComponentConfig.xml
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/TurbineHibernateComponentConfig.xml?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/TurbineHibernateComponentConfig.xml (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/TurbineHibernateComponentConfig.xml Fri May 4 23:58:06 2007
@@ -1,17 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
<my-system>
<securityService/>
<authenticator/>
<modelManager/>
<aclFactory/>
-
- <userManager><className>org.apache.fulcrum.security.model.turbine.entity.impl.TurbineUserImpl</className></userManager>
- <groupManager><className>org.apache.fulcrum.security.model.turbine.entity.impl.TurbineGroupImpl</className></groupManager>
- <roleManager><className>org.apache.fulcrum.security.model.turbine.entity.impl.TurbineRoleImpl</className></roleManager>
- <permissionManager><className>org.apache.fulcrum.security.model.turbine.entity.impl.TurbinePermissionImpl</className></permissionManager>
-
+
+ <userManager><className>org.apache.fulcrum.security.model.turbine.entity.impl.TurbineUserImpl</className></userManager>
+ <groupManager><className>org.apache.fulcrum.security.model.turbine.entity.impl.TurbineGroupImpl</className></groupManager>
+ <roleManager><className>org.apache.fulcrum.security.model.turbine.entity.impl.TurbineRoleImpl</className></roleManager>
+ <permissionManager><className>org.apache.fulcrum.security.model.turbine.entity.impl.TurbinePermissionImpl</className></permissionManager>
+
<persistenceHelper/>
<hibernateService>
- <parameter name="default.configuration" value="false"/>
+ <parameter name="default.configuration" value="false"/>
<session-factory >
<property name="show_sql">false</property>
<property name="use_outer_join">auto</property>
@@ -22,12 +41,12 @@
<property name="connection.username">test</property>
<property name="connection.password">test</property>
<property name="connection.url">jdbc:mckoi:local://./src/test/mcKoi.conf?create=true</property>
- <property name="dialect">net.sf.hibernate.dialect.MckoiDialect</property>
+ <property name="dialect">net.sf.hibernate.dialect.MckoiDialect</property>
<!-- mapping files -->
- </session-factory>
+ </session-factory>
<mappings>
<resource>TurbineHibernate.hbm.xml</resource>
- </mappings>
+ </mappings>
</hibernateService>
-</my-system>
\ No newline at end of file
+</my-system>
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/TurbineHibernateRoleConfig.xml
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/TurbineHibernateRoleConfig.xml?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/TurbineHibernateRoleConfig.xml (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/TurbineHibernateRoleConfig.xml Fri May 4 23:58:06 2007
@@ -1,3 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
<!-- This configuration file for Avalon components is used for testing the TestComponent -->
<role-list>
<role
@@ -24,24 +43,24 @@
<role
name="org.apache.fulcrum.security.ModelManager"
shorthand="modelManager"
- default-class="org.apache.fulcrum.security.hibernate.turbine.HibernateModelManagerImpl"/>
+ default-class="org.apache.fulcrum.security.hibernate.turbine.HibernateModelManagerImpl"/>
<role
name="org.apache.fulcrum.security.authenticator.Authenticator"
shorthand="authenticator"
- default-class="org.apache.fulcrum.security.authenticator.TextMatchAuthenticator"/>
+ default-class="org.apache.fulcrum.security.authenticator.TextMatchAuthenticator"/>
<role
name="org.apache.fulcrum.security.model.ACLFactory"
shorthand="aclFactory"
- default-class="org.apache.fulcrum.security.model.dynamic.DynamicACLFactory"/>
+ default-class="org.apache.fulcrum.security.model.dynamic.DynamicACLFactory"/>
<role
name="org.apache.fulcrum.security.hibernate.PersistenceHelper"
shorthand="persistenceHelper"
- default-class="org.apache.fulcrum.security.hibernate.PersistenceHelperHibernateServiceImpl"/>
+ default-class="org.apache.fulcrum.security.hibernate.PersistenceHelperHibernateServiceImpl"/>
<role
name="net.sf.hibernate.avalon.HibernateService"
shorthand="hibernateService"
- default-class="net.sf.hibernate.avalon.HibernateServiceImpl"/>
+ default-class="net.sf.hibernate.avalon.HibernateServiceImpl"/>
</role-list>
-
\ No newline at end of file
+
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/hibernate.cfg.xml
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/hibernate.cfg.xml?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/hibernate.cfg.xml (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/hibernate.cfg.xml Fri May 4 23:58:06 2007
@@ -1,4 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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 hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/HibernateGroupManagerTest.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/HibernateGroupManagerTest.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/HibernateGroupManagerTest.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/HibernateGroupManagerTest.java Fri May 4 23:58:06 2007
@@ -1,18 +1,21 @@
package org.apache.fulcrum.security.hibernate;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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 net.sf.hibernate.avalon.HibernateService;
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/HibernateHelper.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/HibernateHelper.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/HibernateHelper.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/HibernateHelper.java Fri May 4 23:58:06 2007
@@ -1,18 +1,21 @@
package org.apache.fulcrum.security.hibernate;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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 net.sf.hibernate.SessionFactory;
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/HibernatePermissionManagerTest.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/HibernatePermissionManagerTest.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/HibernatePermissionManagerTest.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/HibernatePermissionManagerTest.java Fri May 4 23:58:06 2007
@@ -1,18 +1,21 @@
package org.apache.fulcrum.security.hibernate;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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 net.sf.hibernate.avalon.HibernateService;
@@ -33,7 +36,7 @@
HibernateHelper.exportSchema(hibernateService.getConfiguration());
securityService = (SecurityService) lookup(SecurityService.ROLE);
permissionManager = securityService.getPermissionManager();
-
+
}
public void tearDown()
{
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/HibernateRoleManagerTest.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/HibernateRoleManagerTest.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/HibernateRoleManagerTest.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/HibernateRoleManagerTest.java Fri May 4 23:58:06 2007
@@ -1,18 +1,21 @@
package org.apache.fulcrum.security.hibernate;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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 net.sf.hibernate.avalon.HibernateService;
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/HibernateUserManagerTest.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/HibernateUserManagerTest.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/HibernateUserManagerTest.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/HibernateUserManagerTest.java Fri May 4 23:58:06 2007
@@ -1,18 +1,21 @@
package org.apache.fulcrum.security.hibernate;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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 net.sf.hibernate.avalon.HibernateService;
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/PersistenceHelperDefaultImplTest.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/PersistenceHelperDefaultImplTest.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/PersistenceHelperDefaultImplTest.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/PersistenceHelperDefaultImplTest.java Fri May 4 23:58:06 2007
@@ -1,18 +1,21 @@
package org.apache.fulcrum.security.hibernate;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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 net.sf.hibernate.Session;
@@ -26,7 +29,7 @@
public class PersistenceHelperDefaultImplTest extends BaseUnitTest
{
-
+
/**
* Constructor for HibernatePermissionManagerTest.
* @param arg0
@@ -40,15 +43,15 @@
{
this.setRoleFileName("src/test/PersistenceHelperDefaultImplRoleConfig.xml");
this.setConfigurationFileName("src/test/PersistenceHelperDefaultImplComponentConfig.xml");
-
+
SecurityService securityService = (SecurityService) lookup(SecurityService.ROLE);
HibernateGroupManagerImpl groupManager = (HibernateGroupManagerImpl)securityService.getGroupManager();
PersistenceHelper persistenceHelper = groupManager.getPersistenceHelper();
assertTrue(persistenceHelper instanceof PersistenceHelperDefaultImpl);
PersistenceHelperDefaultImpl persistenceHelperFromGroupManager = (PersistenceHelperDefaultImpl)persistenceHelper;
Session s = persistenceHelper.retrieveSession();
-
+
}
-
-
+
+
}
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/PersistenceHelperTest.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/PersistenceHelperTest.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/PersistenceHelperTest.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/PersistenceHelperTest.java Fri May 4 23:58:06 2007
@@ -1,18 +1,21 @@
package org.apache.fulcrum.security.hibernate;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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 net.sf.hibernate.avalon.HibernateService;
@@ -50,30 +53,30 @@
HibernateHelper.exportSchema(hibernateService.getConfiguration());
HibernateService hibernateService2 = new HibernateServiceImpl();
-
+
assertNotSame(hibernateService,hibernateService2);
-
+
SecurityService securityService = (SecurityService) lookup(SecurityService.ROLE);
HibernateGroupManagerImpl groupManager = (HibernateGroupManagerImpl)securityService.getGroupManager();
PersistenceHelper persistenceHelper = groupManager.getPersistenceHelper();
assertTrue(persistenceHelper instanceof PersistenceHelperHibernateServiceImpl);
PersistenceHelperHibernateServiceImpl persistenceHelperFromGroupManager = (PersistenceHelperHibernateServiceImpl)persistenceHelper;
- assertSame(hibernateService,persistenceHelperFromGroupManager.getHibernateService());
+ assertSame(hibernateService,persistenceHelperFromGroupManager.getHibernateService());
persistenceHelperFromGroupManager.setHibernateService(hibernateService2);
assertSame(hibernateService2,persistenceHelperFromGroupManager.getHibernateService());
-
+
HibernateRoleManagerImpl roleManager = (HibernateRoleManagerImpl)securityService.getRoleManager();
PersistenceHelperHibernateServiceImpl persistenceHelperFromRoleManager = (PersistenceHelperHibernateServiceImpl)roleManager.getPersistenceHelper();
assertSame(hibernateService2,persistenceHelperFromRoleManager.getHibernateService());
assertNotSame(hibernateService,persistenceHelperFromRoleManager.getHibernateService());
persistenceHelperFromRoleManager.setHibernateService(hibernateService);
assertSame(persistenceHelperFromRoleManager.getHibernateService(),persistenceHelperFromGroupManager.getHibernateService());
-
+
roleManager = (HibernateRoleManagerImpl)securityService.getRoleManager();
PersistenceHelperHibernateServiceImpl persistenceHelperFromRoleManager2 = (PersistenceHelperHibernateServiceImpl)roleManager.getPersistenceHelper();
assertSame(persistenceHelperFromRoleManager2.getHibernateService(),persistenceHelperFromRoleManager.getHibernateService());
assertSame(persistenceHelperFromRoleManager2.getHibernateService(),persistenceHelperFromGroupManager.getHibernateService());
}
-
-
+
+
}
Modified: jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/StartingSecurityServicesTest.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/StartingSecurityServicesTest.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/StartingSecurityServicesTest.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/hibernate/src/test/org/apache/fulcrum/security/hibernate/StartingSecurityServicesTest.java Fri May 4 23:58:06 2007
@@ -1,18 +1,21 @@
package org.apache.fulcrum.security.hibernate;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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 org.apache.fulcrum.security.SecurityService;
@@ -32,7 +35,7 @@
super(name);
}
-
+
public void testStartingHibernateSecurity() throws Exception
{
this.setRoleFileName("src/test/DynamicHibernateRoleConfig.xml");
@@ -46,6 +49,6 @@
assertTrue(securityService.getModelManager() instanceof DynamicModelManager);
}
-
+
}
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org