*/
package org.wamblee.security.authorization;
-import javax.persistence.DiscriminatorColumn;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Inheritance;
-import javax.persistence.InheritanceType;
-import javax.persistence.Table;
-import javax.persistence.Version;
-
/**
* Checks if a path satisfies a condition.
*
* @author Erik Brakkee
*/
-@Entity
-@Table(name = "SEC_PATH_CONDITION")
-@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
-@DiscriminatorColumn(name = "TYPE")
-public abstract class PathCondition {
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- private Long primaryKey;
+public interface PathCondition {
- @Version
- private int version;
-
- public PathCondition() {
- // Empty
- }
-
- public PathCondition(PathCondition aCondition) {
- primaryKey = aCondition.primaryKey;
- version = aCondition.version;
- }
-
/**
* Checks if the path matches the condition.
*
* @return True iff the path matches.
*/
public abstract boolean matches(String aPath);
-}
+
+}
\ No newline at end of file