SEC-562: Repackaging core-tiger.

This commit is contained in:
Luke Taylor 2007-09-21 18:29:12 +00:00
parent 43cca63394
commit a122e6bb74
20 changed files with 56 additions and 56 deletions

View File

@ -1,11 +1,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.acegisecurity</groupId> <groupId>org.springframework.security</groupId>
<artifactId>acegi-security-parent</artifactId> <artifactId>spring-security-parent</artifactId>
<version>2.0-SNAPSHOT</version> <version>2.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>acegi-security-tiger</artifactId> <artifactId>spring-security-core-tiger</artifactId>
<name>Acegi Security System for Spring - Java 5 (Tiger)</name> <name>Acegi Security System for Spring - Java 5 (Tiger)</name>
<scm> <scm>
@ -16,8 +16,8 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.acegisecurity</groupId> <groupId>org.springframework.security</groupId>
<artifactId>acegi-security</artifactId> <artifactId>spring-security-core</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.acegisecurity.annotation; package org.springframework.security.annotation;
import java.lang.annotation.Documented; import java.lang.annotation.Documented;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
@ -24,21 +24,21 @@ import java.lang.annotation.Target;
/** /**
* Java 5 annotation for describing service layer security attributes. * Java 5 annotation for describing service layer security attributes.
* *
* <p>The <code>Secured</code> annotation is used to define a list of security * <p>The <code>Secured</code> annotation is used to define a list of security
* configuration attributes for business methods. This annotation can be used * configuration attributes for business methods. This annotation can be used
* as a Java 5 alternative to XML configuration. * as a Java 5 alternative to XML configuration.
* <p>For example: * <p>For example:
* <pre> * <pre>
* &#64;Secured ({"ROLE_USER"}) * &#64;Secured ({"ROLE_USER"})
* public void create(Contact contact); * public void create(Contact contact);
* *
* &#64;Secured ({"ROLE_USER", "ROLE_ADMIN"}) * &#64;Secured ({"ROLE_USER", "ROLE_ADMIN"})
* public void update(Contact contact); * public void update(Contact contact);
* *
* &#64;Secured ({"ROLE_ADMIN"}) * &#64;Secured ({"ROLE_ADMIN"})
* public void delete(Contact contact); * public void delete(Contact contact);
* </pre> * </pre>
* @author Mark St.Godard * @author Mark St.Godard
* @version $Id$ * @version $Id$
*/ */
@ -48,9 +48,9 @@ import java.lang.annotation.Target;
@Documented @Documented
public @interface Secured { public @interface Secured {
/** /**
* Returns the list of security configuration attributes. * Returns the list of security configuration attributes.
* (i.e. ROLE_USER, ROLE_ADMIN etc.) * (i.e. ROLE_USER, ROLE_ADMIN etc.)
* @return String[] The secure method attributes * @return String[] The secure method attributes
*/ */
public String[] value(); public String[] value();
} }

View File

