pub struct DomainConfig {Show 16 fields
pub id: Uuid,
pub workspace_id: Uuid,
pub name: String,
pub description: Option<String>,
pub created_at: DateTime<Utc>,
pub last_modified_at: DateTime<Utc>,
pub owner: Option<DomainOwner>,
pub systems: Vec<Uuid>,
pub tables: Vec<Uuid>,
pub products: Vec<Uuid>,
pub assets: Vec<Uuid>,
pub processes: Vec<Uuid>,
pub decisions: Vec<Uuid>,
pub view_positions: HashMap<String, HashMap<String, ViewPosition>>,
pub folder_path: Option<String>,
pub workspace_path: Option<String>,
}Expand description
DomainConfig - Configuration file for a domain (domain.yaml)
This represents the domain.yaml file that stores:
- Domain metadata (id, name, description, timestamps)
- Owner information
- References to assets (tables, products, assets, processes, decisions)
- View positions for canvas rendering
Fields§
§id: UuidUnique identifier for the domain
workspace_id: UuidParent workspace identifier
name: StringDomain name (unique within workspace, max 255 chars)
description: Option<String>Optional description of the domain’s purpose
created_at: DateTime<Utc>Creation timestamp
last_modified_at: DateTime<Utc>Last modification timestamp
owner: Option<DomainOwner>Owner information
systems: Vec<Uuid>Array of system IDs that belong to this domain
tables: Vec<Uuid>Array of ODCS table IDs that belong to this domain
products: Vec<Uuid>Array of ODPS product IDs that belong to this domain
assets: Vec<Uuid>Array of CADS compute asset IDs that belong to this domain
processes: Vec<Uuid>Array of BPMN process IDs that belong to this domain
decisions: Vec<Uuid>Array of DMN decision IDs that belong to this domain
view_positions: HashMap<String, HashMap<String, ViewPosition>>View positions for different view modes Key: view mode name (e.g., “systems”, “process”, “operational”, “analytical”, “products”) Value: Map of entity ID to position
folder_path: Option<String>Path to domain folder (for offline mode)
workspace_path: Option<String>Path to workspace root folder (for offline mode)
Implementations§
Source§impl DomainConfig
impl DomainConfig
Sourcepub fn new(name: String, workspace_id: Uuid) -> DomainConfig
pub fn new(name: String, workspace_id: Uuid) -> DomainConfig
Create a new DomainConfig
Sourcepub fn with_id(id: Uuid, name: String, workspace_id: Uuid) -> DomainConfig
pub fn with_id(id: Uuid, name: String, workspace_id: Uuid) -> DomainConfig
Create a DomainConfig with a specific ID
Sourcepub fn with_description(self, description: String) -> DomainConfig
pub fn with_description(self, description: String) -> DomainConfig
Set description
Sourcepub fn with_owner(self, owner: DomainOwner) -> DomainConfig
pub fn with_owner(self, owner: DomainOwner) -> DomainConfig
Set owner
Sourcepub fn remove_table(&mut self, table_id: Uuid) -> bool
pub fn remove_table(&mut self, table_id: Uuid) -> bool
Remove a table ID
Sourcepub fn add_product(&mut self, product_id: Uuid)
pub fn add_product(&mut self, product_id: Uuid)
Add a product ID
Sourcepub fn add_process(&mut self, process_id: Uuid)
pub fn add_process(&mut self, process_id: Uuid)
Add a process ID
Sourcepub fn add_decision(&mut self, decision_id: Uuid)
pub fn add_decision(&mut self, decision_id: Uuid)
Add a decision ID
Sourcepub fn add_system(&mut self, system_id: Uuid)
pub fn add_system(&mut self, system_id: Uuid)
Add a system ID
Sourcepub fn set_view_position(
&mut self,
view_mode: &str,
entity_id: &str,
x: f64,
y: f64,
)
pub fn set_view_position( &mut self, view_mode: &str, entity_id: &str, x: f64, y: f64, )
Set view position for an entity in a view mode
Sourcepub fn get_view_position(
&self,
view_mode: &str,
entity_id: &str,
) -> Option<&ViewPosition>
pub fn get_view_position( &self, view_mode: &str, entity_id: &str, ) -> Option<&ViewPosition>
Get view position for an entity in a view mode
Sourcepub fn to_json_pretty(&self) -> Result<String, Error>
pub fn to_json_pretty(&self) -> Result<String, Error>
Export to pretty JSON
Trait Implementations§
Source§impl Clone for DomainConfig
impl Clone for DomainConfig
Source§fn clone(&self) -> DomainConfig
fn clone(&self) -> DomainConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more