Package org.iam.policy.model
Class MCPStatement
java.lang.Object
org.iam.policy.grammer.Statement
org.iam.policy.model.MCPStatement
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.iam.policy.grammer.Statement
Statement.VarEffect -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.MCPStatement(Statement statement) Constructs an MCPStatement from a Statement object. -
Method Summary
Modifier and TypeMethodDescriptionorg.mcp.core.MCPBitVectorReturns the symbolic encoding node for this statement.org.mcp.core.MCPBitVectorComputes and returns the symbolic encoding node for this statement.voidInitializes the MCPFactory with domain variables for this statement.static voidsetMCPFactory(org.mcp.core.MCPFactory MCPFactory) Sets the MCPFactory for all MCPStatement instances.toString()Returns a string representation of this MCPStatement.Methods inherited from class org.iam.policy.grammer.Statement
equals, getAction, getCondition, getEffect, getPrincipal, getResource, getSid, hashCode, setAction, setCondition, setEffect, setPrincipal, setResource, setSid
-
Constructor Details
-
MCPStatement
public MCPStatement()Default constructor. -
MCPStatement
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
Returns a string representation of this MCPStatement.
-