@ -12,9 +12,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.acegisecurity.annotation; package org.springframework.security.annotation;
import org.acegisecurity.SecurityConfig; import org.springframework.security.SecurityConfig;
import org.springframework.metadata.Attributes; import org.springframework.metadata.Attributes;
@ -35,11 +35,11 @@ import java.util.Set;
* <code>Secured</code> Java 5 annotation.</p> * <code>Secured</code> Java 5 annotation.</p>
* <p>The <code>SecurityAnnotationAttributes</code> implementation can be used to configure a * <p>The <code>SecurityAnnotationAttributes</code> implementation can be used to configure a
* <code>MethodDefinitionAttributes</code> and <code>MethodSecurityInterceptor</code> bean definition (see below).</p> * <code>MethodDefinitionAttributes</code> and <code>MethodSecurityInterceptor</code> bean definition (see below).</p>
* <p>For example:<pre>&lt;bean id="attributes" * <p>For example:<pre>&lt;bean id="attributes"
* class="org.acegisecurity.annotation.SecurityAnnotationAttributes"/>&lt;bean id="objectDefinitionSource" * class="org.springframework.security.annotation.SecurityAnnotationAttributes"/>&lt;bean id="objectDefinitionSource"
* class="org.acegisecurity.intercept.method.MethodDefinitionAttributes"> &lt;property name="attributes"> * class="org.springframework.security.intercept.method.MethodDefinitionAttributes"> &lt;property name="attributes">
* &lt;ref local="attributes"/> &lt;/property>&lt;/bean>&lt;bean id="securityInterceptor" * &lt;ref local="attributes"/> &lt;/property>&lt;/bean>&lt;bean id="securityInterceptor"
* class="org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor"> . . . * class="org.springframework.security.intercept.method.aopalliance.MethodSecurityInterceptor"> . . .
* &lt;property name="objectDefinitionSource"> &lt;ref local="objectDefinitionSource"/> &lt;/property> * &lt;property name="objectDefinitionSource"> &lt;ref local="objectDefinitionSource"/> &lt;/property>
* &lt;/bean></pre></p> * &lt;/bean></pre></p>
* <p>These security annotations are similiar to the Commons Attributes approach, however they are using Java 5 * <p>These security annotations are similiar to the Commons Attributes approach, however they are using Java 5
@ -50,7 +50,7 @@ import java.util.Set;
* @author Mark St.Godard * @author Mark St.Godard
* @version $Id$ * @version $Id$
* *
* @see org.acegisecurity.annotation.Secured * @see org.springframework.security.annotation.Secured
*/ */
public class SecurityAnnotationAttributes implements Attributes { public class SecurityAnnotationAttributes implements Attributes {
//~ Methods ======================================================================================================== //~ Methods ========================================================================================================

View File

@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.acegisecurity.annotation; package org.springframework.security.annotation;
/** /**
* DOCUMENT ME! * DOCUMENT ME!

View File

@ -1,4 +1,4 @@
package org.acegisecurity.annotation; package org.springframework.security.annotation;
/** /**
* *

View File

@ -1,4 +1,4 @@
package org.acegisecurity.annotation; package org.springframework.security.annotation;
/** /**
* *

View File

@ -1,4 +1,4 @@
package org.acegisecurity.annotation; package org.springframework.security.annotation;
/** /**
* *

View File

@ -1,4 +1,4 @@
package org.acegisecurity.annotation; package org.springframework.security.annotation;
/** /**
* @author Joe Scalise * @author Joe Scalise

View File

@ -1,8 +1,8 @@
package org.acegisecurity.annotation; package org.springframework.security.annotation;
/** /**
* Class to act as a superclass for annotations testing. * Class to act as a superclass for annotations testing.
* *
* @author Ben Alex * @author Ben Alex
* *
*/ */

View File

@ -13,23 +13,23 @@
* limitations under the License. * limitations under the License.
*/ */
package org.acegisecurity.annotation; package org.springframework.security.annotation;
import java.lang.reflect.AccessibleObject; import java.lang.reflect.AccessibleObject;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.acegisecurity.ConfigAttributeDefinition; import org.springframework.security.ConfigAttributeDefinition;
import org.acegisecurity.SecurityConfig; import org.springframework.security.SecurityConfig;
import org.acegisecurity.annotation.test.Entity; import org.springframework.security.annotation.test.Entity;
import org.acegisecurity.annotation.test.OrganisationService; import org.springframework.security.annotation.test.OrganisationService;
import org.acegisecurity.annotation.test.PersonService; import org.springframework.security.annotation.test.PersonService;
import org.acegisecurity.annotation.test.PersonServiceImpl; import org.springframework.security.annotation.test.PersonServiceImpl;
import org.acegisecurity.annotation.test.Service; import org.springframework.security.annotation.test.Service;
import org.acegisecurity.annotation.test.ServiceImpl; import org.springframework.security.annotation.test.ServiceImpl;
import org.acegisecurity.intercept.method.MethodDefinitionMap; import org.springframework.security.intercept.method.MethodDefinitionMap;
import org.acegisecurity.intercept.method.MethodDefinitionSourceEditor; import org.springframework.security.intercept.method.MethodDefinitionSourceEditor;
import org.aopalliance.intercept.MethodInvocation; import org.aopalliance.intercept.MethodInvocation;
@ -64,7 +64,7 @@ public class MethodDefinitionSourceEditorTigerTests extends TestCase {
throws Exception { throws Exception {
MethodDefinitionSourceEditor editor = new MethodDefinitionSourceEditor(); MethodDefinitionSourceEditor editor = new MethodDefinitionSourceEditor();
editor.setAsText( editor.setAsText(
"org.acegisecurity.annotation.test.Service.makeLower*=ROLE_FROM_INTERFACE\r\norg.acegisecurity.annotation.test.Service.makeUpper*=ROLE_FROM_INTERFACE\r\norg.acegisecurity.annotation.test.ServiceImpl.makeUpper*=ROLE_FROM_IMPLEMENTATION"); "org.springframework.security.annotation.test.Service.makeLower*=ROLE_FROM_INTERFACE\r\norg.springframework.security.annotation.test.Service.makeUpper*=ROLE_FROM_INTERFACE\r\norg.springframework.security.annotation.test.ServiceImpl.makeUpper*=ROLE_FROM_IMPLEMENTATION");
MethodDefinitionMap map = (MethodDefinitionMap) editor.getValue(); MethodDefinitionMap map = (MethodDefinitionMap) editor.getValue();
assertEquals(3, map.getMethodMapSize()); assertEquals(3, map.getMethodMapSize());
@ -87,7 +87,7 @@ public class MethodDefinitionSourceEditorTigerTests extends TestCase {
throws Exception { throws Exception {
MethodDefinitionSourceEditor editor = new MethodDefinitionSourceEditor(); MethodDefinitionSourceEditor editor = new MethodDefinitionSourceEditor();
editor.setAsText( editor.setAsText(
"org.acegisecurity.annotation.test.Service.makeLower*=ROLE_FROM_INTERFACE\r\norg.acegisecurity.annotation.test.Service.makeUpper*=ROLE_FROM_INTERFACE\r\norg.acegisecurity.annotation.test.ServiceImpl.makeUpper*=ROLE_FROM_IMPLEMENTATION"); "org.springframework.security.annotation.test.Service.makeLower*=ROLE_FROM_INTERFACE\r\norg.springframework.security.annotation.test.Service.makeUpper*=ROLE_FROM_INTERFACE\r\norg.springframework.security.annotation.test.ServiceImpl.makeUpper*=ROLE_FROM_IMPLEMENTATION");
MethodDefinitionMap map = (MethodDefinitionMap) editor.getValue(); MethodDefinitionMap map = (MethodDefinitionMap) editor.getValue();
assertEquals(3, map.getMethodMapSize()); assertEquals(3, map.getMethodMapSize());

View File

@ -12,11 +12,11 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.acegisecurity.annotation; package org.springframework.security.annotation;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.acegisecurity.SecurityConfig; import org.springframework.security.SecurityConfig;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
@ -30,7 +30,7 @@ import java.util.Collection;
/** /**
* Tests for {@link org.acegisecurity.annotation.SecurityAnnotationAttributes} * Tests for {@link org.springframework.security.annotation.SecurityAnnotationAttributes}
* *
* @author Mark St.Godard * @author Mark St.Godard
* @author Joe Scalise * @author Joe Scalise
@ -118,7 +118,7 @@ public class SecurityAnnotationAttributesTests extends TestCase {
// expect 1 annotation // expect 1 annotation
assertTrue(attrs.size() == 1); assertTrue(attrs.size() == 1);
// should have 1 SecurityConfig // should have 1 SecurityConfig
SecurityConfig sc = (SecurityConfig) attrs.iterator().next(); SecurityConfig sc = (SecurityConfig) attrs.iterator().next();
assertTrue(sc.getAttribute().equals("ROLE_USER")); assertTrue(sc.getAttribute().equals("ROLE_USER"));
@ -166,7 +166,7 @@ public class SecurityAnnotationAttributesTests extends TestCase {
boolean user = false; boolean user = false;
boolean admin = false; boolean admin = false;
// should have 2 SecurityConfigs // should have 2 SecurityConfigs
for (Object obj : attrs) { for (Object obj : attrs) {
assertTrue(obj instanceof SecurityConfig); assertTrue(obj instanceof SecurityConfig);

View File

@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.acegisecurity.annotation.test; package org.springframework.security.annotation.test;
import org.springframework.util.Assert; import org.springframework.util.Assert;

View File

@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.acegisecurity.annotation.test; package org.springframework.security.annotation.test;
/** /**
* An extended version of <code>Entity</code>. * An extended version of <code>Entity</code>.

View File

@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.acegisecurity.annotation.test; package org.springframework.security.annotation.test;
/** /**
* DOCUMENT ME! * DOCUMENT ME!

View File

@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.acegisecurity.annotation.test; package org.springframework.security.annotation.test;
/** /**
* DOCUMENT ME! * DOCUMENT ME!

View File

@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.acegisecurity.annotation.test; package org.springframework.security.annotation.test;
/** /**
* An extended version of <code>Entity</code>. * An extended version of <code>Entity</code>.

View File

@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.acegisecurity.annotation.test; package org.springframework.security.annotation.test;
/** /**
* DOCUMENT ME! * DOCUMENT ME!

View File

@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.acegisecurity.annotation.test; package org.springframework.security.annotation.test;
/** /**
* DOCUMENT ME! * DOCUMENT ME!

View File

@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.acegisecurity.annotation.test; package org.springframework.security.annotation.test;
import java.util.Collection; import java.util.Collection;

View File

@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.acegisecurity.annotation.test; package org.springframework.security.annotation.test;
import java.util.Collection; import java.util.Collection;