diff --git a/src/main/java/gov/nist/csd/pm/common/obligation/EventContext.java b/src/main/java/gov/nist/csd/pm/common/event/EventContext.java similarity index 97% rename from src/main/java/gov/nist/csd/pm/common/obligation/EventContext.java rename to src/main/java/gov/nist/csd/pm/common/event/EventContext.java index ef661d965..bebd66506 100644 --- a/src/main/java/gov/nist/csd/pm/common/obligation/EventContext.java +++ b/src/main/java/gov/nist/csd/pm/common/event/EventContext.java @@ -1,4 +1,4 @@ -package gov.nist.csd.pm.common.obligation; +package gov.nist.csd.pm.common.event; import gov.nist.csd.pm.common.op.Operation; diff --git a/src/main/java/gov/nist/csd/pm/common/event/EventPublisher.java b/src/main/java/gov/nist/csd/pm/common/event/EventPublisher.java index 0d832b8e3..0fe68bf29 100644 --- a/src/main/java/gov/nist/csd/pm/common/event/EventPublisher.java +++ b/src/main/java/gov/nist/csd/pm/common/event/EventPublisher.java @@ -1,7 +1,6 @@ package gov.nist.csd.pm.common.event; import gov.nist.csd.pm.common.exception.PMException; -import gov.nist.csd.pm.common.obligation.EventContext; /** * Interface for emitting events to be processed by an EPP. diff --git a/src/main/java/gov/nist/csd/pm/common/event/EventSubscriber.java b/src/main/java/gov/nist/csd/pm/common/event/EventSubscriber.java index 8e9d8e7ea..98b7f2bcc 100644 --- a/src/main/java/gov/nist/csd/pm/common/event/EventSubscriber.java +++ b/src/main/java/gov/nist/csd/pm/common/event/EventSubscriber.java @@ -1,7 +1,6 @@ package gov.nist.csd.pm.common.event; import gov.nist.csd.pm.common.exception.PMException; -import gov.nist.csd.pm.common.obligation.EventContext; /** * Interface for processing EventContexts. diff --git a/src/main/java/gov/nist/csd/pm/common/obligation/EventPattern.java b/src/main/java/gov/nist/csd/pm/common/obligation/EventPattern.java index f0ba2b99a..966cc5770 100644 --- a/src/main/java/gov/nist/csd/pm/common/obligation/EventPattern.java +++ b/src/main/java/gov/nist/csd/pm/common/obligation/EventPattern.java @@ -1,5 +1,6 @@ package gov.nist.csd.pm.common.obligation; +import gov.nist.csd.pm.common.event.EventContext; import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.common.op.Operation; diff --git a/src/main/java/gov/nist/csd/pm/common/obligation/Response.java b/src/main/java/gov/nist/csd/pm/common/obligation/Response.java index fb5991443..fd8580d8d 100644 --- a/src/main/java/gov/nist/csd/pm/common/obligation/Response.java +++ b/src/main/java/gov/nist/csd/pm/common/obligation/Response.java @@ -1,5 +1,6 @@ package gov.nist.csd.pm.common.obligation; +import gov.nist.csd.pm.common.event.EventContext; import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.pml.statement.PMLStatement; import gov.nist.csd.pm.pap.pml.value.VoidValue; diff --git a/src/main/java/gov/nist/csd/pm/common/op/Operation.java b/src/main/java/gov/nist/csd/pm/common/op/Operation.java index 689501f33..b9775c75e 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/Operation.java +++ b/src/main/java/gov/nist/csd/pm/common/op/Operation.java @@ -3,6 +3,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.common.exception.OperandsDoNotMatchException; import gov.nist.csd.pm.common.executable.AdminExecutable; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.model.context.UserContext; import java.util.*; diff --git a/src/main/java/gov/nist/csd/pm/common/op/PreparedOperation.java b/src/main/java/gov/nist/csd/pm/common/op/PreparedOperation.java index 288a45214..ff3bed30b 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/PreparedOperation.java +++ b/src/main/java/gov/nist/csd/pm/common/op/PreparedOperation.java @@ -1,8 +1,9 @@ package gov.nist.csd.pm.common.op; import gov.nist.csd.pm.common.exception.PMException; -import gov.nist.csd.pm.common.obligation.EventContext; +import gov.nist.csd.pm.common.event.EventContext; import gov.nist.csd.pm.pap.PAP; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.model.context.UserContext; import java.io.Serializable; diff --git a/src/main/java/gov/nist/csd/pm/common/op/graph/AssignOp.java b/src/main/java/gov/nist/csd/pm/common/op/graph/AssignOp.java index 6d3c518cb..652f201b7 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/graph/AssignOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/graph/AssignOp.java @@ -2,14 +2,14 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.model.context.UserContext; import java.util.List; import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.ASSIGN; -import static gov.nist.csd.pm.common.op.AdminAccessRights.ASSIGN_TO; +import static gov.nist.csd.pm.pap.AdminAccessRights.ASSIGN; +import static gov.nist.csd.pm.pap.AdminAccessRights.ASSIGN_TO; public class AssignOp extends GraphOp { diff --git a/src/main/java/gov/nist/csd/pm/common/op/graph/AssociateOp.java b/src/main/java/gov/nist/csd/pm/common/op/graph/AssociateOp.java index 577a33d19..3b89cc509 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/graph/AssociateOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/graph/AssociateOp.java @@ -3,13 +3,13 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.common.graph.relationship.AccessRightSet; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.model.context.UserContext; import java.util.List; import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.*; +import static gov.nist.csd.pm.pap.AdminAccessRights.*; public class AssociateOp extends GraphOp { diff --git a/src/main/java/gov/nist/csd/pm/common/op/graph/CreateNodeOp.java b/src/main/java/gov/nist/csd/pm/common/op/graph/CreateNodeOp.java index 452fec3f4..755f7c999 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/graph/CreateNodeOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/graph/CreateNodeOp.java @@ -1,7 +1,7 @@ package gov.nist.csd.pm.common.op.graph; import gov.nist.csd.pm.common.exception.PMException; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.model.context.UserContext; import java.util.*; diff --git a/src/main/java/gov/nist/csd/pm/common/op/graph/CreateObjectAttributeOp.java b/src/main/java/gov/nist/csd/pm/common/op/graph/CreateObjectAttributeOp.java index fc28cab25..443126572 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/graph/CreateObjectAttributeOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/graph/CreateObjectAttributeOp.java @@ -6,7 +6,7 @@ import java.util.Collection; import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.CREATE_OBJECT_ATTRIBUTE; +import static gov.nist.csd.pm.pap.AdminAccessRights.CREATE_OBJECT_ATTRIBUTE; public class CreateObjectAttributeOp extends CreateNodeOp{ diff --git a/src/main/java/gov/nist/csd/pm/common/op/graph/CreateObjectOp.java b/src/main/java/gov/nist/csd/pm/common/op/graph/CreateObjectOp.java index 31d0edc1d..705c51d01 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/graph/CreateObjectOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/graph/CreateObjectOp.java @@ -6,7 +6,7 @@ import java.util.Collection; import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.CREATE_OBJECT; +import static gov.nist.csd.pm.pap.AdminAccessRights.CREATE_OBJECT; public class CreateObjectOp extends CreateNodeOp{ public CreateObjectOp() { diff --git a/src/main/java/gov/nist/csd/pm/common/op/graph/CreatePolicyClassOp.java b/src/main/java/gov/nist/csd/pm/common/op/graph/CreatePolicyClassOp.java index 3301b21eb..bd787c2f7 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/graph/CreatePolicyClassOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/graph/CreatePolicyClassOp.java @@ -1,7 +1,7 @@ package gov.nist.csd.pm.common.op.graph; import gov.nist.csd.pm.common.exception.PMException; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.pap.admin.AdminPolicyNode; import gov.nist.csd.pm.pap.query.model.context.UserContext; @@ -9,7 +9,7 @@ import java.util.List; import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.CREATE_POLICY_CLASS; +import static gov.nist.csd.pm.pap.AdminAccessRights.CREATE_POLICY_CLASS; public class CreatePolicyClassOp extends CreateNodeOp{ diff --git a/src/main/java/gov/nist/csd/pm/common/op/graph/CreateUserAttributeOp.java b/src/main/java/gov/nist/csd/pm/common/op/graph/CreateUserAttributeOp.java index 7d0fa9abe..306dd335e 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/graph/CreateUserAttributeOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/graph/CreateUserAttributeOp.java @@ -7,7 +7,7 @@ import java.util.Collection; import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.CREATE_USER_ATTRIBUTE; +import static gov.nist.csd.pm.pap.AdminAccessRights.CREATE_USER_ATTRIBUTE; public class CreateUserAttributeOp extends CreateNodeOp{ public CreateUserAttributeOp() { diff --git a/src/main/java/gov/nist/csd/pm/common/op/graph/CreateUserOp.java b/src/main/java/gov/nist/csd/pm/common/op/graph/CreateUserOp.java index ee3636d06..d5e404db1 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/graph/CreateUserOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/graph/CreateUserOp.java @@ -7,7 +7,7 @@ import java.util.Collection; import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.CREATE_USER; +import static gov.nist.csd.pm.pap.AdminAccessRights.CREATE_USER; public class CreateUserOp extends CreateNodeOp{ public CreateUserOp() { diff --git a/src/main/java/gov/nist/csd/pm/common/op/graph/DeassignOp.java b/src/main/java/gov/nist/csd/pm/common/op/graph/DeassignOp.java index 912815ef2..ca0cf5360 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/graph/DeassignOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/graph/DeassignOp.java @@ -3,13 +3,13 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.model.context.UserContext; import java.util.List; import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.*; +import static gov.nist.csd.pm.pap.AdminAccessRights.*; public class DeassignOp extends GraphOp { diff --git a/src/main/java/gov/nist/csd/pm/common/op/graph/DeleteNodeOp.java b/src/main/java/gov/nist/csd/pm/common/op/graph/DeleteNodeOp.java index cd89c84d5..1af191d8d 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/graph/DeleteNodeOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/graph/DeleteNodeOp.java @@ -3,7 +3,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.model.context.UserContext; import java.util.Collection; diff --git a/src/main/java/gov/nist/csd/pm/common/op/graph/DeleteObjectAttributeOp.java b/src/main/java/gov/nist/csd/pm/common/op/graph/DeleteObjectAttributeOp.java index 1d6a73637..c2c41aa11 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/graph/DeleteObjectAttributeOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/graph/DeleteObjectAttributeOp.java @@ -1,6 +1,6 @@ package gov.nist.csd.pm.common.op.graph; -import static gov.nist.csd.pm.common.op.AdminAccessRights.*; +import static gov.nist.csd.pm.pap.AdminAccessRights.*; public class DeleteObjectAttributeOp extends DeleteNodeOp{ public DeleteObjectAttributeOp() { diff --git a/src/main/java/gov/nist/csd/pm/common/op/graph/DeleteObjectOp.java b/src/main/java/gov/nist/csd/pm/common/op/graph/DeleteObjectOp.java index 8553171a3..d9090ba15 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/graph/DeleteObjectOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/graph/DeleteObjectOp.java @@ -1,6 +1,6 @@ package gov.nist.csd.pm.common.op.graph; -import static gov.nist.csd.pm.common.op.AdminAccessRights.*; +import static gov.nist.csd.pm.pap.AdminAccessRights.*; public class DeleteObjectOp extends DeleteNodeOp { public DeleteObjectOp() { diff --git a/src/main/java/gov/nist/csd/pm/common/op/graph/DeletePolicyClassOp.java b/src/main/java/gov/nist/csd/pm/common/op/graph/DeletePolicyClassOp.java index 220a483d1..87856c4f6 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/graph/DeletePolicyClassOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/graph/DeletePolicyClassOp.java @@ -1,7 +1,7 @@ package gov.nist.csd.pm.common.op.graph; -import static gov.nist.csd.pm.common.op.AdminAccessRights.DELETE_POLICY_CLASS; -import static gov.nist.csd.pm.common.op.AdminAccessRights.DELETE_POLICY_CLASS_FROM; +import static gov.nist.csd.pm.pap.AdminAccessRights.DELETE_POLICY_CLASS; +import static gov.nist.csd.pm.pap.AdminAccessRights.DELETE_POLICY_CLASS_FROM; public class DeletePolicyClassOp extends DeleteNodeOp { diff --git a/src/main/java/gov/nist/csd/pm/common/op/graph/DeleteUserAttributeOp.java b/src/main/java/gov/nist/csd/pm/common/op/graph/DeleteUserAttributeOp.java index aa5e63b6b..9a31fc3d9 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/graph/DeleteUserAttributeOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/graph/DeleteUserAttributeOp.java @@ -1,7 +1,7 @@ package gov.nist.csd.pm.common.op.graph; -import static gov.nist.csd.pm.common.op.AdminAccessRights.DELETE_USER_ATTRIBUTE; -import static gov.nist.csd.pm.common.op.AdminAccessRights.DELETE_USER_ATTRIBUTE_FROM; +import static gov.nist.csd.pm.pap.AdminAccessRights.DELETE_USER_ATTRIBUTE; +import static gov.nist.csd.pm.pap.AdminAccessRights.DELETE_USER_ATTRIBUTE_FROM; public class DeleteUserAttributeOp extends DeleteNodeOp{ public DeleteUserAttributeOp() { diff --git a/src/main/java/gov/nist/csd/pm/common/op/graph/DeleteUserOp.java b/src/main/java/gov/nist/csd/pm/common/op/graph/DeleteUserOp.java index e74f94d59..c24e5923b 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/graph/DeleteUserOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/graph/DeleteUserOp.java @@ -1,7 +1,7 @@ package gov.nist.csd.pm.common.op.graph; -import static gov.nist.csd.pm.common.op.AdminAccessRights.DELETE_USER; -import static gov.nist.csd.pm.common.op.AdminAccessRights.DELETE_USER_FROM; +import static gov.nist.csd.pm.pap.AdminAccessRights.DELETE_USER; +import static gov.nist.csd.pm.pap.AdminAccessRights.DELETE_USER_FROM; public class DeleteUserOp extends DeleteNodeOp{ public DeleteUserOp() { diff --git a/src/main/java/gov/nist/csd/pm/common/op/graph/DissociateOp.java b/src/main/java/gov/nist/csd/pm/common/op/graph/DissociateOp.java index 4680b3920..8faf92fae 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/graph/DissociateOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/graph/DissociateOp.java @@ -3,13 +3,13 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.model.context.UserContext; import java.util.List; import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.*; +import static gov.nist.csd.pm.pap.AdminAccessRights.*; public class DissociateOp extends GraphOp { diff --git a/src/main/java/gov/nist/csd/pm/common/op/graph/SetNodePropertiesOp.java b/src/main/java/gov/nist/csd/pm/common/op/graph/SetNodePropertiesOp.java index d5f2b3e74..5a1aec406 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/graph/SetNodePropertiesOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/graph/SetNodePropertiesOp.java @@ -3,13 +3,13 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.model.context.UserContext; import java.util.List; import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.SET_NODE_PROPERTIES; +import static gov.nist.csd.pm.pap.AdminAccessRights.SET_NODE_PROPERTIES; public class SetNodePropertiesOp extends GraphOp { diff --git a/src/main/java/gov/nist/csd/pm/common/op/obligation/CreateObligationOp.java b/src/main/java/gov/nist/csd/pm/common/op/obligation/CreateObligationOp.java index e3166758a..39f887ca1 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/obligation/CreateObligationOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/obligation/CreateObligationOp.java @@ -7,7 +7,7 @@ import java.util.List; import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.CREATE_OBLIGATION; +import static gov.nist.csd.pm.pap.AdminAccessRights.CREATE_OBLIGATION; public class CreateObligationOp extends ObligationOp { diff --git a/src/main/java/gov/nist/csd/pm/common/op/obligation/DeleteObligationOp.java b/src/main/java/gov/nist/csd/pm/common/op/obligation/DeleteObligationOp.java index 520a338ee..03f04d7d0 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/obligation/DeleteObligationOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/obligation/DeleteObligationOp.java @@ -5,7 +5,7 @@ import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.DELETE_OBLIGATION; +import static gov.nist.csd.pm.pap.AdminAccessRights.DELETE_OBLIGATION; public class DeleteObligationOp extends ObligationOp { diff --git a/src/main/java/gov/nist/csd/pm/common/op/obligation/ObligationOp.java b/src/main/java/gov/nist/csd/pm/common/op/obligation/ObligationOp.java index 85aa049be..1a208c5e7 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/obligation/ObligationOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/obligation/ObligationOp.java @@ -7,7 +7,7 @@ import gov.nist.csd.pm.pap.pml.pattern.ReferencedNodes; import gov.nist.csd.pm.pap.admin.AdminPolicyNode; import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.pattern.operand.OperandPatternExpression; import gov.nist.csd.pm.pap.query.model.context.UserContext; diff --git a/src/main/java/gov/nist/csd/pm/common/op/operation/CreateAdminOperationOp.java b/src/main/java/gov/nist/csd/pm/common/op/operation/CreateAdminOperationOp.java index cb11ccc59..e9fa2514b 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/operation/CreateAdminOperationOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/operation/CreateAdminOperationOp.java @@ -2,7 +2,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.pap.admin.AdminPolicyNode; import gov.nist.csd.pm.pap.query.model.context.UserContext; @@ -10,7 +10,7 @@ import java.util.List; import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.CREATE_ADMIN_OPERATION; +import static gov.nist.csd.pm.pap.AdminAccessRights.CREATE_ADMIN_OPERATION; public class CreateAdminOperationOp extends Operation { diff --git a/src/main/java/gov/nist/csd/pm/common/op/operation/DeleteAdminOperationOp.java b/src/main/java/gov/nist/csd/pm/common/op/operation/DeleteAdminOperationOp.java index 9d857d029..f405f5fae 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/operation/DeleteAdminOperationOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/operation/DeleteAdminOperationOp.java @@ -4,13 +4,13 @@ import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.pap.admin.AdminPolicyNode; import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.model.context.UserContext; import java.util.List; import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.DELETE_ADMIN_OPERATION; +import static gov.nist.csd.pm.pap.AdminAccessRights.DELETE_ADMIN_OPERATION; public class DeleteAdminOperationOp extends Operation { diff --git a/src/main/java/gov/nist/csd/pm/common/op/operation/SetResourceOperationsOp.java b/src/main/java/gov/nist/csd/pm/common/op/operation/SetResourceOperationsOp.java index 420abb0d8..75f31b9db 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/operation/SetResourceOperationsOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/operation/SetResourceOperationsOp.java @@ -5,13 +5,13 @@ import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.pap.admin.AdminPolicyNode; import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.model.context.UserContext; import java.util.List; import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.SET_RESOURCE_OPERATIONS; +import static gov.nist.csd.pm.pap.AdminAccessRights.SET_RESOURCE_OPERATIONS; public class SetResourceOperationsOp extends Operation { diff --git a/src/main/java/gov/nist/csd/pm/common/op/prohibition/CreateProhibitionOp.java b/src/main/java/gov/nist/csd/pm/common/op/prohibition/CreateProhibitionOp.java index 69e7bb862..6aac40e98 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/prohibition/CreateProhibitionOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/prohibition/CreateProhibitionOp.java @@ -8,7 +8,7 @@ import java.util.*; -import static gov.nist.csd.pm.common.op.AdminAccessRights.*; +import static gov.nist.csd.pm.pap.AdminAccessRights.*; public class CreateProhibitionOp extends ProhibitionOp { diff --git a/src/main/java/gov/nist/csd/pm/common/op/prohibition/DeleteProhibitionOp.java b/src/main/java/gov/nist/csd/pm/common/op/prohibition/DeleteProhibitionOp.java index 5f62cb740..b6e3651d8 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/prohibition/DeleteProhibitionOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/prohibition/DeleteProhibitionOp.java @@ -5,7 +5,7 @@ import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.*; +import static gov.nist.csd.pm.pap.AdminAccessRights.*; public class DeleteProhibitionOp extends ProhibitionOp { diff --git a/src/main/java/gov/nist/csd/pm/common/op/prohibition/ProhibitionOp.java b/src/main/java/gov/nist/csd/pm/common/op/prohibition/ProhibitionOp.java index 1f8b22980..16b9eddfb 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/prohibition/ProhibitionOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/prohibition/ProhibitionOp.java @@ -5,7 +5,7 @@ import gov.nist.csd.pm.common.prohibition.ProhibitionSubject; import gov.nist.csd.pm.pap.admin.AdminPolicyNode; import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.model.context.UserContext; import java.util.*; diff --git a/src/main/java/gov/nist/csd/pm/common/op/routine/CreateAdminRoutineOp.java b/src/main/java/gov/nist/csd/pm/common/op/routine/CreateAdminRoutineOp.java index c5678ab4b..e0149b891 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/routine/CreateAdminRoutineOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/routine/CreateAdminRoutineOp.java @@ -4,14 +4,14 @@ import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.pap.admin.AdminPolicyNode; import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.model.context.UserContext; import gov.nist.csd.pm.common.routine.Routine; import java.util.List; import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.CREATE_ADMIN_ROUTINE; +import static gov.nist.csd.pm.pap.AdminAccessRights.CREATE_ADMIN_ROUTINE; public class CreateAdminRoutineOp extends Operation { diff --git a/src/main/java/gov/nist/csd/pm/common/op/routine/DeleteAdminRoutineOp.java b/src/main/java/gov/nist/csd/pm/common/op/routine/DeleteAdminRoutineOp.java index ac7325e2c..abd4b3198 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/routine/DeleteAdminRoutineOp.java +++ b/src/main/java/gov/nist/csd/pm/common/op/routine/DeleteAdminRoutineOp.java @@ -4,13 +4,13 @@ import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.pap.admin.AdminPolicyNode; import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.model.context.UserContext; import java.util.List; import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.DELETE_ADMIN_ROUTINE; +import static gov.nist.csd.pm.pap.AdminAccessRights.DELETE_ADMIN_ROUTINE; public class DeleteAdminRoutineOp extends Operation { diff --git a/src/main/java/gov/nist/csd/pm/epp/EPP.java b/src/main/java/gov/nist/csd/pm/epp/EPP.java index 3682d33dd..6ccf4388e 100644 --- a/src/main/java/gov/nist/csd/pm/epp/EPP.java +++ b/src/main/java/gov/nist/csd/pm/epp/EPP.java @@ -1,7 +1,7 @@ package gov.nist.csd.pm.epp; import gov.nist.csd.pm.common.event.EventSubscriber; -import gov.nist.csd.pm.common.obligation.EventContext; +import gov.nist.csd.pm.common.event.EventContext; import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.pdp.PDP; import gov.nist.csd.pm.common.exception.PMException; diff --git a/src/main/java/gov/nist/csd/pm/impl/memory/pap/store/MemoryGraphStore.java b/src/main/java/gov/nist/csd/pm/impl/memory/pap/store/MemoryGraphStore.java index 5a76e51a9..bcef41332 100644 --- a/src/main/java/gov/nist/csd/pm/impl/memory/pap/store/MemoryGraphStore.java +++ b/src/main/java/gov/nist/csd/pm/impl/memory/pap/store/MemoryGraphStore.java @@ -14,6 +14,7 @@ import java.util.*; import java.util.concurrent.atomic.AtomicBoolean; +import static gov.nist.csd.pm.common.graph.node.NodeType.*; import static gov.nist.csd.pm.common.graph.node.Properties.WILDCARD; public class MemoryGraphStore extends MemoryStore implements GraphStore { diff --git a/src/main/java/gov/nist/csd/pm/pap/AccessRightResolver.java b/src/main/java/gov/nist/csd/pm/pap/AccessRightResolver.java index 3e14b30b7..8389bb4b2 100644 --- a/src/main/java/gov/nist/csd/pm/pap/AccessRightResolver.java +++ b/src/main/java/gov/nist/csd/pm/pap/AccessRightResolver.java @@ -8,8 +8,8 @@ import java.util.*; -import static gov.nist.csd.pm.common.op.AdminAccessRights.*; -import static gov.nist.csd.pm.common.op.AdminAccessRights.ALL_RESOURCE_ACCESS_RIGHTS; +import static gov.nist.csd.pm.pap.AdminAccessRights.*; +import static gov.nist.csd.pm.pap.AdminAccessRights.ALL_RESOURCE_ACCESS_RIGHTS; public class AccessRightResolver { diff --git a/src/main/java/gov/nist/csd/pm/common/op/AdminAccessRights.java b/src/main/java/gov/nist/csd/pm/pap/AdminAccessRights.java similarity index 99% rename from src/main/java/gov/nist/csd/pm/common/op/AdminAccessRights.java rename to src/main/java/gov/nist/csd/pm/pap/AdminAccessRights.java index d806bfd60..3c9aaa2f8 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/AdminAccessRights.java +++ b/src/main/java/gov/nist/csd/pm/pap/AdminAccessRights.java @@ -1,4 +1,4 @@ -package gov.nist.csd.pm.common.op; +package gov.nist.csd.pm.pap; import gov.nist.csd.pm.common.graph.relationship.AccessRightSet; diff --git a/src/main/java/gov/nist/csd/pm/common/op/AdminOperations.java b/src/main/java/gov/nist/csd/pm/pap/AdminOperations.java similarity index 96% rename from src/main/java/gov/nist/csd/pm/common/op/AdminOperations.java rename to src/main/java/gov/nist/csd/pm/pap/AdminOperations.java index 4c6f2c4a1..a11e6c946 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/AdminOperations.java +++ b/src/main/java/gov/nist/csd/pm/pap/AdminOperations.java @@ -1,6 +1,7 @@ -package gov.nist.csd.pm.common.op; +package gov.nist.csd.pm.pap; import gov.nist.csd.pm.common.exception.PMException; +import gov.nist.csd.pm.common.op.Operation; import gov.nist.csd.pm.common.op.graph.*; import gov.nist.csd.pm.common.op.obligation.CreateObligationOp; import gov.nist.csd.pm.common.op.obligation.DeleteObligationOp; diff --git a/src/main/java/gov/nist/csd/pm/pap/GraphModifier.java b/src/main/java/gov/nist/csd/pm/pap/GraphModifier.java index 0fb38ff01..ad2cc8c93 100644 --- a/src/main/java/gov/nist/csd/pm/pap/GraphModifier.java +++ b/src/main/java/gov/nist/csd/pm/pap/GraphModifier.java @@ -24,8 +24,9 @@ import java.util.Map; import java.util.concurrent.atomic.AtomicBoolean; -import static gov.nist.csd.pm.common.op.AdminAccessRights.*; -import static gov.nist.csd.pm.common.op.AdminAccessRights.wildcardAccessRights; +import static gov.nist.csd.pm.common.graph.node.NodeType.*; +import static gov.nist.csd.pm.pap.AdminAccessRights.*; +import static gov.nist.csd.pm.pap.AdminAccessRights.wildcardAccessRights; public class GraphModifier extends Modifier implements GraphModification { diff --git a/src/main/java/gov/nist/csd/pm/pap/OperationsModifier.java b/src/main/java/gov/nist/csd/pm/pap/OperationsModifier.java index e2cfc8e51..960e67059 100644 --- a/src/main/java/gov/nist/csd/pm/pap/OperationsModifier.java +++ b/src/main/java/gov/nist/csd/pm/pap/OperationsModifier.java @@ -5,12 +5,11 @@ import gov.nist.csd.pm.common.exception.AdminAccessRightExistsException; import gov.nist.csd.pm.common.exception.OperationExistsException; import gov.nist.csd.pm.pap.modification.OperationsModification; -import gov.nist.csd.pm.common.op.AdminOperations; import gov.nist.csd.pm.common.op.Operation; import gov.nist.csd.pm.pap.store.PolicyStore; -import static gov.nist.csd.pm.common.op.AdminAccessRights.isAdminAccessRight; -import static gov.nist.csd.pm.common.op.AdminAccessRights.isWildcardAccessRight; +import static gov.nist.csd.pm.pap.AdminAccessRights.isAdminAccessRight; +import static gov.nist.csd.pm.pap.AdminAccessRights.isWildcardAccessRight; public class OperationsModifier extends Modifier implements OperationsModification { diff --git a/src/main/java/gov/nist/csd/pm/pap/PAP.java b/src/main/java/gov/nist/csd/pm/pap/PAP.java index 75a9f740d..cff8b4e12 100644 --- a/src/main/java/gov/nist/csd/pm/pap/PAP.java +++ b/src/main/java/gov/nist/csd/pm/pap/PAP.java @@ -12,8 +12,8 @@ import gov.nist.csd.pm.pap.pml.value.Value; import gov.nist.csd.pm.pap.query.PolicyQuery; import gov.nist.csd.pm.pap.query.model.context.UserContext; -import gov.nist.csd.pm.common.serialization.PolicyDeserializer; -import gov.nist.csd.pm.common.serialization.PolicySerializer; +import gov.nist.csd.pm.pap.serialization.PolicyDeserializer; +import gov.nist.csd.pm.pap.serialization.PolicySerializer; import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.store.PolicyStore; import gov.nist.csd.pm.common.tx.Transactional; diff --git a/src/main/java/gov/nist/csd/pm/common/op/PrivilegeChecker.java b/src/main/java/gov/nist/csd/pm/pap/PrivilegeChecker.java similarity index 96% rename from src/main/java/gov/nist/csd/pm/common/op/PrivilegeChecker.java rename to src/main/java/gov/nist/csd/pm/pap/PrivilegeChecker.java index 705b12759..f886c3e5e 100644 --- a/src/main/java/gov/nist/csd/pm/common/op/PrivilegeChecker.java +++ b/src/main/java/gov/nist/csd/pm/pap/PrivilegeChecker.java @@ -1,12 +1,11 @@ -package gov.nist.csd.pm.common.op; +package gov.nist.csd.pm.pap; import gov.nist.csd.pm.pap.admin.AdminPolicyNode; -import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.pml.pattern.Pattern; import gov.nist.csd.pm.pap.pml.pattern.ReferencedNodes; import gov.nist.csd.pm.pap.query.model.context.TargetContext; -import gov.nist.csd.pm.pdp.exception.UnauthorizedException; +import gov.nist.csd.pm.pdp.UnauthorizedException; import gov.nist.csd.pm.common.graph.relationship.AccessRightSet; import gov.nist.csd.pm.pap.query.model.context.UserContext; diff --git a/src/main/java/gov/nist/csd/pm/pap/pml/compiler/visitor/AssignStmtVisitor.java b/src/main/java/gov/nist/csd/pm/pap/pml/compiler/visitor/AssignStmtVisitor.java index be7dc9c7d..b7cf47b8c 100644 --- a/src/main/java/gov/nist/csd/pm/pap/pml/compiler/visitor/AssignStmtVisitor.java +++ b/src/main/java/gov/nist/csd/pm/pap/pml/compiler/visitor/AssignStmtVisitor.java @@ -1,100 +1,13 @@ package gov.nist.csd.pm.pap.pml.compiler.visitor; -import com.google.protobuf.ByteString; -import com.google.protobuf.Descriptors; -import com.google.protobuf.Message; -import com.google.protobuf.UnknownFieldSet; -import gov.nist.csd.pm.pap.op.routine.proto.CreateAdminRoutineOpOrBuilder; import gov.nist.csd.pm.pap.pml.antlr.PMLParser; import gov.nist.csd.pm.pap.pml.expression.Expression; import gov.nist.csd.pm.pap.pml.context.VisitorContext; import gov.nist.csd.pm.pap.pml.statement.operation.AssignStatement; import gov.nist.csd.pm.pap.pml.type.Type; -import java.util.List; -import java.util.Map; - public class AssignStmtVisitor extends PMLBaseVisitor { - public static void main(String[] args) { - new CreateAdminRoutineOpOrBuilder() { - @Override - public Message getDefaultInstanceForType() { - return null; - } - - @Override - public boolean isInitialized() { - return false; - } - - @Override - public List findInitializationErrors() { - return List.of(); - } - - @Override - public String getInitializationErrorString() { - return ""; - } - - @Override - public Descriptors.Descriptor getDescriptorForType() { - return null; - } - - @Override - public Map getAllFields() { - return Map.of(); - } - - @Override - public boolean hasOneof(Descriptors.OneofDescriptor oneof) { - return false; - } - - @Override - public Descriptors.FieldDescriptor getOneofFieldDescriptor(Descriptors.OneofDescriptor oneof) { - return null; - } - - @Override - public boolean hasField(Descriptors.FieldDescriptor field) { - return false; - } - - @Override - public Object getField(Descriptors.FieldDescriptor field) { - return null; - } - - @Override - public int getRepeatedFieldCount(Descriptors.FieldDescriptor field) { - return 0; - } - - @Override - public Object getRepeatedField(Descriptors.FieldDescriptor field, int index) { - return null; - } - - @Override - public UnknownFieldSet getUnknownFields() { - return null; - } - - @Override - public String getPml() { - return ""; - } - - @Override - public ByteString getPmlBytes() { - return null; - } - }; - } - public AssignStmtVisitor(VisitorContext visitorCtx) { super(visitorCtx); } diff --git a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/PMLOperationWrapper.java b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/PMLOperationWrapper.java index c41f619b0..af48bf497 100644 --- a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/PMLOperationWrapper.java +++ b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/PMLOperationWrapper.java @@ -3,7 +3,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.type.Type; import gov.nist.csd.pm.pap.pml.value.Value; import gov.nist.csd.pm.pap.query.model.context.UserContext; diff --git a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/PMLStmtsOperation.java b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/PMLStmtsOperation.java index 9c9ad5f93..894800cae 100644 --- a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/PMLStmtsOperation.java +++ b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/PMLStmtsOperation.java @@ -2,7 +2,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.context.ExecutionContext; import gov.nist.csd.pm.pap.pml.executable.PMLExecutableSignature; import gov.nist.csd.pm.pap.pml.statement.PMLStatementSerializable; diff --git a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/Append.java b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/Append.java index 5a656e7eb..f8fba386e 100644 --- a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/Append.java +++ b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/Append.java @@ -2,7 +2,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.executable.operation.PMLOperation; import gov.nist.csd.pm.pap.pml.type.Type; import gov.nist.csd.pm.pap.pml.value.ArrayValue; diff --git a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/AppendAll.java b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/AppendAll.java index ced2e5754..2d547ac21 100644 --- a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/AppendAll.java +++ b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/AppendAll.java @@ -2,7 +2,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.executable.operation.PMLOperation; import gov.nist.csd.pm.pap.pml.type.Type; import gov.nist.csd.pm.pap.pml.value.ArrayValue; diff --git a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/Concat.java b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/Concat.java index 5ca04b352..9124b5b0a 100644 --- a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/Concat.java +++ b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/Concat.java @@ -3,7 +3,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.executable.operation.PMLOperation; import gov.nist.csd.pm.pap.pml.type.Type; import gov.nist.csd.pm.pap.pml.value.StringValue; diff --git a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/Contains.java b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/Contains.java index 8b675c4e5..d79e8dc14 100644 --- a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/Contains.java +++ b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/Contains.java @@ -2,7 +2,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.executable.operation.PMLOperation; import gov.nist.csd.pm.pap.pml.type.Type; import gov.nist.csd.pm.pap.pml.value.BoolValue; diff --git a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/ContainsKey.java b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/ContainsKey.java index 6fefd9788..cc874e193 100644 --- a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/ContainsKey.java +++ b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/ContainsKey.java @@ -3,7 +3,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.executable.operation.PMLOperation; import gov.nist.csd.pm.pap.pml.type.Type; import gov.nist.csd.pm.pap.pml.value.BoolValue; diff --git a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/Equals.java b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/Equals.java index 6795828b1..b72349f88 100644 --- a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/Equals.java +++ b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/Equals.java @@ -3,7 +3,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.executable.operation.PMLOperation; import gov.nist.csd.pm.pap.pml.type.Type; import gov.nist.csd.pm.pap.pml.value.BoolValue; diff --git a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetAdjacentAscendants.java b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetAdjacentAscendants.java index 8c6dc6cba..f67747a91 100644 --- a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetAdjacentAscendants.java +++ b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetAdjacentAscendants.java @@ -2,7 +2,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.executable.operation.PMLOperation; import gov.nist.csd.pm.pap.pml.type.Type; import gov.nist.csd.pm.pap.pml.value.ArrayValue; diff --git a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetAdjacentDescendants.java b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetAdjacentDescendants.java index 2d7c9c9c8..bdeb24745 100644 --- a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetAdjacentDescendants.java +++ b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetAdjacentDescendants.java @@ -3,7 +3,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.executable.operation.PMLOperation; import gov.nist.csd.pm.pap.pml.type.Type; import gov.nist.csd.pm.pap.pml.value.ArrayValue; diff --git a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetAssociationsWithSource.java b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetAssociationsWithSource.java index 5b8f7234c..face79738 100644 --- a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetAssociationsWithSource.java +++ b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetAssociationsWithSource.java @@ -3,7 +3,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.common.graph.relationship.Association; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.executable.operation.PMLOperation; import gov.nist.csd.pm.pap.pml.type.Type; import gov.nist.csd.pm.pap.pml.value.ArrayValue; diff --git a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetAssociationsWithTarget.java b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetAssociationsWithTarget.java index 872fda799..23ca4f083 100644 --- a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetAssociationsWithTarget.java +++ b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetAssociationsWithTarget.java @@ -4,7 +4,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.common.graph.relationship.Association; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.executable.operation.PMLOperation; import gov.nist.csd.pm.pap.pml.type.Type; import gov.nist.csd.pm.pap.pml.value.ArrayValue; diff --git a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetNode.java b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetNode.java index 25f5e8b22..9b9a0e794 100644 --- a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetNode.java +++ b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetNode.java @@ -4,7 +4,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.common.graph.node.Node; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.executable.operation.PMLOperation; import gov.nist.csd.pm.pap.pml.type.Type; import gov.nist.csd.pm.pap.pml.value.Value; diff --git a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetNodeProperties.java b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetNodeProperties.java index 7f709eb40..14b26b42f 100644 --- a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetNodeProperties.java +++ b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetNodeProperties.java @@ -3,7 +3,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.common.graph.node.Node; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.executable.operation.PMLOperation; import gov.nist.csd.pm.pap.pml.type.Type; import gov.nist.csd.pm.pap.pml.value.MapValue; diff --git a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetNodeType.java b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetNodeType.java index 0e6ad8ac8..3810349c7 100644 --- a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetNodeType.java +++ b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/GetNodeType.java @@ -4,7 +4,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.common.graph.node.Node; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.executable.operation.PMLOperation; import gov.nist.csd.pm.pap.pml.type.Type; import gov.nist.csd.pm.pap.pml.value.StringValue; diff --git a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/HasPropertyKey.java b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/HasPropertyKey.java index 448c3e1c3..9d52fff5e 100644 --- a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/HasPropertyKey.java +++ b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/HasPropertyKey.java @@ -4,7 +4,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.common.graph.node.Node; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.executable.operation.PMLOperation; import gov.nist.csd.pm.pap.pml.type.Type; import gov.nist.csd.pm.pap.pml.value.BoolValue; diff --git a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/HasPropertyValue.java b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/HasPropertyValue.java index 05d4293c3..888b52a07 100644 --- a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/HasPropertyValue.java +++ b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/HasPropertyValue.java @@ -4,7 +4,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.common.graph.node.Node; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.executable.operation.PMLOperation; import gov.nist.csd.pm.pap.pml.type.Type; import gov.nist.csd.pm.pap.pml.value.BoolValue; diff --git a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/NodeExists.java b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/NodeExists.java index 30dc51097..bc449d5e2 100644 --- a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/NodeExists.java +++ b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/NodeExists.java @@ -3,7 +3,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.executable.operation.PMLOperation; import gov.nist.csd.pm.pap.pml.type.Type; import gov.nist.csd.pm.pap.pml.value.BoolValue; diff --git a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/Search.java b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/Search.java index 36a1721ce..fd3dba512 100644 --- a/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/Search.java +++ b/src/main/java/gov/nist/csd/pm/pap/pml/executable/operation/builtin/Search.java @@ -4,7 +4,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.common.graph.node.NodeType; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.executable.operation.PMLOperation; import gov.nist.csd.pm.pap.pml.type.Type; import gov.nist.csd.pm.pap.pml.value.ArrayValue; diff --git a/src/main/java/gov/nist/csd/pm/pap/pml/statement/operation/CheckStatement.java b/src/main/java/gov/nist/csd/pm/pap/pml/statement/operation/CheckStatement.java index 604845aa2..48cb703a4 100644 --- a/src/main/java/gov/nist/csd/pm/pap/pml/statement/operation/CheckStatement.java +++ b/src/main/java/gov/nist/csd/pm/pap/pml/statement/operation/CheckStatement.java @@ -2,7 +2,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.context.ExecutionContext; import gov.nist.csd.pm.pap.pml.expression.Expression; import gov.nist.csd.pm.pap.pml.statement.PMLStatement; diff --git a/src/main/java/gov/nist/csd/pm/pap/pml/statement/operation/CreateProhibitionStatement.java b/src/main/java/gov/nist/csd/pm/pap/pml/statement/operation/CreateProhibitionStatement.java index 063a2994d..58f9f65ab 100644 --- a/src/main/java/gov/nist/csd/pm/pap/pml/statement/operation/CreateProhibitionStatement.java +++ b/src/main/java/gov/nist/csd/pm/pap/pml/statement/operation/CreateProhibitionStatement.java @@ -22,7 +22,7 @@ import java.util.Map; import java.util.Objects; -import static gov.nist.csd.pm.common.op.AdminAccessRights.isAdminAccessRight; +import static gov.nist.csd.pm.pap.AdminAccessRights.isAdminAccessRight; import static gov.nist.csd.pm.common.op.Operation.NAME_OPERAND; import static gov.nist.csd.pm.common.op.graph.GraphOp.ARSET_OPERAND; import static gov.nist.csd.pm.common.op.prohibition.ProhibitionOp.*; diff --git a/src/main/java/gov/nist/csd/pm/pap/pml/statement/operation/DeleteRuleStatement.java b/src/main/java/gov/nist/csd/pm/pap/pml/statement/operation/DeleteRuleStatement.java index 7e97b4636..664a07516 100644 --- a/src/main/java/gov/nist/csd/pm/pap/pml/statement/operation/DeleteRuleStatement.java +++ b/src/main/java/gov/nist/csd/pm/pap/pml/statement/operation/DeleteRuleStatement.java @@ -5,7 +5,7 @@ import gov.nist.csd.pm.common.obligation.Rule; import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.common.op.obligation.CreateObligationOp; import gov.nist.csd.pm.common.op.obligation.DeleteObligationOp; import gov.nist.csd.pm.pap.pml.context.ExecutionContext; diff --git a/src/main/java/gov/nist/csd/pm/common/serialization/PolicyDeserializer.java b/src/main/java/gov/nist/csd/pm/pap/serialization/PolicyDeserializer.java similarity index 85% rename from src/main/java/gov/nist/csd/pm/common/serialization/PolicyDeserializer.java rename to src/main/java/gov/nist/csd/pm/pap/serialization/PolicyDeserializer.java index 6e5494541..bef3fbf87 100644 --- a/src/main/java/gov/nist/csd/pm/common/serialization/PolicyDeserializer.java +++ b/src/main/java/gov/nist/csd/pm/pap/serialization/PolicyDeserializer.java @@ -1,4 +1,4 @@ -package gov.nist.csd.pm.common.serialization; +package gov.nist.csd.pm.pap.serialization; import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.PAP; diff --git a/src/main/java/gov/nist/csd/pm/common/serialization/PolicySerializer.java b/src/main/java/gov/nist/csd/pm/pap/serialization/PolicySerializer.java similarity index 81% rename from src/main/java/gov/nist/csd/pm/common/serialization/PolicySerializer.java rename to src/main/java/gov/nist/csd/pm/pap/serialization/PolicySerializer.java index c4324f472..d124cbf78 100644 --- a/src/main/java/gov/nist/csd/pm/common/serialization/PolicySerializer.java +++ b/src/main/java/gov/nist/csd/pm/pap/serialization/PolicySerializer.java @@ -1,4 +1,4 @@ -package gov.nist.csd.pm.common.serialization; +package gov.nist.csd.pm.pap.serialization; import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.query.PolicyQuery; diff --git a/src/main/java/gov/nist/csd/pm/common/serialization/json/JSONAssociation.java b/src/main/java/gov/nist/csd/pm/pap/serialization/json/JSONAssociation.java similarity index 95% rename from src/main/java/gov/nist/csd/pm/common/serialization/json/JSONAssociation.java rename to src/main/java/gov/nist/csd/pm/pap/serialization/json/JSONAssociation.java index 05fd62fba..6d354d3f6 100644 --- a/src/main/java/gov/nist/csd/pm/common/serialization/json/JSONAssociation.java +++ b/src/main/java/gov/nist/csd/pm/pap/serialization/json/JSONAssociation.java @@ -1,4 +1,4 @@ -package gov.nist.csd.pm.common.serialization.json; +package gov.nist.csd.pm.pap.serialization.json; import gov.nist.csd.pm.common.graph.relationship.AccessRightSet; diff --git a/src/main/java/gov/nist/csd/pm/common/serialization/json/JSONDeserializer.java b/src/main/java/gov/nist/csd/pm/pap/serialization/json/JSONDeserializer.java similarity index 98% rename from src/main/java/gov/nist/csd/pm/common/serialization/json/JSONDeserializer.java rename to src/main/java/gov/nist/csd/pm/pap/serialization/json/JSONDeserializer.java index 41d8b8ae8..0876f332f 100644 --- a/src/main/java/gov/nist/csd/pm/common/serialization/json/JSONDeserializer.java +++ b/src/main/java/gov/nist/csd/pm/pap/serialization/json/JSONDeserializer.java @@ -1,9 +1,9 @@ -package gov.nist.csd.pm.common.serialization.json; +package gov.nist.csd.pm.pap.serialization.json; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import gov.nist.csd.pm.common.graph.relationship.AccessRightSet; -import gov.nist.csd.pm.common.serialization.PolicyDeserializer; +import gov.nist.csd.pm.pap.serialization.PolicyDeserializer; import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.query.model.context.UserContext; @@ -11,6 +11,8 @@ import java.util.*; +import static gov.nist.csd.pm.common.graph.node.NodeType.*; + public class JSONDeserializer implements PolicyDeserializer { @Override diff --git a/src/main/java/gov/nist/csd/pm/common/serialization/json/JSONGraph.java b/src/main/java/gov/nist/csd/pm/pap/serialization/json/JSONGraph.java similarity index 97% rename from src/main/java/gov/nist/csd/pm/common/serialization/json/JSONGraph.java rename to src/main/java/gov/nist/csd/pm/pap/serialization/json/JSONGraph.java index 220cd7be5..82364d288 100644 --- a/src/main/java/gov/nist/csd/pm/common/serialization/json/JSONGraph.java +++ b/src/main/java/gov/nist/csd/pm/pap/serialization/json/JSONGraph.java @@ -1,4 +1,4 @@ -package gov.nist.csd.pm.common.serialization.json; +package gov.nist.csd.pm.pap.serialization.json; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/gov/nist/csd/pm/common/serialization/json/JSONNode.java b/src/main/java/gov/nist/csd/pm/pap/serialization/json/JSONNode.java similarity index 97% rename from src/main/java/gov/nist/csd/pm/common/serialization/json/JSONNode.java rename to src/main/java/gov/nist/csd/pm/pap/serialization/json/JSONNode.java index 29032c12e..2518a0502 100644 --- a/src/main/java/gov/nist/csd/pm/common/serialization/json/JSONNode.java +++ b/src/main/java/gov/nist/csd/pm/pap/serialization/json/JSONNode.java @@ -1,4 +1,4 @@ -package gov.nist.csd.pm.common.serialization.json; +package gov.nist.csd.pm.pap.serialization.json; import java.util.Collection; import java.util.List; diff --git a/src/main/java/gov/nist/csd/pm/common/serialization/json/JSONPolicy.java b/src/main/java/gov/nist/csd/pm/pap/serialization/json/JSONPolicy.java similarity index 97% rename from src/main/java/gov/nist/csd/pm/common/serialization/json/JSONPolicy.java rename to src/main/java/gov/nist/csd/pm/pap/serialization/json/JSONPolicy.java index a13bb869e..02353e20a 100644 --- a/src/main/java/gov/nist/csd/pm/common/serialization/json/JSONPolicy.java +++ b/src/main/java/gov/nist/csd/pm/pap/serialization/json/JSONPolicy.java @@ -1,4 +1,4 @@ -package gov.nist.csd.pm.common.serialization.json; +package gov.nist.csd.pm.pap.serialization.json; import com.google.gson.Gson; import com.google.gson.GsonBuilder; diff --git a/src/main/java/gov/nist/csd/pm/common/serialization/json/JSONProperty.java b/src/main/java/gov/nist/csd/pm/pap/serialization/json/JSONProperty.java similarity index 95% rename from src/main/java/gov/nist/csd/pm/common/serialization/json/JSONProperty.java rename to src/main/java/gov/nist/csd/pm/pap/serialization/json/JSONProperty.java index 9b81f46de..351cf933b 100644 --- a/src/main/java/gov/nist/csd/pm/common/serialization/json/JSONProperty.java +++ b/src/main/java/gov/nist/csd/pm/pap/serialization/json/JSONProperty.java @@ -1,4 +1,4 @@ -package gov.nist.csd.pm.common.serialization.json; +package gov.nist.csd.pm.pap.serialization.json; import java.util.Objects; diff --git a/src/main/java/gov/nist/csd/pm/common/serialization/json/JSONSerializer.java b/src/main/java/gov/nist/csd/pm/pap/serialization/json/JSONSerializer.java similarity index 97% rename from src/main/java/gov/nist/csd/pm/common/serialization/json/JSONSerializer.java rename to src/main/java/gov/nist/csd/pm/pap/serialization/json/JSONSerializer.java index 4efa7b589..6890f4299 100644 --- a/src/main/java/gov/nist/csd/pm/common/serialization/json/JSONSerializer.java +++ b/src/main/java/gov/nist/csd/pm/pap/serialization/json/JSONSerializer.java @@ -1,4 +1,4 @@ -package gov.nist.csd.pm.common.serialization.json; +package gov.nist.csd.pm.pap.serialization.json; import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.common.graph.node.Node; @@ -11,11 +11,13 @@ import gov.nist.csd.pm.common.op.Operation; import gov.nist.csd.pm.pap.pml.statement.PMLStatementSerializable; import gov.nist.csd.pm.common.routine.Routine; -import gov.nist.csd.pm.common.serialization.PolicySerializer; +import gov.nist.csd.pm.pap.serialization.PolicySerializer; import gov.nist.csd.pm.pap.query.PolicyQuery; import java.util.*; +import static gov.nist.csd.pm.common.graph.node.NodeType.*; + public class JSONSerializer implements PolicySerializer { @Override diff --git a/src/main/java/gov/nist/csd/pm/common/serialization/pml/PMLDeserializer.java b/src/main/java/gov/nist/csd/pm/pap/serialization/pml/PMLDeserializer.java similarity index 76% rename from src/main/java/gov/nist/csd/pm/common/serialization/pml/PMLDeserializer.java rename to src/main/java/gov/nist/csd/pm/pap/serialization/pml/PMLDeserializer.java index 1ab7d8a48..8118c089e 100644 --- a/src/main/java/gov/nist/csd/pm/common/serialization/pml/PMLDeserializer.java +++ b/src/main/java/gov/nist/csd/pm/pap/serialization/pml/PMLDeserializer.java @@ -1,6 +1,6 @@ -package gov.nist.csd.pm.common.serialization.pml; +package gov.nist.csd.pm.pap.serialization.pml; -import gov.nist.csd.pm.common.serialization.PolicyDeserializer; +import gov.nist.csd.pm.pap.serialization.PolicyDeserializer; import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.query.model.context.UserContext; diff --git a/src/main/java/gov/nist/csd/pm/common/serialization/pml/PMLSerializer.java b/src/main/java/gov/nist/csd/pm/pap/serialization/pml/PMLSerializer.java similarity index 98% rename from src/main/java/gov/nist/csd/pm/common/serialization/pml/PMLSerializer.java rename to src/main/java/gov/nist/csd/pm/pap/serialization/pml/PMLSerializer.java index 630ebc19b..7bbb7db3a 100644 --- a/src/main/java/gov/nist/csd/pm/common/serialization/pml/PMLSerializer.java +++ b/src/main/java/gov/nist/csd/pm/pap/serialization/pml/PMLSerializer.java @@ -1,7 +1,6 @@ -package gov.nist.csd.pm.common.serialization.pml; +package gov.nist.csd.pm.pap.serialization.pml; import gov.nist.csd.pm.common.graph.relationship.AccessRightSet; -import gov.nist.csd.pm.common.serialization.json.*; import gov.nist.csd.pm.pap.admin.AdminPolicy; import gov.nist.csd.pm.pap.admin.AdminPolicyNode; @@ -14,12 +13,14 @@ import gov.nist.csd.pm.pap.pml.expression.reference.ReferenceByID; import gov.nist.csd.pm.pap.pml.statement.operation.*; import gov.nist.csd.pm.pap.pml.type.Type; -import gov.nist.csd.pm.common.serialization.PolicySerializer; +import gov.nist.csd.pm.pap.serialization.PolicySerializer; import gov.nist.csd.pm.pap.query.PolicyQuery; import gov.nist.csd.pm.pap.serialization.json.*; import java.util.*; +import static gov.nist.csd.pm.common.graph.node.NodeType.*; + public class PMLSerializer implements PolicySerializer { @Override diff --git a/src/main/java/gov/nist/csd/pm/pdp/Adjudicator.java b/src/main/java/gov/nist/csd/pm/pdp/Adjudicator.java index cda64f025..b432dd7c3 100644 --- a/src/main/java/gov/nist/csd/pm/pdp/Adjudicator.java +++ b/src/main/java/gov/nist/csd/pm/pdp/Adjudicator.java @@ -1,10 +1,10 @@ package gov.nist.csd.pm.pdp; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import java.util.List; -import static gov.nist.csd.pm.common.op.AdminAccessRights.REVIEW_POLICY; +import static gov.nist.csd.pm.pap.AdminAccessRights.REVIEW_POLICY; public abstract class Adjudicator { diff --git a/src/main/java/gov/nist/csd/pm/pdp/AdminAdjudicationResponse.java b/src/main/java/gov/nist/csd/pm/pdp/AdminAdjudicationResponse.java index 3c02b4134..77b8fe001 100644 --- a/src/main/java/gov/nist/csd/pm/pdp/AdminAdjudicationResponse.java +++ b/src/main/java/gov/nist/csd/pm/pdp/AdminAdjudicationResponse.java @@ -1,7 +1,6 @@ package gov.nist.csd.pm.pdp; import gov.nist.csd.pm.pap.query.model.explain.Explain; -import gov.nist.csd.pm.pdp.exception.UnauthorizedException; import java.util.Objects; diff --git a/src/main/java/gov/nist/csd/pm/pdp/PDP.java b/src/main/java/gov/nist/csd/pm/pdp/PDP.java index 7a1181bf8..eedfcf5e0 100644 --- a/src/main/java/gov/nist/csd/pm/pdp/PDP.java +++ b/src/main/java/gov/nist/csd/pm/pdp/PDP.java @@ -1,14 +1,14 @@ package gov.nist.csd.pm.pdp; import gov.nist.csd.pm.common.graph.node.Node; -import gov.nist.csd.pm.common.obligation.EventContext; +import gov.nist.csd.pm.common.event.EventContext; import gov.nist.csd.pm.common.event.EventPublisher; import gov.nist.csd.pm.common.event.EventSubscriber; import gov.nist.csd.pm.pap.*; import gov.nist.csd.pm.common.exception.OperationDoesNotExistException; -import gov.nist.csd.pm.common.op.AdminOperations; +import gov.nist.csd.pm.pap.AdminOperations; import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.context.ExecutionContext; import gov.nist.csd.pm.pap.pml.executable.operation.PMLOperation; import gov.nist.csd.pm.pap.pml.executable.routine.PMLRoutine; @@ -18,7 +18,6 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.common.tx.TxRunner; import gov.nist.csd.pm.common.routine.Routine; -import gov.nist.csd.pm.pdp.exception.UnauthorizedException; import java.util.*; diff --git a/src/main/java/gov/nist/csd/pm/pdp/PDPEventPublisher.java b/src/main/java/gov/nist/csd/pm/pdp/PDPEventPublisher.java index 692bef501..84872ec6f 100644 --- a/src/main/java/gov/nist/csd/pm/pdp/PDPEventPublisher.java +++ b/src/main/java/gov/nist/csd/pm/pdp/PDPEventPublisher.java @@ -1,7 +1,7 @@ package gov.nist.csd.pm.pdp; import gov.nist.csd.pm.common.exception.PMException; -import gov.nist.csd.pm.common.obligation.EventContext; +import gov.nist.csd.pm.common.event.EventContext; import gov.nist.csd.pm.common.event.EventPublisher; import gov.nist.csd.pm.common.event.EventSubscriber; diff --git a/src/main/java/gov/nist/csd/pm/pdp/PDPTx.java b/src/main/java/gov/nist/csd/pm/pdp/PDPTx.java index 346831ccf..48bc800a1 100644 --- a/src/main/java/gov/nist/csd/pm/pdp/PDPTx.java +++ b/src/main/java/gov/nist/csd/pm/pdp/PDPTx.java @@ -6,7 +6,7 @@ import gov.nist.csd.pm.pap.admin.AdminPolicyNode; import gov.nist.csd.pm.common.executable.AdminExecutable; import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.PMLCompiler; import gov.nist.csd.pm.pap.pml.context.ExecutionContext; import gov.nist.csd.pm.pap.pml.executable.operation.PMLOperation; @@ -15,15 +15,15 @@ import gov.nist.csd.pm.pap.pml.value.Value; import gov.nist.csd.pm.pap.query.model.context.UserContext; import gov.nist.csd.pm.common.routine.Routine; -import gov.nist.csd.pm.common.serialization.PolicyDeserializer; -import gov.nist.csd.pm.common.serialization.PolicySerializer; +import gov.nist.csd.pm.pap.serialization.PolicyDeserializer; +import gov.nist.csd.pm.pap.serialization.PolicySerializer; import gov.nist.csd.pm.pdp.modification.PolicyModificationAdjudicator; import gov.nist.csd.pm.pdp.query.PolicyQueryAdjudicator; import java.util.List; import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.*; +import static gov.nist.csd.pm.pap.AdminAccessRights.*; public class PDPTx extends PAP { diff --git a/src/main/java/gov/nist/csd/pm/pdp/ResourceAdjudicationResponse.java b/src/main/java/gov/nist/csd/pm/pdp/ResourceAdjudicationResponse.java index c6fd89239..fb622a50b 100644 --- a/src/main/java/gov/nist/csd/pm/pdp/ResourceAdjudicationResponse.java +++ b/src/main/java/gov/nist/csd/pm/pdp/ResourceAdjudicationResponse.java @@ -2,7 +2,6 @@ import gov.nist.csd.pm.common.graph.node.Node; import gov.nist.csd.pm.pap.query.model.explain.Explain; -import gov.nist.csd.pm.pdp.exception.UnauthorizedException; import java.util.Objects; diff --git a/src/main/java/gov/nist/csd/pm/pdp/exception/UnauthorizedException.java b/src/main/java/gov/nist/csd/pm/pdp/UnauthorizedException.java similarity index 96% rename from src/main/java/gov/nist/csd/pm/pdp/exception/UnauthorizedException.java rename to src/main/java/gov/nist/csd/pm/pdp/UnauthorizedException.java index 8484f79fc..6905ec7fe 100644 --- a/src/main/java/gov/nist/csd/pm/pdp/exception/UnauthorizedException.java +++ b/src/main/java/gov/nist/csd/pm/pdp/UnauthorizedException.java @@ -1,4 +1,4 @@ -package gov.nist.csd.pm.pdp.exception; +package gov.nist.csd.pm.pdp; import gov.nist.csd.pm.pap.query.model.context.TargetContext; import gov.nist.csd.pm.pap.query.model.context.UserContext; diff --git a/src/main/java/gov/nist/csd/pm/pdp/modification/GraphModificationAdjudicator.java b/src/main/java/gov/nist/csd/pm/pdp/modification/GraphModificationAdjudicator.java index e058fe809..3ccab0919 100644 --- a/src/main/java/gov/nist/csd/pm/pdp/modification/GraphModificationAdjudicator.java +++ b/src/main/java/gov/nist/csd/pm/pdp/modification/GraphModificationAdjudicator.java @@ -2,13 +2,13 @@ import gov.nist.csd.pm.common.op.graph.*; import gov.nist.csd.pm.pap.modification.GraphModification; -import gov.nist.csd.pm.common.obligation.EventContext; +import gov.nist.csd.pm.common.event.EventContext; import gov.nist.csd.pm.common.event.EventPublisher; import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.common.graph.relationship.AccessRightSet; import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.model.context.UserContext; import gov.nist.csd.pm.common.graph.node.NodeType; import gov.nist.csd.pm.pdp.Adjudicator; diff --git a/src/main/java/gov/nist/csd/pm/pdp/modification/ObligationsModificationAdjudicator.java b/src/main/java/gov/nist/csd/pm/pdp/modification/ObligationsModificationAdjudicator.java index b6b3fdf4a..589a7978d 100644 --- a/src/main/java/gov/nist/csd/pm/pdp/modification/ObligationsModificationAdjudicator.java +++ b/src/main/java/gov/nist/csd/pm/pdp/modification/ObligationsModificationAdjudicator.java @@ -1,12 +1,12 @@ package gov.nist.csd.pm.pdp.modification; import gov.nist.csd.pm.pap.modification.ObligationsModification; -import gov.nist.csd.pm.common.obligation.EventContext; +import gov.nist.csd.pm.common.event.EventContext; import gov.nist.csd.pm.common.obligation.Obligation; import gov.nist.csd.pm.common.event.EventPublisher; import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.common.exception.PMException; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.common.op.obligation.CreateObligationOp; import gov.nist.csd.pm.common.op.obligation.DeleteObligationOp; import gov.nist.csd.pm.pap.query.model.context.UserContext; diff --git a/src/main/java/gov/nist/csd/pm/pdp/modification/OperationsModificationAdjudicator.java b/src/main/java/gov/nist/csd/pm/pdp/modification/OperationsModificationAdjudicator.java index 520f6f3a8..63e76c6b7 100644 --- a/src/main/java/gov/nist/csd/pm/pdp/modification/OperationsModificationAdjudicator.java +++ b/src/main/java/gov/nist/csd/pm/pdp/modification/OperationsModificationAdjudicator.java @@ -3,11 +3,11 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.common.graph.relationship.AccessRightSet; import gov.nist.csd.pm.pap.modification.OperationsModification; -import gov.nist.csd.pm.common.obligation.EventContext; +import gov.nist.csd.pm.common.event.EventContext; import gov.nist.csd.pm.common.event.EventPublisher; import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.common.op.operation.CreateAdminOperationOp; import gov.nist.csd.pm.common.op.operation.DeleteAdminOperationOp; import gov.nist.csd.pm.common.op.operation.SetResourceOperationsOp; diff --git a/src/main/java/gov/nist/csd/pm/pdp/modification/PolicyModificationAdjudicator.java b/src/main/java/gov/nist/csd/pm/pdp/modification/PolicyModificationAdjudicator.java index 03c1c0c5a..d3facc587 100644 --- a/src/main/java/gov/nist/csd/pm/pdp/modification/PolicyModificationAdjudicator.java +++ b/src/main/java/gov/nist/csd/pm/pdp/modification/PolicyModificationAdjudicator.java @@ -4,7 +4,7 @@ import gov.nist.csd.pm.common.event.EventPublisher; import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.pap.modification.*; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.model.context.UserContext; import gov.nist.csd.pm.pdp.Adjudicator; diff --git a/src/main/java/gov/nist/csd/pm/pdp/modification/ProhibitionsModificationAdjudicator.java b/src/main/java/gov/nist/csd/pm/pdp/modification/ProhibitionsModificationAdjudicator.java index 63d458861..446826f4d 100644 --- a/src/main/java/gov/nist/csd/pm/pdp/modification/ProhibitionsModificationAdjudicator.java +++ b/src/main/java/gov/nist/csd/pm/pdp/modification/ProhibitionsModificationAdjudicator.java @@ -2,11 +2,11 @@ import gov.nist.csd.pm.common.graph.relationship.AccessRightSet; import gov.nist.csd.pm.pap.modification.ProhibitionsModification; -import gov.nist.csd.pm.common.obligation.EventContext; +import gov.nist.csd.pm.common.event.EventContext; import gov.nist.csd.pm.common.event.EventPublisher; import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.common.exception.PMException; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.common.op.prohibition.CreateProhibitionOp; import gov.nist.csd.pm.common.op.prohibition.DeleteProhibitionOp; import gov.nist.csd.pm.pap.query.model.context.UserContext; diff --git a/src/main/java/gov/nist/csd/pm/pdp/modification/RoutinesModificationAdjudicator.java b/src/main/java/gov/nist/csd/pm/pdp/modification/RoutinesModificationAdjudicator.java index 2f9c8e246..8921a08a2 100644 --- a/src/main/java/gov/nist/csd/pm/pdp/modification/RoutinesModificationAdjudicator.java +++ b/src/main/java/gov/nist/csd/pm/pdp/modification/RoutinesModificationAdjudicator.java @@ -2,10 +2,10 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.modification.RoutinesModification; -import gov.nist.csd.pm.common.obligation.EventContext; +import gov.nist.csd.pm.common.event.EventContext; import gov.nist.csd.pm.common.event.EventPublisher; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.common.op.routine.CreateAdminRoutineOp; import gov.nist.csd.pm.common.op.routine.DeleteAdminRoutineOp; import gov.nist.csd.pm.pap.query.model.context.UserContext; diff --git a/src/main/java/gov/nist/csd/pm/pdp/query/AccessQueryAdjudicator.java b/src/main/java/gov/nist/csd/pm/pdp/query/AccessQueryAdjudicator.java index dd63fe1b0..d7b5beec7 100644 --- a/src/main/java/gov/nist/csd/pm/pdp/query/AccessQueryAdjudicator.java +++ b/src/main/java/gov/nist/csd/pm/pdp/query/AccessQueryAdjudicator.java @@ -3,7 +3,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.common.graph.relationship.AccessRightSet; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.AccessQuery; import gov.nist.csd.pm.pap.query.model.context.TargetContext; import gov.nist.csd.pm.pap.query.model.subgraph.SubgraphPrivileges; diff --git a/src/main/java/gov/nist/csd/pm/pdp/query/GraphQueryAdjudicator.java b/src/main/java/gov/nist/csd/pm/pdp/query/GraphQueryAdjudicator.java index cf5ddf82b..a2e6cb077 100644 --- a/src/main/java/gov/nist/csd/pm/pdp/query/GraphQueryAdjudicator.java +++ b/src/main/java/gov/nist/csd/pm/pdp/query/GraphQueryAdjudicator.java @@ -6,20 +6,20 @@ import gov.nist.csd.pm.common.graph.relationship.Association; import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.pap.admin.AdminPolicyNode; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.GraphQuery; import gov.nist.csd.pm.pap.query.model.context.UserContext; import gov.nist.csd.pm.pap.query.model.subgraph.AscendantSubgraph; import gov.nist.csd.pm.pap.query.model.subgraph.DescendantSubgraph; import gov.nist.csd.pm.pdp.Adjudicator; -import gov.nist.csd.pm.pdp.exception.UnauthorizedException; +import gov.nist.csd.pm.pdp.UnauthorizedException; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.REVIEW_POLICY; +import static gov.nist.csd.pm.pap.AdminAccessRights.REVIEW_POLICY; public class GraphQueryAdjudicator extends Adjudicator implements GraphQuery { diff --git a/src/main/java/gov/nist/csd/pm/pdp/query/ObligationsQueryAdjudicator.java b/src/main/java/gov/nist/csd/pm/pdp/query/ObligationsQueryAdjudicator.java index dbfba1648..788b01499 100644 --- a/src/main/java/gov/nist/csd/pm/pdp/query/ObligationsQueryAdjudicator.java +++ b/src/main/java/gov/nist/csd/pm/pdp/query/ObligationsQueryAdjudicator.java @@ -4,20 +4,20 @@ import gov.nist.csd.pm.common.obligation.EventPattern; import gov.nist.csd.pm.common.obligation.Rule; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.AdminAccessRights; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.AdminAccessRights; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.pattern.operand.OperandPatternExpression; import gov.nist.csd.pm.pap.query.ObligationsQuery; import gov.nist.csd.pm.pap.query.model.context.UserContext; import gov.nist.csd.pm.common.obligation.Obligation; import gov.nist.csd.pm.pdp.Adjudicator; -import gov.nist.csd.pm.pdp.exception.UnauthorizedException; +import gov.nist.csd.pm.pdp.UnauthorizedException; import java.util.Collection; import java.util.List; import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.GET_OBLIGATION; +import static gov.nist.csd.pm.pap.AdminAccessRights.GET_OBLIGATION; public class ObligationsQueryAdjudicator extends Adjudicator implements ObligationsQuery { diff --git a/src/main/java/gov/nist/csd/pm/pdp/query/OperationsQueryAdjudicator.java b/src/main/java/gov/nist/csd/pm/pdp/query/OperationsQueryAdjudicator.java index de0fc6cef..608e07d44 100644 --- a/src/main/java/gov/nist/csd/pm/pdp/query/OperationsQueryAdjudicator.java +++ b/src/main/java/gov/nist/csd/pm/pdp/query/OperationsQueryAdjudicator.java @@ -4,9 +4,9 @@ import gov.nist.csd.pm.common.graph.relationship.AccessRightSet; import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.pap.admin.AdminPolicyNode; -import gov.nist.csd.pm.common.op.AdminAccessRights; +import gov.nist.csd.pm.pap.AdminAccessRights; import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.OperationsQuery; import gov.nist.csd.pm.pap.query.model.context.UserContext; import gov.nist.csd.pm.pdp.Adjudicator; diff --git a/src/main/java/gov/nist/csd/pm/pdp/query/PolicyQueryAdjudicator.java b/src/main/java/gov/nist/csd/pm/pdp/query/PolicyQueryAdjudicator.java index 134d35c81..67893a9ee 100644 --- a/src/main/java/gov/nist/csd/pm/pdp/query/PolicyQueryAdjudicator.java +++ b/src/main/java/gov/nist/csd/pm/pdp/query/PolicyQueryAdjudicator.java @@ -2,7 +2,7 @@ import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.pap.query.model.context.UserContext; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.*; public class PolicyQueryAdjudicator implements PolicyQuery { diff --git a/src/main/java/gov/nist/csd/pm/pdp/query/ProhibitionsQueryAdjudicator.java b/src/main/java/gov/nist/csd/pm/pdp/query/ProhibitionsQueryAdjudicator.java index 8f5ac787d..981bffb80 100644 --- a/src/main/java/gov/nist/csd/pm/pdp/query/ProhibitionsQueryAdjudicator.java +++ b/src/main/java/gov/nist/csd/pm/pdp/query/ProhibitionsQueryAdjudicator.java @@ -5,8 +5,8 @@ import gov.nist.csd.pm.common.prohibition.ProhibitionSubject; import gov.nist.csd.pm.pap.admin.AdminPolicyNode; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.AdminAccessRights; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.AdminAccessRights; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.ProhibitionsQuery; import gov.nist.csd.pm.pap.query.model.context.UserContext; import gov.nist.csd.pm.common.prohibition.Prohibition; @@ -16,8 +16,8 @@ import java.util.HashMap; import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.GET_PROCESS_PROHIBITIONS; -import static gov.nist.csd.pm.common.op.AdminAccessRights.GET_PROHIBITIONS; +import static gov.nist.csd.pm.pap.AdminAccessRights.GET_PROCESS_PROHIBITIONS; +import static gov.nist.csd.pm.pap.AdminAccessRights.GET_PROHIBITIONS; public class ProhibitionsQueryAdjudicator extends Adjudicator implements ProhibitionsQuery { diff --git a/src/main/java/gov/nist/csd/pm/pdp/query/RoutinesQueryAdjudicator.java b/src/main/java/gov/nist/csd/pm/pdp/query/RoutinesQueryAdjudicator.java index 2771af7db..01bb49c26 100644 --- a/src/main/java/gov/nist/csd/pm/pdp/query/RoutinesQueryAdjudicator.java +++ b/src/main/java/gov/nist/csd/pm/pdp/query/RoutinesQueryAdjudicator.java @@ -3,8 +3,8 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.pap.admin.AdminPolicyNode; -import gov.nist.csd.pm.common.op.AdminAccessRights; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.AdminAccessRights; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.RoutinesQuery; import gov.nist.csd.pm.pap.query.model.context.UserContext; import gov.nist.csd.pm.common.routine.Routine; diff --git a/src/main/proto/epp.proto b/src/main/proto/epp.proto index 2913b985b..907ffab69 100644 --- a/src/main/proto/epp.proto +++ b/src/main/proto/epp.proto @@ -1,7 +1,7 @@ syntax = "proto3"; option java_multiple_files = true; -option java_package = "gov.nist.csd.pm.epp.proto"; +option java_package = "gov.nist.csd.pm.proto.epp"; option java_outer_classname = "EPPProto"; message StringList { diff --git a/src/main/proto/graph.proto b/src/main/proto/graph.proto index e7cc7fd54..140889ea0 100644 --- a/src/main/proto/graph.proto +++ b/src/main/proto/graph.proto @@ -1,7 +1,7 @@ syntax = "proto3"; option java_multiple_files = true; -option java_package = "gov.nist.csd.pm.pap.op.graph.proto"; +option java_package = "gov.nist.csd.pm.proto.graph"; option java_outer_classname = "GraphProto"; message AssignOp { diff --git a/src/main/proto/obligation.proto b/src/main/proto/obligation.proto index 67cf97180..2953cb43a 100644 --- a/src/main/proto/obligation.proto +++ b/src/main/proto/obligation.proto @@ -1,7 +1,7 @@ syntax = "proto3"; option java_multiple_files = true; -option java_package = "gov.nist.csd.pm.pap.op.obligation.proto"; +option java_package = "gov.nist.csd.pm.proto.obligation"; option java_outer_classname = "ObligationProto"; message CreateObligationOp { diff --git a/src/main/proto/operation.proto b/src/main/proto/operation.proto index 820f72374..ac4605482 100644 --- a/src/main/proto/operation.proto +++ b/src/main/proto/operation.proto @@ -1,7 +1,7 @@ syntax = "proto3"; option java_multiple_files = true; -option java_package = "gov.nist.csd.pm.pap.op.operation.proto"; +option java_package = "gov.nist.csd.pm.proto.operation"; option java_outer_classname = "OperationProto"; message CreateAdminOperationOp { diff --git a/src/main/proto/pdp.proto b/src/main/proto/pdp.proto index ee42c8400..3315a04c1 100644 --- a/src/main/proto/pdp.proto +++ b/src/main/proto/pdp.proto @@ -3,7 +3,7 @@ syntax = "proto3"; import "epp.proto"; option java_multiple_files = true; -option java_package = "gov.nist.csd.pm.pdp.proto"; +option java_package = "gov.nist.csd.pm.proto.pdp"; option java_outer_classname = "PDPProto"; message ResourceOperationRequest { diff --git a/src/main/proto/prohibitions.proto b/src/main/proto/prohibitions.proto index 79aa696c7..51fb8829e 100644 --- a/src/main/proto/prohibitions.proto +++ b/src/main/proto/prohibitions.proto @@ -1,7 +1,7 @@ syntax = "proto3"; option java_multiple_files = true; -option java_package = "gov.nist.csd.pm.pap.op.prohibition.proto"; +option java_package = "gov.nist.csd.pm.proto.prohibition"; option java_outer_classname = "ProhibitionProto"; message CreateProhibitionOp { diff --git a/src/main/proto/routine.proto b/src/main/proto/routine.proto index 420e7d50c..3814b4591 100644 --- a/src/main/proto/routine.proto +++ b/src/main/proto/routine.proto @@ -1,7 +1,7 @@ syntax = "proto3"; option java_multiple_files = true; -option java_package = "gov.nist.csd.pm.pap.op.routine.proto"; +option java_package = "gov.nist.csd.pm.proto.routine"; option java_outer_classname = "RoutineProto"; message CreateAdminRoutineOp { diff --git a/src/test/java/gov/nist/csd/pm/common/obligation/EventPatternTest.java b/src/test/java/gov/nist/csd/pm/common/obligation/EventPatternTest.java index ed5029308..0e1806a2b 100644 --- a/src/test/java/gov/nist/csd/pm/common/obligation/EventPatternTest.java +++ b/src/test/java/gov/nist/csd/pm/common/obligation/EventPatternTest.java @@ -1,5 +1,6 @@ package gov.nist.csd.pm.common.obligation; +import gov.nist.csd.pm.common.event.EventContext; import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.impl.memory.pap.MemoryPAP; import gov.nist.csd.pm.common.op.graph.AssignOp; diff --git a/src/test/java/gov/nist/csd/pm/common/obligation/ObligationTest.java b/src/test/java/gov/nist/csd/pm/common/obligation/ObligationTest.java index f48963b22..d81450b94 100644 --- a/src/test/java/gov/nist/csd/pm/common/obligation/ObligationTest.java +++ b/src/test/java/gov/nist/csd/pm/common/obligation/ObligationTest.java @@ -1,9 +1,10 @@ package gov.nist.csd.pm.common.obligation; +import gov.nist.csd.pm.common.event.EventContext; import gov.nist.csd.pm.epp.EPP; import gov.nist.csd.pm.impl.memory.pap.MemoryPAP; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.common.op.graph.AssignOp; import gov.nist.csd.pm.pap.pml.context.ExecutionContext; import gov.nist.csd.pm.pap.pml.executable.operation.PMLOperation; diff --git a/src/test/java/gov/nist/csd/pm/pap/op/OperationTest.java b/src/test/java/gov/nist/csd/pm/common/op/OperationTest.java similarity index 97% rename from src/test/java/gov/nist/csd/pm/pap/op/OperationTest.java rename to src/test/java/gov/nist/csd/pm/common/op/OperationTest.java index 28235ace6..8a658ade0 100644 --- a/src/test/java/gov/nist/csd/pm/pap/op/OperationTest.java +++ b/src/test/java/gov/nist/csd/pm/common/op/OperationTest.java @@ -1,4 +1,4 @@ -package gov.nist.csd.pm.pap.op; +package gov.nist.csd.pm.common.op; import gov.nist.csd.pm.common.exception.OperandsDoNotMatchException; import gov.nist.csd.pm.common.op.graph.AssignOp; diff --git a/src/test/java/gov/nist/csd/pm/pap/op/PreparedOperationTest.java b/src/test/java/gov/nist/csd/pm/common/op/PreparedOperationTest.java similarity index 87% rename from src/test/java/gov/nist/csd/pm/pap/op/PreparedOperationTest.java rename to src/test/java/gov/nist/csd/pm/common/op/PreparedOperationTest.java index 8e24d7075..4397a6bdb 100644 --- a/src/test/java/gov/nist/csd/pm/pap/op/PreparedOperationTest.java +++ b/src/test/java/gov/nist/csd/pm/common/op/PreparedOperationTest.java @@ -1,10 +1,8 @@ -package gov.nist.csd.pm.pap.op; +package gov.nist.csd.pm.common.op; import gov.nist.csd.pm.common.exception.PMException; -import gov.nist.csd.pm.common.obligation.EventContext; -import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PreparedOperation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.common.event.EventContext; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.impl.memory.pap.MemoryPAP; import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.pap.query.model.context.UserContext; diff --git a/src/test/java/gov/nist/csd/pm/pap/op/PrivilegeCheckerTest.java b/src/test/java/gov/nist/csd/pm/common/op/PrivilegeCheckerTest.java similarity index 87% rename from src/test/java/gov/nist/csd/pm/pap/op/PrivilegeCheckerTest.java rename to src/test/java/gov/nist/csd/pm/common/op/PrivilegeCheckerTest.java index 89cf5dfb5..f51fd0ed6 100644 --- a/src/test/java/gov/nist/csd/pm/pap/op/PrivilegeCheckerTest.java +++ b/src/test/java/gov/nist/csd/pm/common/op/PrivilegeCheckerTest.java @@ -1,10 +1,10 @@ -package gov.nist.csd.pm.pap.op; +package gov.nist.csd.pm.common.op; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.impl.memory.pap.MemoryPAP; import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.query.model.context.UserContext; -import gov.nist.csd.pm.common.serialization.pml.PMLDeserializer; +import gov.nist.csd.pm.pap.serialization.pml.PMLDeserializer; import org.junit.jupiter.api.Test; import java.util.List; diff --git a/src/test/java/gov/nist/csd/pm/pap/op/obligation/ObligationOpTest.java b/src/test/java/gov/nist/csd/pm/common/op/obligation/ObligationOpTest.java similarity index 89% rename from src/test/java/gov/nist/csd/pm/pap/op/obligation/ObligationOpTest.java rename to src/test/java/gov/nist/csd/pm/common/op/obligation/ObligationOpTest.java index 842ec2e3e..afe5d2a96 100644 --- a/src/test/java/gov/nist/csd/pm/pap/op/obligation/ObligationOpTest.java +++ b/src/test/java/gov/nist/csd/pm/common/op/obligation/ObligationOpTest.java @@ -1,18 +1,18 @@ -package gov.nist.csd.pm.pap.op.obligation; +package gov.nist.csd.pm.common.op.obligation; import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.impl.memory.pap.MemoryPAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.pattern.operand.InOperandPattern; import gov.nist.csd.pm.pap.pml.pattern.operand.NodeOperandPattern; import gov.nist.csd.pm.pap.pml.pattern.subject.LogicalSubjectPatternExpression; import gov.nist.csd.pm.pap.pml.pattern.subject.SubjectPattern; import gov.nist.csd.pm.pap.query.model.context.UserContext; -import gov.nist.csd.pm.pdp.exception.UnauthorizedException; +import gov.nist.csd.pm.pdp.UnauthorizedException; import org.junit.jupiter.api.Test; -import static gov.nist.csd.pm.common.op.AdminAccessRights.CREATE_OBLIGATION; import static gov.nist.csd.pm.common.op.obligation.ObligationOp.checkPatternPrivileges; +import static gov.nist.csd.pm.pap.AdminAccessRights.CREATE_OBLIGATION; import static org.junit.jupiter.api.Assertions.*; class ObligationOpTest { diff --git a/src/test/java/gov/nist/csd/pm/epp/EPPTest.java b/src/test/java/gov/nist/csd/pm/epp/EPPTest.java index ee21df4c5..294f161b0 100644 --- a/src/test/java/gov/nist/csd/pm/epp/EPPTest.java +++ b/src/test/java/gov/nist/csd/pm/epp/EPPTest.java @@ -2,7 +2,7 @@ import gov.nist.csd.pm.common.graph.node.NodeType; import gov.nist.csd.pm.common.graph.relationship.AccessRightSet; -import gov.nist.csd.pm.common.obligation.EventContext; +import gov.nist.csd.pm.common.event.EventContext; import gov.nist.csd.pm.common.obligation.EventPattern; import gov.nist.csd.pm.common.obligation.Response; import gov.nist.csd.pm.common.obligation.Rule; @@ -10,14 +10,14 @@ import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.pap.admin.AdminPolicyNode; import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.executable.operation.PMLOperation; import gov.nist.csd.pm.pap.pml.pattern.OperationPattern; import gov.nist.csd.pm.pap.pml.pattern.subject.SubjectPattern; import gov.nist.csd.pm.pap.pml.statement.operation.CreateNonPCStatement; import gov.nist.csd.pm.pap.pml.statement.operation.CreatePolicyStatement; import gov.nist.csd.pm.pap.pml.value.Value; -import gov.nist.csd.pm.common.serialization.pml.PMLDeserializer; +import gov.nist.csd.pm.pap.serialization.pml.PMLDeserializer; import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.pml.expression.Expression; import gov.nist.csd.pm.pap.pml.expression.literal.ArrayLiteral; @@ -26,14 +26,14 @@ import gov.nist.csd.pm.pap.pml.value.VoidValue; import gov.nist.csd.pm.pap.query.model.context.UserContext; import gov.nist.csd.pm.pdp.*; -import gov.nist.csd.pm.pdp.exception.UnauthorizedException; +import gov.nist.csd.pm.pdp.UnauthorizedException; import org.junit.jupiter.api.Test; import java.util.Arrays; import java.util.List; import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.*; +import static gov.nist.csd.pm.pap.AdminAccessRights.*; import static gov.nist.csd.pm.common.op.Operation.NAME_OPERAND; import static gov.nist.csd.pm.common.op.graph.GraphOp.DESCENDANTS_OPERAND; import static gov.nist.csd.pm.pdp.Decision.GRANT; diff --git a/src/test/java/gov/nist/csd/pm/pap/PAPTest.java b/src/test/java/gov/nist/csd/pm/pap/PAPTest.java index 7e31a8053..5d7bf63ee 100644 --- a/src/test/java/gov/nist/csd/pm/pap/PAPTest.java +++ b/src/test/java/gov/nist/csd/pm/pap/PAPTest.java @@ -5,7 +5,6 @@ import gov.nist.csd.pm.pap.admin.AdminPolicyNode; import gov.nist.csd.pm.common.exception.NodeDoesNotExistException; import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.value.Value; import gov.nist.csd.pm.pap.pml.value.VoidValue; import gov.nist.csd.pm.common.graph.relationship.AccessRightSet; diff --git a/src/test/java/gov/nist/csd/pm/pap/modification/GraphModifierTest.java b/src/test/java/gov/nist/csd/pm/pap/modification/GraphModifierTest.java index 2dcf52da7..451aa1d85 100644 --- a/src/test/java/gov/nist/csd/pm/pap/modification/GraphModifierTest.java +++ b/src/test/java/gov/nist/csd/pm/pap/modification/GraphModifierTest.java @@ -21,8 +21,8 @@ import static gov.nist.csd.pm.common.graph.node.Properties.NO_PROPERTIES; import static gov.nist.csd.pm.common.graph.node.Properties.toProperties; -import static gov.nist.csd.pm.common.op.AdminAccessRights.*; -import static gov.nist.csd.pm.common.op.AdminAccessRights.ALL_ADMIN_ACCESS_RIGHTS; +import static gov.nist.csd.pm.pap.AdminAccessRights.*; +import static gov.nist.csd.pm.pap.AdminAccessRights.ALL_ADMIN_ACCESS_RIGHTS; import static org.junit.jupiter.api.Assertions.*; public abstract class GraphModifierTest extends PAPTestInitializer { diff --git a/src/test/java/gov/nist/csd/pm/pap/modification/OperationsModifierTest.java b/src/test/java/gov/nist/csd/pm/pap/modification/OperationsModifierTest.java index ee017646e..e169d30fa 100644 --- a/src/test/java/gov/nist/csd/pm/pap/modification/OperationsModifierTest.java +++ b/src/test/java/gov/nist/csd/pm/pap/modification/OperationsModifierTest.java @@ -7,7 +7,7 @@ import gov.nist.csd.pm.common.exception.AdminAccessRightExistsException; import gov.nist.csd.pm.common.exception.OperationExistsException; import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.common.op.graph.AssignOp; import gov.nist.csd.pm.pap.query.model.context.UserContext; import org.junit.jupiter.api.Nested; @@ -16,7 +16,7 @@ import java.util.List; import java.util.Map; -import static gov.nist.csd.pm.common.op.AdminAccessRights.CREATE_POLICY_CLASS; +import static gov.nist.csd.pm.pap.AdminAccessRights.CREATE_POLICY_CLASS; import static org.junit.jupiter.api.Assertions.*; public abstract class OperationsModifierTest extends PAPTestInitializer { diff --git a/src/test/java/gov/nist/csd/pm/pap/modification/ProhibitionsModifierTest.java b/src/test/java/gov/nist/csd/pm/pap/modification/ProhibitionsModifierTest.java index 052faaa77..8f2172c0d 100644 --- a/src/test/java/gov/nist/csd/pm/pap/modification/ProhibitionsModifierTest.java +++ b/src/test/java/gov/nist/csd/pm/pap/modification/ProhibitionsModifierTest.java @@ -14,7 +14,7 @@ import java.io.IOException; import java.util.*; -import static gov.nist.csd.pm.common.op.AdminAccessRights.ALL_ADMIN_ACCESS_RIGHTS; +import static gov.nist.csd.pm.pap.AdminAccessRights.ALL_ADMIN_ACCESS_RIGHTS; import static org.junit.jupiter.api.Assertions.*; public abstract class ProhibitionsModifierTest extends PAPTestInitializer { diff --git a/src/test/java/gov/nist/csd/pm/pap/pml/ExecutionTest.java b/src/test/java/gov/nist/csd/pm/pap/pml/ExecutionTest.java index b25b75fae..3c3777323 100644 --- a/src/test/java/gov/nist/csd/pm/pap/pml/ExecutionTest.java +++ b/src/test/java/gov/nist/csd/pm/pap/pml/ExecutionTest.java @@ -4,7 +4,7 @@ import gov.nist.csd.pm.common.graph.relationship.Association; import gov.nist.csd.pm.impl.memory.pap.MemoryPAP; import gov.nist.csd.pm.pap.pml.exception.PMLCompilationException; -import gov.nist.csd.pm.common.serialization.pml.PMLDeserializer; +import gov.nist.csd.pm.pap.serialization.pml.PMLDeserializer; import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.pap.query.model.context.UserContext; diff --git a/src/test/java/gov/nist/csd/pm/pap/pml/PMLTest.java b/src/test/java/gov/nist/csd/pm/pap/pml/PMLTest.java index 93166cfc6..299183ebb 100644 --- a/src/test/java/gov/nist/csd/pm/pap/pml/PMLTest.java +++ b/src/test/java/gov/nist/csd/pm/pap/pml/PMLTest.java @@ -5,12 +5,12 @@ import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.pap.admin.AdminPolicyNode; import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.model.context.UserContext; import gov.nist.csd.pm.common.routine.Routine; import gov.nist.csd.pm.pdp.AdminAdjudicationResponse; import gov.nist.csd.pm.pdp.PDP; -import gov.nist.csd.pm.pdp.exception.UnauthorizedException; +import gov.nist.csd.pm.pdp.UnauthorizedException; import org.junit.jupiter.api.Test; import java.util.List; diff --git a/src/test/java/gov/nist/csd/pm/pap/pml/executable/operation/PMLOperationWrapperTest.java b/src/test/java/gov/nist/csd/pm/pap/pml/executable/operation/PMLOperationWrapperTest.java index 17e207c6c..297fd7f94 100644 --- a/src/test/java/gov/nist/csd/pm/pap/pml/executable/operation/PMLOperationWrapperTest.java +++ b/src/test/java/gov/nist/csd/pm/pap/pml/executable/operation/PMLOperationWrapperTest.java @@ -4,7 +4,7 @@ import gov.nist.csd.pm.impl.memory.pap.MemoryPAP; import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.executable.PMLExecutableSignature; import gov.nist.csd.pm.pap.pml.type.Type; import gov.nist.csd.pm.pap.query.model.context.UserContext; diff --git a/src/test/java/gov/nist/csd/pm/pap/pml/expression/ValueTest.java b/src/test/java/gov/nist/csd/pm/pap/pml/expression/ValueTest.java index 348abb80b..557c01146 100644 --- a/src/test/java/gov/nist/csd/pm/pap/pml/expression/ValueTest.java +++ b/src/test/java/gov/nist/csd/pm/pap/pml/expression/ValueTest.java @@ -1,7 +1,7 @@ package gov.nist.csd.pm.pap.pml.expression; import gov.nist.csd.pm.common.exception.PMException; -import gov.nist.csd.pm.common.obligation.EventContext; +import gov.nist.csd.pm.common.event.EventContext; import gov.nist.csd.pm.common.op.graph.CreateObjectAttributeOp; import gov.nist.csd.pm.pap.pml.type.Type; import gov.nist.csd.pm.pap.pml.value.ArrayValue; @@ -12,7 +12,7 @@ import java.util.*; -import static gov.nist.csd.pm.common.op.AdminAccessRights.CREATE_OBJECT_ATTRIBUTE; +import static gov.nist.csd.pm.pap.AdminAccessRights.CREATE_OBJECT_ATTRIBUTE; import static gov.nist.csd.pm.common.graph.node.Properties.NO_PROPERTIES; import static gov.nist.csd.pm.common.op.Operation.NAME_OPERAND; import static gov.nist.csd.pm.common.op.graph.GraphOp.DESCENDANTS_OPERAND; diff --git a/src/test/java/gov/nist/csd/pm/pap/pml/statement/operation/CheckStatementTest.java b/src/test/java/gov/nist/csd/pm/pap/pml/statement/operation/CheckStatementTest.java index 8e6c2213d..19731a64c 100644 --- a/src/test/java/gov/nist/csd/pm/pap/pml/statement/operation/CheckStatementTest.java +++ b/src/test/java/gov/nist/csd/pm/pap/pml/statement/operation/CheckStatementTest.java @@ -9,7 +9,7 @@ import gov.nist.csd.pm.pap.pml.type.Type; import gov.nist.csd.pm.pap.query.model.context.UserContext; import gov.nist.csd.pm.pdp.PDP; -import gov.nist.csd.pm.pdp.exception.UnauthorizedException; +import gov.nist.csd.pm.pdp.UnauthorizedException; import org.junit.jupiter.api.Test; import java.util.List; diff --git a/src/test/java/gov/nist/csd/pm/pap/pml/statement/operation/CreateOperationStatementTest.java b/src/test/java/gov/nist/csd/pm/pap/pml/statement/operation/CreateOperationStatementTest.java index 5d43b5d7c..3de44bf54 100644 --- a/src/test/java/gov/nist/csd/pm/pap/pml/statement/operation/CreateOperationStatementTest.java +++ b/src/test/java/gov/nist/csd/pm/pap/pml/statement/operation/CreateOperationStatementTest.java @@ -4,7 +4,7 @@ import gov.nist.csd.pm.impl.memory.pap.MemoryPAP; import gov.nist.csd.pm.pap.query.model.context.UserContext; import gov.nist.csd.pm.pdp.PDP; -import gov.nist.csd.pm.pdp.exception.UnauthorizedException; +import gov.nist.csd.pm.pdp.UnauthorizedException; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.*; diff --git a/src/test/java/gov/nist/csd/pm/pap/query/AccessQuerierTest.java b/src/test/java/gov/nist/csd/pm/pap/query/AccessQuerierTest.java index 608c23280..11f8ac1e6 100644 --- a/src/test/java/gov/nist/csd/pm/pap/query/AccessQuerierTest.java +++ b/src/test/java/gov/nist/csd/pm/pap/query/AccessQuerierTest.java @@ -12,12 +12,12 @@ import gov.nist.csd.pm.pap.query.model.context.UserContext; import gov.nist.csd.pm.pap.query.model.explain.*; import gov.nist.csd.pm.pap.query.model.subgraph.SubgraphPrivileges; -import gov.nist.csd.pm.common.serialization.pml.PMLDeserializer; +import gov.nist.csd.pm.pap.serialization.pml.PMLDeserializer; import org.junit.jupiter.api.Test; import java.util.*; -import static gov.nist.csd.pm.common.op.AdminAccessRights.*; +import static gov.nist.csd.pm.pap.AdminAccessRights.*; import static org.junit.jupiter.api.Assertions.*; public abstract class AccessQuerierTest extends PAPTestInitializer { diff --git a/src/test/java/gov/nist/csd/pm/pap/query/GraphQuerierTest.java b/src/test/java/gov/nist/csd/pm/pap/query/GraphQuerierTest.java index 69062b187..d67acaabd 100644 --- a/src/test/java/gov/nist/csd/pm/pap/query/GraphQuerierTest.java +++ b/src/test/java/gov/nist/csd/pm/pap/query/GraphQuerierTest.java @@ -10,12 +10,13 @@ import gov.nist.csd.pm.pap.query.model.context.UserContext; import gov.nist.csd.pm.pap.query.model.subgraph.AscendantSubgraph; import gov.nist.csd.pm.pap.query.model.subgraph.DescendantSubgraph; -import gov.nist.csd.pm.common.serialization.pml.PMLDeserializer; +import gov.nist.csd.pm.pap.serialization.pml.PMLDeserializer; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import java.util.*; +import static gov.nist.csd.pm.common.graph.node.NodeType.*; import static gov.nist.csd.pm.common.graph.node.Properties.NO_PROPERTIES; import static gov.nist.csd.pm.common.graph.node.Properties.toProperties; import static org.junit.jupiter.api.Assertions.*; diff --git a/src/test/java/gov/nist/csd/pm/pap/query/OperationsQuerierTest.java b/src/test/java/gov/nist/csd/pm/pap/query/OperationsQuerierTest.java index da255f6c4..8577bf5a1 100644 --- a/src/test/java/gov/nist/csd/pm/pap/query/OperationsQuerierTest.java +++ b/src/test/java/gov/nist/csd/pm/pap/query/OperationsQuerierTest.java @@ -6,7 +6,7 @@ import gov.nist.csd.pm.pap.PAPTestInitializer; import gov.nist.csd.pm.common.exception.OperationDoesNotExistException; import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.model.context.UserContext; import gov.nist.csd.pm.util.SamplePolicy; import org.junit.jupiter.api.Nested; diff --git a/src/test/java/gov/nist/csd/pm/pap/serialization/JSONSerializationTest.java b/src/test/java/gov/nist/csd/pm/pap/serialization/JSONSerializationTest.java index 8f6d5e566..a4f51399c 100644 --- a/src/test/java/gov/nist/csd/pm/pap/serialization/JSONSerializationTest.java +++ b/src/test/java/gov/nist/csd/pm/pap/serialization/JSONSerializationTest.java @@ -4,9 +4,9 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.common.graph.relationship.AccessRightSet; import gov.nist.csd.pm.pap.query.model.context.UserContext; -import gov.nist.csd.pm.common.serialization.json.JSONDeserializer; -import gov.nist.csd.pm.common.serialization.json.JSONGraph; -import gov.nist.csd.pm.common.serialization.json.JSONPolicy; +import gov.nist.csd.pm.pap.serialization.json.JSONDeserializer; +import gov.nist.csd.pm.pap.serialization.json.JSONGraph; +import gov.nist.csd.pm.pap.serialization.json.JSONPolicy; import org.junit.jupiter.api.Test; import java.io.IOException; diff --git a/src/test/java/gov/nist/csd/pm/pap/serialization/PMLTest.java b/src/test/java/gov/nist/csd/pm/pap/serialization/PMLTest.java index 40c6aadca..a89af20eb 100644 --- a/src/test/java/gov/nist/csd/pm/pap/serialization/PMLTest.java +++ b/src/test/java/gov/nist/csd/pm/pap/serialization/PMLTest.java @@ -2,13 +2,13 @@ import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.executable.operation.PMLOperationWrapper; -import gov.nist.csd.pm.common.serialization.pml.PMLDeserializer; +import gov.nist.csd.pm.pap.serialization.pml.PMLDeserializer; import gov.nist.csd.pm.impl.memory.pap.MemoryPAP; import gov.nist.csd.pm.pap.query.model.context.UserContext; import gov.nist.csd.pm.common.exception.PMException; -import gov.nist.csd.pm.common.serialization.pml.PMLSerializer; +import gov.nist.csd.pm.pap.serialization.pml.PMLSerializer; import gov.nist.csd.pm.util.PolicyEquals; import gov.nist.csd.pm.util.SamplePolicy; import org.junit.jupiter.api.Test; diff --git a/src/test/java/gov/nist/csd/pm/pap/serialization/SerializationTest.java b/src/test/java/gov/nist/csd/pm/pap/serialization/SerializationTest.java index ae6278b87..aedf1bc15 100644 --- a/src/test/java/gov/nist/csd/pm/pap/serialization/SerializationTest.java +++ b/src/test/java/gov/nist/csd/pm/pap/serialization/SerializationTest.java @@ -2,10 +2,10 @@ import gov.nist.csd.pm.impl.memory.pap.MemoryPAP; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.serialization.json.JSONDeserializer; -import gov.nist.csd.pm.common.serialization.json.JSONSerializer; -import gov.nist.csd.pm.common.serialization.pml.PMLDeserializer; -import gov.nist.csd.pm.common.serialization.pml.PMLSerializer; +import gov.nist.csd.pm.pap.serialization.json.JSONDeserializer; +import gov.nist.csd.pm.pap.serialization.json.JSONSerializer; +import gov.nist.csd.pm.pap.serialization.pml.PMLDeserializer; +import gov.nist.csd.pm.pap.serialization.pml.PMLSerializer; import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.query.model.context.UserContext; import gov.nist.csd.pm.util.PolicyEquals; diff --git a/src/test/java/gov/nist/csd/pm/pdp/PDPTest.java b/src/test/java/gov/nist/csd/pm/pdp/PDPTest.java index 9ec5ef013..dceb77237 100644 --- a/src/test/java/gov/nist/csd/pm/pdp/PDPTest.java +++ b/src/test/java/gov/nist/csd/pm/pdp/PDPTest.java @@ -11,7 +11,6 @@ import gov.nist.csd.pm.common.prohibition.ProhibitionSubject; import gov.nist.csd.pm.pap.query.model.explain.*; import gov.nist.csd.pm.common.routine.Routine; -import gov.nist.csd.pm.pdp.exception.UnauthorizedException; import org.junit.jupiter.api.Test; import java.util.Collections; @@ -19,7 +18,7 @@ import java.util.Map; import static gov.nist.csd.pm.pap.PAPTest.testAdminPolicy; -import static gov.nist.csd.pm.common.op.AdminAccessRights.CREATE_OBJECT_ATTRIBUTE; +import static gov.nist.csd.pm.pap.AdminAccessRights.CREATE_OBJECT_ATTRIBUTE; import static gov.nist.csd.pm.common.op.Operation.NAME_OPERAND; import static gov.nist.csd.pm.common.op.graph.GraphOp.ASCENDANT_OPERAND; import static gov.nist.csd.pm.common.op.graph.GraphOp.DESCENDANTS_OPERAND; diff --git a/src/test/java/gov/nist/csd/pm/pdp/PDPTxTest.java b/src/test/java/gov/nist/csd/pm/pdp/PDPTxTest.java index edefb2da5..a3ae4ea63 100644 --- a/src/test/java/gov/nist/csd/pm/pdp/PDPTxTest.java +++ b/src/test/java/gov/nist/csd/pm/pdp/PDPTxTest.java @@ -3,11 +3,10 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.impl.memory.pap.MemoryPAP; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.model.context.UserContext; -import gov.nist.csd.pm.common.serialization.json.JSONSerializer; -import gov.nist.csd.pm.common.serialization.pml.PMLDeserializer; -import gov.nist.csd.pm.pdp.exception.UnauthorizedException; +import gov.nist.csd.pm.pap.serialization.json.JSONSerializer; +import gov.nist.csd.pm.pap.serialization.pml.PMLDeserializer; import org.junit.jupiter.api.Test; import java.util.List; diff --git a/src/test/java/gov/nist/csd/pm/pdp/PMLBootstrapperTest.java b/src/test/java/gov/nist/csd/pm/pdp/PMLBootstrapperTest.java index 338e9b5c0..50060323f 100644 --- a/src/test/java/gov/nist/csd/pm/pdp/PMLBootstrapperTest.java +++ b/src/test/java/gov/nist/csd/pm/pdp/PMLBootstrapperTest.java @@ -4,7 +4,7 @@ import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.pml.executable.operation.PMLOperationWrapper; import gov.nist.csd.pm.pap.pml.executable.routine.PMLRoutineWrapper; import gov.nist.csd.pm.pap.pml.value.StringValue; diff --git a/src/test/java/gov/nist/csd/pm/pdp/PrivilegeCheckerTest.java b/src/test/java/gov/nist/csd/pm/pdp/PrivilegeCheckerTest.java index 313b233cc..ede2d6205 100644 --- a/src/test/java/gov/nist/csd/pm/pdp/PrivilegeCheckerTest.java +++ b/src/test/java/gov/nist/csd/pm/pdp/PrivilegeCheckerTest.java @@ -2,13 +2,12 @@ import gov.nist.csd.pm.common.graph.relationship.AccessRightSet; import gov.nist.csd.pm.impl.memory.pap.MemoryPAP; -import gov.nist.csd.pm.common.op.AdminAccessRights; +import gov.nist.csd.pm.pap.AdminAccessRights; import gov.nist.csd.pm.pap.admin.AdminPolicyNode; import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.pap.query.model.context.UserContext; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.common.exception.PMException; -import gov.nist.csd.pm.pdp.exception.UnauthorizedException; import org.junit.jupiter.api.Test; import java.util.List; diff --git a/src/test/java/gov/nist/csd/pm/pdp/adjudicator/PrivilegeCheckerTest.java b/src/test/java/gov/nist/csd/pm/pdp/adjudicator/PrivilegeCheckerTest.java index f96321a04..e71b352a6 100644 --- a/src/test/java/gov/nist/csd/pm/pdp/adjudicator/PrivilegeCheckerTest.java +++ b/src/test/java/gov/nist/csd/pm/pdp/adjudicator/PrivilegeCheckerTest.java @@ -2,8 +2,8 @@ import gov.nist.csd.pm.impl.memory.pap.MemoryPAP; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; -import gov.nist.csd.pm.common.serialization.pml.PMLDeserializer; +import gov.nist.csd.pm.pap.PrivilegeChecker; +import gov.nist.csd.pm.pap.serialization.pml.PMLDeserializer; import gov.nist.csd.pm.common.exception.NodeDoesNotExistException; import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.query.model.context.UserContext; diff --git a/src/test/java/gov/nist/csd/pm/pdp/modification/GraphModificationAdjudicatorTest.java b/src/test/java/gov/nist/csd/pm/pdp/modification/GraphModificationAdjudicatorTest.java index bb2b7901c..fc4aa6282 100644 --- a/src/test/java/gov/nist/csd/pm/pdp/modification/GraphModificationAdjudicatorTest.java +++ b/src/test/java/gov/nist/csd/pm/pdp/modification/GraphModificationAdjudicatorTest.java @@ -4,15 +4,15 @@ import gov.nist.csd.pm.common.graph.node.NodeType; import gov.nist.csd.pm.common.graph.relationship.AccessRightSet; import gov.nist.csd.pm.common.graph.relationship.Association; -import gov.nist.csd.pm.common.obligation.EventContext; +import gov.nist.csd.pm.common.event.EventContext; import gov.nist.csd.pm.common.op.graph.*; import gov.nist.csd.pm.epp.EPP; import gov.nist.csd.pm.impl.memory.pap.MemoryPAP; import gov.nist.csd.pm.pap.PAP; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.pap.query.model.context.UserContext; import gov.nist.csd.pm.pdp.PDP; -import gov.nist.csd.pm.pdp.exception.UnauthorizedException; +import gov.nist.csd.pm.pdp.UnauthorizedException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/src/test/java/gov/nist/csd/pm/pdp/modification/ObligationsModificationAdjudicatorTest.java b/src/test/java/gov/nist/csd/pm/pdp/modification/ObligationsModificationAdjudicatorTest.java index d4b8551a6..cd86d19b1 100644 --- a/src/test/java/gov/nist/csd/pm/pdp/modification/ObligationsModificationAdjudicatorTest.java +++ b/src/test/java/gov/nist/csd/pm/pdp/modification/ObligationsModificationAdjudicatorTest.java @@ -11,7 +11,7 @@ import gov.nist.csd.pm.pap.pml.pattern.subject.SubjectPattern; import gov.nist.csd.pm.pap.query.model.context.UserContext; import gov.nist.csd.pm.pdp.PDP; -import gov.nist.csd.pm.pdp.exception.UnauthorizedException; +import gov.nist.csd.pm.pdp.UnauthorizedException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/src/test/java/gov/nist/csd/pm/pdp/modification/OperationsModificationAdjudicatorTest.java b/src/test/java/gov/nist/csd/pm/pdp/modification/OperationsModificationAdjudicatorTest.java index a57eb64c7..23ec7f580 100644 --- a/src/test/java/gov/nist/csd/pm/pdp/modification/OperationsModificationAdjudicatorTest.java +++ b/src/test/java/gov/nist/csd/pm/pdp/modification/OperationsModificationAdjudicatorTest.java @@ -2,18 +2,18 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.common.graph.relationship.AccessRightSet; -import gov.nist.csd.pm.common.obligation.EventContext; +import gov.nist.csd.pm.common.event.EventContext; import gov.nist.csd.pm.epp.EPP; import gov.nist.csd.pm.impl.memory.pap.MemoryPAP; import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.common.op.Operation; -import gov.nist.csd.pm.common.op.PrivilegeChecker; +import gov.nist.csd.pm.pap.PrivilegeChecker; import gov.nist.csd.pm.common.op.operation.CreateAdminOperationOp; import gov.nist.csd.pm.common.op.operation.DeleteAdminOperationOp; import gov.nist.csd.pm.common.op.operation.SetResourceOperationsOp; import gov.nist.csd.pm.pap.query.model.context.UserContext; import gov.nist.csd.pm.pdp.PDP; -import gov.nist.csd.pm.pdp.exception.UnauthorizedException; +import gov.nist.csd.pm.pdp.UnauthorizedException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/src/test/java/gov/nist/csd/pm/pdp/modification/ProhibitionsModificationAdjudicatorTest.java b/src/test/java/gov/nist/csd/pm/pdp/modification/ProhibitionsModificationAdjudicatorTest.java index 35e781b6b..f19b9f87a 100644 --- a/src/test/java/gov/nist/csd/pm/pdp/modification/ProhibitionsModificationAdjudicatorTest.java +++ b/src/test/java/gov/nist/csd/pm/pdp/modification/ProhibitionsModificationAdjudicatorTest.java @@ -2,7 +2,7 @@ import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.common.graph.relationship.AccessRightSet; -import gov.nist.csd.pm.common.obligation.EventContext; +import gov.nist.csd.pm.common.event.EventContext; import gov.nist.csd.pm.common.prohibition.ContainerCondition; import gov.nist.csd.pm.common.prohibition.ProhibitionSubject; import gov.nist.csd.pm.epp.EPP; @@ -12,7 +12,7 @@ import gov.nist.csd.pm.common.op.prohibition.DeleteProhibitionOp; import gov.nist.csd.pm.pap.query.model.context.UserContext; import gov.nist.csd.pm.pdp.PDP; -import gov.nist.csd.pm.pdp.exception.UnauthorizedException; +import gov.nist.csd.pm.pdp.UnauthorizedException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/src/test/java/gov/nist/csd/pm/pdp/modification/RoutinesModificationAdjudicatorTest.java b/src/test/java/gov/nist/csd/pm/pdp/modification/RoutinesModificationAdjudicatorTest.java index 595de5d65..1c1128326 100644 --- a/src/test/java/gov/nist/csd/pm/pdp/modification/RoutinesModificationAdjudicatorTest.java +++ b/src/test/java/gov/nist/csd/pm/pdp/modification/RoutinesModificationAdjudicatorTest.java @@ -1,7 +1,7 @@ package gov.nist.csd.pm.pdp.modification; import gov.nist.csd.pm.common.exception.PMException; -import gov.nist.csd.pm.common.obligation.EventContext; +import gov.nist.csd.pm.common.event.EventContext; import gov.nist.csd.pm.epp.EPP; import gov.nist.csd.pm.impl.memory.pap.MemoryPAP; import gov.nist.csd.pm.pap.PAP; @@ -10,7 +10,7 @@ import gov.nist.csd.pm.pap.query.model.context.UserContext; import gov.nist.csd.pm.common.routine.Routine; import gov.nist.csd.pm.pdp.PDP; -import gov.nist.csd.pm.pdp.exception.UnauthorizedException; +import gov.nist.csd.pm.pdp.UnauthorizedException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/src/test/java/gov/nist/csd/pm/pdp/modification/TestEventSubscriber.java b/src/test/java/gov/nist/csd/pm/pdp/modification/TestEventSubscriber.java index 9a5b6682e..18c0f6820 100644 --- a/src/test/java/gov/nist/csd/pm/pdp/modification/TestEventSubscriber.java +++ b/src/test/java/gov/nist/csd/pm/pdp/modification/TestEventSubscriber.java @@ -1,7 +1,7 @@ package gov.nist.csd.pm.pdp.modification; import gov.nist.csd.pm.common.exception.PMException; -import gov.nist.csd.pm.common.obligation.EventContext; +import gov.nist.csd.pm.common.event.EventContext; import gov.nist.csd.pm.common.event.EventSubscriber; public class TestEventSubscriber implements EventSubscriber { diff --git a/src/test/java/gov/nist/csd/pm/util/SamplePolicy.java b/src/test/java/gov/nist/csd/pm/util/SamplePolicy.java index 53ebc7cf5..0c716286f 100644 --- a/src/test/java/gov/nist/csd/pm/util/SamplePolicy.java +++ b/src/test/java/gov/nist/csd/pm/util/SamplePolicy.java @@ -3,8 +3,8 @@ import gov.nist.csd.pm.common.graph.relationship.AccessRightSet; import gov.nist.csd.pm.pap.PAP; import gov.nist.csd.pm.pap.admin.AdminPolicyNode; -import gov.nist.csd.pm.common.serialization.json.JSONDeserializer; -import gov.nist.csd.pm.common.serialization.pml.PMLDeserializer; +import gov.nist.csd.pm.pap.serialization.json.JSONDeserializer; +import gov.nist.csd.pm.pap.serialization.pml.PMLDeserializer; import gov.nist.csd.pm.common.exception.PMException; import gov.nist.csd.pm.pap.query.model.context.UserContext; import org.apache.commons.io.IOUtils;