DomainConfig

Struct DomainConfig 

Source
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: Uuid

Unique identifier for the domain

§workspace_id: Uuid

Parent workspace identifier

§name: String

Domain 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

Source

pub fn new(name: String, workspace_id: Uuid) -> DomainConfig

Create a new DomainConfig

Source

pub fn with_id(id: Uuid, name: String, workspace_id: Uuid) -> DomainConfig

Create a DomainConfig with a specific ID

Source

pub fn with_description(self, description: String) -> DomainConfig

Set description

Source

pub fn with_owner(self, owner: DomainOwner) -> DomainConfig

Set owner

Source

pub fn add_table(&mut self, table_id: Uuid)

Add a table ID

Source

pub fn remove_table(&mut self, table_id: Uuid) -> bool

Remove a table ID

Source

pub fn add_product(&mut self, product_id: Uuid)

Add a product ID

Source

pub fn add_asset(&mut self, asset_id: Uuid)

Add an asset ID

Source

pub fn add_process(&mut self, process_id: Uuid)

Add a process ID

Source

pub fn add_decision(&mut self, decision_id: Uuid)

Add a decision ID

Source

pub fn add_system(&mut self, system_id: Uuid)

Add a system ID

Source

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

Source

pub fn get_view_position( &self, view_mode: &str, entity_id: &str, ) -> Option<&ViewPosition>

Get view position for an entity in a view mode

Source

pub fn from_yaml(yaml_content: &str) -> Result<DomainConfig, Error>

Import from YAML

Source

pub fn to_yaml(&self) -> Result<String, Error>

Export to YAML

Source

pub fn from_json(json_content: &str) -> Result<DomainConfig, Error>

Import from JSON

Source

pub fn to_json(&self) -> Result<String, Error>

Export to JSON

Source

pub fn to_json_pretty(&self) -> Result<String, Error>

Export to pretty JSON

Trait Implementations§

Source§

impl Clone for DomainConfig

Source§

fn clone(&self) -> DomainConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DomainConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for DomainConfig

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<DomainConfig, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for DomainConfig

Source§

fn eq(&self, other: &DomainConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for DomainConfig

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for DomainConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,