Skip to content

Commit

Permalink
package refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua-roberts committed Jan 7, 2025
1 parent ae57769 commit 5442eef
Show file tree
Hide file tree
Showing 140 changed files with 224 additions and 309 deletions.
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/gov/nist/csd/pm/common/op/Operation.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/gov/nist/csd/pm/common/op/graph/AssignOp.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
@@ -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.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
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;

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{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/gov/nist/csd/pm/common/op/graph/DeassignOp.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {

Expand Down
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

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;

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<Void> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Void> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Void> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Void> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Void> {

Expand Down
Loading

0 comments on commit 5442eef

Please sign in to comment.