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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.acegisecurity</groupId>
<artifactId>acegi-security-parent</artifactId>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-parent</artifactId>
<version>2.0-SNAPSHOT</version>
</parent>
<artifactId>acegi-security-tiger</artifactId>
<artifactId>spring-security-core-tiger</artifactId>
<name>Acegi Security System for Spring - Java 5 (Tiger)</name>
<scm>
@ -16,8 +16,8 @@
<dependencies>
<dependency>
<groupId>org.acegisecurity</groupId>
<artifactId>acegi-security</artifactId>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>

View File

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

View File

@ -12,9 +12,9 @@
* See the License for the specific language governing permissions and
* 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;
@ -35,11 +35,11 @@ import java.util.Set;
* <code>Secured</code> Java 5 annotation.</p>
* <p>The <code>SecurityAnnotationAttributes</code> implementation can be used to configure a
* <code>MethodDefinitionAttributes</code> and <code>MethodSecurityInterceptor</code> bean definition (see below).</p>
* <p>For example:<pre>&lt;bean id="attributes"
* class="org.acegisecurity.annotation.SecurityAnnotationAttributes"/>&lt;bean id="objectDefinitionSource"
* class="org.acegisecurity.intercept.method.MethodDefinitionAttributes"> &lt;property name="attributes">
* &lt;ref local="attributes"/> &lt;/property>&lt;/bean>&lt;bean id="securityInterceptor"
* class="org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor"> . . .
* <p>For example:<pre>&lt;bean id="attributes"
* class="org.springframework.security.annotation.SecurityAnnotationAttributes"/>&lt;bean id="objectDefinitionSource"
* class="org.springframework.security.intercept.method.MethodDefinitionAttributes"> &lt;property name="attributes">
* &lt;ref local="attributes"/> &lt;/property>&lt;/bean>&lt;bean id="securityInterceptor"
* class="org.springframework.security.intercept.method.aopalliance.MethodSecurityInterceptor"> . . .
* &lt;property name="objectDefinitionSource"> &lt;ref local="objectDefinitionSource"/> &lt;/property>
* &lt;/bean></pre></p>
* <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
* @version $Id$
*
* @see org.acegisecurity.annotation.Secured
* @see org.springframework.security.annotation.Secured
*/
public class SecurityAnnotationAttributes implements Attributes {
//~ Methods ========================================================================================================

View File

@ -13,7 +13,7 @@
* limitations under the License.
*/
package org.acegisecurity.annotation;
package org.springframework.security.annotation;
/**
* 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

View File

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

View File

@ -13,23 +13,23 @@
* limitations under the License.
*/
package org.acegisecurity.annotation;
package org.springframework.security.annotation;
import java.lang.reflect.AccessibleObject;
import java.lang.reflect.Method;
import junit.framework.TestCase;
import org.acegisecurity.ConfigAttributeDefinition;
import org.acegisecurity.SecurityConfig;
import org.acegisecurity.annotation.test.Entity;
import org.acegisecurity.annotation.test.OrganisationService;
import org.acegisecurity.annotation.test.PersonService;
import org.acegisecurity.annotation.test.PersonServiceImpl;
import org.acegisecurity.annotation.test.Service;
import org.acegisecurity.annotation.test.ServiceImpl;
import org.acegisecurity.intercept.method.MethodDefinitionMap;
import org.acegisecurity.intercept.method.MethodDefinitionSourceEditor;
import org.springframework.security.ConfigAttributeDefinition;
import org.springframework.security.SecurityConfig;
import org.springframework.security.annotation.test.Entity;
import org.springframework.security.annotation.test.OrganisationService;
import org.springframework.security.annotation.test.PersonService;
import org.springframework.security.annotation.test.PersonServiceImpl;
import org.springframework.security.annotation.test.Service;
import org.springframework.security.annotation.test.ServiceImpl;
import org.springframework.security.intercept.method.MethodDefinitionMap;
import org.springframework.security.intercept.method.MethodDefinitionSourceEditor;
import org.aopalliance.intercept.MethodInvocation;
@ -64,7 +64,7 @@ public class MethodDefinitionSourceEditorTigerTests extends TestCase {
throws Exception {
MethodDefinitionSourceEditor editor = new MethodDefinitionSourceEditor();
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();
assertEquals(3, map.getMethodMapSize());
@ -87,7 +87,7 @@ public class MethodDefinitionSourceEditorTigerTests extends TestCase {
throws Exception {
MethodDefinitionSourceEditor editor = new MethodDefinitionSourceEditor();
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();
assertEquals(3, map.getMethodMapSize());

View File

@ -12,11 +12,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.acegisecurity.annotation;
package org.springframework.security.annotation;
import junit.framework.TestCase;
import org.acegisecurity.SecurityConfig;
import org.springframework.security.SecurityConfig;
import org.apache.commons.logging.Log;
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 Joe Scalise
@ -118,7 +118,7 @@ public class SecurityAnnotationAttributesTests extends TestCase {
// expect 1 annotation
assertTrue(attrs.size() == 1);
// should have 1 SecurityConfig
// should have 1 SecurityConfig
SecurityConfig sc = (SecurityConfig) attrs.iterator().next();
assertTrue(sc.getAttribute().equals("ROLE_USER"));
@ -166,7 +166,7 @@ public class SecurityAnnotationAttributesTests extends TestCase {
boolean user = false;
boolean admin = false;
// should have 2 SecurityConfigs
// should have 2 SecurityConfigs
for (Object obj : attrs) {
assertTrue(obj instanceof SecurityConfig);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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