mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-30 16:52:13 +00:00
SEC-1132: Refactoring to remove package cycles in ACL module.
This commit is contained in:
parent
93bdcccaee
commit
d5f5b0860e
@ -0,0 +1,32 @@
|
||||
package org.springframework.security.acls;
|
||||
|
||||
/**
|
||||
* Abstract base class for Acl data operations.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 2.5
|
||||
*/
|
||||
public abstract class AclDataAccessException extends RuntimeException {
|
||||
|
||||
/**
|
||||
* Constructs an <code>AclDataAccessException</code> with the specified
|
||||
* message and root cause.
|
||||
*
|
||||
* @param msg the detail message
|
||||
* @param t the root cause
|
||||
*/
|
||||
public AclDataAccessException(String msg, Throwable cause) {
|
||||
super(msg, cause);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an <code>AclDataAccessException</code> with the specified
|
||||
* message and no root cause.
|
||||
*
|
||||
* @param msg the detail message
|
||||
*/
|
||||
public AclDataAccessException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
package org.springframework.security.acls;
|
||||
|
||||
import org.springframework.core.NestedRuntimeException;
|
||||
|
||||
/**
|
||||
* Abstract superclass for all exceptions thrown in the acls package and subpackages.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 2.5
|
||||
*/
|
||||
public abstract class AclException extends NestedRuntimeException {
|
||||
|
||||
/**
|
||||
* Constructs an <code>AclException</code> with the specified
|
||||
* message and root cause.
|
||||
*
|
||||
* @param msg the detail message
|
||||
* @param t the root cause
|
||||
*/
|
||||
public AclException(String msg, Throwable cause) {
|
||||
super(msg, cause);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an <code>AclException</code> with the specified
|
||||
* message and no root cause.
|
||||
*
|
||||
* @param msg the detail message
|
||||
*/
|
||||
public AclException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
}
|
@ -20,7 +20,7 @@ package org.springframework.security.acls;
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AlreadyExistsException extends AclException {
|
||||
public class AlreadyExistsException extends AclDataAccessException {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
/**
|
||||
|
@ -20,7 +20,7 @@ package org.springframework.security.acls;
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ChildrenExistException extends AclException {
|
||||
public class ChildrenExistException extends AclDataAccessException {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
/**
|
||||
|
@ -20,7 +20,7 @@ package org.springframework.security.acls;
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class NotFoundException extends AclException {
|
||||
public class NotFoundException extends AclDataAccessException {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
/**
|
||||
|
@ -21,7 +21,7 @@ package org.springframework.security.acls;
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class UnloadedSidException extends AclException {
|
||||
public class UnloadedSidException extends AclDataAccessException {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
/**
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.springframework.security.acls;
|
||||
package org.springframework.security.acls.expression;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
@ -7,6 +7,10 @@ import java.util.List;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.security.access.expression.PermissionEvaluator;
|
||||
import org.springframework.security.acls.Acl;
|
||||
import org.springframework.security.acls.AclService;
|
||||
import org.springframework.security.acls.NotFoundException;
|
||||
import org.springframework.security.acls.Permission;
|
||||
import org.springframework.security.acls.domain.BasePermission;
|
||||
import org.springframework.security.acls.objectidentity.ObjectIdentity;
|
||||
import org.springframework.security.acls.objectidentity.ObjectIdentityGenerator;
|
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.security.acls;
|
||||
package org.springframework.security.acls.objectidentity;
|
||||
|
||||
/**
|
||||
* Thrown if an ACL identity could not be extracted from an object.
|
||||
@ -20,7 +20,7 @@ package org.springframework.security.acls;
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class IdentityUnavailableException extends AclException {
|
||||
public class IdentityUnavailableException extends RuntimeException {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
/**
|
@ -14,7 +14,6 @@
|
||||
*/
|
||||
package org.springframework.security.acls.objectidentity;
|
||||
|
||||
import org.springframework.security.acls.IdentityUnavailableException;
|
||||
import org.springframework.security.acls.jdbc.LookupStrategy;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.springframework.security.acls;
|
||||
package org.springframework.security.acls.expression;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
@ -9,6 +9,9 @@ import org.jmock.Mockery;
|
||||
import org.jmock.integration.junit4.JUnit4Mockery;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.security.acls.Acl;
|
||||
import org.springframework.security.acls.AclService;
|
||||
import org.springframework.security.acls.expression.AclPermissionEvaluator;
|
||||
import org.springframework.security.acls.objectidentity.ObjectIdentity;
|
||||
import org.springframework.security.acls.objectidentity.ObjectIdentityRetrievalStrategy;
|
||||
import org.springframework.security.acls.sid.SidRetrievalStrategy;
|
@ -3,7 +3,6 @@ package org.springframework.security.acls.objectidentity;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.security.acls.IdentityUnavailableException;
|
||||
|
||||
/**
|
||||
* Tests for {@link ObjectIdentityImpl}.
|
||||
|
Loading…
x
Reference in New Issue
Block a user