Class MCPStatement

java.lang.Object
org.iam.policy.grammer.Statement
org.iam.policy.model.MCPStatement

public class MCPStatement extends Statement
MCPStatement extends Statement and provides symbolic encoding for statements.

Supports initialization of symbolic domains and computation of the symbolic node for principals, actions, resources, and conditions.

Since:
2025-02-28
Author:
  • Constructor Details

    • MCPStatement

      public MCPStatement()
      Default constructor.
    • MCPStatement

      public MCPStatement(Statement statement)
      Constructs an MCPStatement from a Statement object. Initializes principals and conditions for symbolic encoding.
      Parameters:
      statement - the Statement to convert
  • Method Details

    • setMCPFactory

      public static void setMCPFactory(org.mcp.core.MCPFactory MCPFactory)
      Sets the MCPFactory for all MCPStatement instances.
      Parameters:
      MCPFactory - the MCPFactory to use
    • initialMCPFactory

      public void initialMCPFactory()
      Initializes the MCPFactory with domain variables for this statement. Adds principals, actions, resources, and conditions to the symbolic domain.
    • getMCPNodeCalculation

      public org.mcp.core.MCPBitVector getMCPNodeCalculation()
      Computes and returns the symbolic encoding node for this statement. Combines principals, actions, resources, and conditions using logical AND.
      Returns:
      the MCPBitVector node for this statement
    • getMCPNode

      public org.mcp.core.MCPBitVector getMCPNode()
      Returns the symbolic encoding node for this statement.
      Returns:
      the MCPBitVector node
    • toString

      public String toString()
      Returns a string representation of this MCPStatement.
      Overrides:
      toString in class Object
      Returns:
      a string representation