浏览代码

SEC-562: Repackaging core-tiger.

Luke Taylor 18 年之前
父节点
当前提交
a122e6bb74
共有 20 个文件被更改,包括 56 次插入56 次删除
  1. 5 5
      core-tiger/pom.xml
  2. 9 9
      core-tiger/src/main/java/org/springframework/security/annotation/Secured.java
  3. 8 8
      core-tiger/src/main/java/org/springframework/security/annotation/SecurityAnnotationAttributes.java
  4. 1 1
      core-tiger/src/test/java/org/springframework/security/annotation/BusinessService.java
  5. 1 1
      core-tiger/src/test/java/org/springframework/security/annotation/BusinessServiceImpl.java
  6. 1 1
      core-tiger/src/test/java/org/springframework/security/annotation/Department.java
  7. 1 1
      core-tiger/src/test/java/org/springframework/security/annotation/DepartmentService.java
  8. 1 1
      core-tiger/src/test/java/org/springframework/security/annotation/DepartmentServiceImpl.java
  9. 2 2
      core-tiger/src/test/java/org/springframework/security/annotation/Entity.java
  10. 13 13
      core-tiger/src/test/java/org/springframework/security/annotation/MethodDefinitionSourceEditorTigerTests.java
  11. 5 5
      core-tiger/src/test/java/org/springframework/security/annotation/SecurityAnnotationAttributesTests.java
  12. 1 1
      core-tiger/src/test/java/org/springframework/security/annotation/test/Entity.java
  13. 1 1
      core-tiger/src/test/java/org/springframework/security/annotation/test/Organisation.java
  14. 1 1
      core-tiger/src/test/java/org/springframework/security/annotation/test/OrganisationService.java
  15. 1 1
      core-tiger/src/test/java/org/springframework/security/annotation/test/OrganisationServiceImpl.java
  16. 1 1
      core-tiger/src/test/java/org/springframework/security/annotation/test/Person.java
  17. 1 1
      core-tiger/src/test/java/org/springframework/security/annotation/test/PersonService.java
  18. 1 1
      core-tiger/src/test/java/org/springframework/security/annotation/test/PersonServiceImpl.java
  19. 1 1
      core-tiger/src/test/java/org/springframework/security/annotation/test/Service.java
  20. 1 1
      core-tiger/src/test/java/org/springframework/security/annotation/test/ServiceImpl.java

+ 5 - 5
core-tiger/pom.xml

@@ -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>

+ 9 - 9
core-tiger/src/main/java/org/acegisecurity/annotation/Secured.java → core-tiger/src/main/java/org/springframework/security/annotation/Secured.java

@@ -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();
 }

+ 8 - 8
core-tiger/src/main/java/org/acegisecurity/annotation/SecurityAnnotationAttributes.java → core-tiger/src/main/java/org/springframework/security/annotation/SecurityAnnotationAttributes.java

@@ -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 ========================================================================================================

+ 1 - 1
core-tiger/src/test/java/org/acegisecurity/annotation/BusinessService.java → core-tiger/src/test/java/org/springframework/security/annotation/BusinessService.java

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

+ 1 - 1
core-tiger/src/test/java/org/acegisecurity/annotation/BusinessServiceImpl.java → core-tiger/src/test/java/org/springframework/security/annotation/BusinessServiceImpl.java

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

+ 1 - 1
core-tiger/src/test/java/org/acegisecurity/annotation/Department.java → core-tiger/src/test/java/org/springframework/security/annotation/Department.java

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

+ 1 - 1
core-tiger/src/test/java/org/acegisecurity/annotation/DepartmentService.java → core-tiger/src/test/java/org/springframework/security/annotation/DepartmentService.java

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

+ 1 - 1
core-tiger/src/test/java/org/acegisecurity/annotation/DepartmentServiceImpl.java → core-tiger/src/test/java/org/springframework/security/annotation/DepartmentServiceImpl.java

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

+ 2 - 2
core-tiger/src/test/java/org/acegisecurity/annotation/Entity.java → core-tiger/src/test/java/org/springframework/security/annotation/Entity.java

@@ -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
  *
  */

+ 13 - 13
core-tiger/src/test/java/org/acegisecurity/annotation/MethodDefinitionSourceEditorTigerTests.java → core-tiger/src/test/java/org/springframework/security/annotation/MethodDefinitionSourceEditorTigerTests.java

@@ -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());

+ 5 - 5
core-tiger/src/test/java/org/acegisecurity/annotation/SecurityAnnotationAttributesTests.java → core-tiger/src/test/java/org/springframework/security/annotation/SecurityAnnotationAttributesTests.java

@@ -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);
 

+ 1 - 1
core-tiger/src/test/java/org/acegisecurity/annotation/test/Entity.java → core-tiger/src/test/java/org/springframework/security/annotation/test/Entity.java

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

+ 1 - 1
core-tiger/src/test/java/org/acegisecurity/annotation/test/Organisation.java → core-tiger/src/test/java/org/springframework/security/annotation/test/Organisation.java

@@ -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>.

+ 1 - 1
core-tiger/src/test/java/org/acegisecurity/annotation/test/OrganisationService.java → core-tiger/src/test/java/org/springframework/security/annotation/test/OrganisationService.java

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

+ 1 - 1
core-tiger/src/test/java/org/acegisecurity/annotation/test/OrganisationServiceImpl.java → core-tiger/src/test/java/org/springframework/security/annotation/test/OrganisationServiceImpl.java

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

+ 1 - 1
core-tiger/src/test/java/org/acegisecurity/annotation/test/Person.java → core-tiger/src/test/java/org/springframework/security/annotation/test/Person.java

@@ -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>.

+ 1 - 1
core-tiger/src/test/java/org/acegisecurity/annotation/test/PersonService.java → core-tiger/src/test/java/org/springframework/security/annotation/test/PersonService.java

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

+ 1 - 1
core-tiger/src/test/java/org/acegisecurity/annotation/test/PersonServiceImpl.java → core-tiger/src/test/java/org/springframework/security/annotation/test/PersonServiceImpl.java

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

+ 1 - 1
core-tiger/src/test/java/org/acegisecurity/annotation/test/Service.java → core-tiger/src/test/java/org/springframework/security/annotation/test/Service.java

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

+ 1 - 1
core-tiger/src/test/java/org/acegisecurity/annotation/test/ServiceImpl.java → core-tiger/src/test/java/org/springframework/security/annotation/test/ServiceImpl.java

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