Tenant Dto
OpenFrame Documentation
Get the most out of OpenFrame · Book 30 minutes with Conrad, 25 years in IT. He'll show you what Mingo and Fae can take off your list.
OpenFrame Documentation
Tenant Dto is a small contract module in the openframe-test-service-core library. It supplies the finite sets of values used by the test suite to describe a tenant's subscription tier and lifecycle state. The module is executed by this repository's OpenFrame test service; it does not implement tenant persistence, authorization, billing, or state transitions.
The implementation is supplied by OpenFrame OSS Library through the com.openframe.oss:openframe-test-service-core dependency. This repository assembles that library into its test-service runtime.
TenantPlan.TenantStatus.flowchart LR
TestFixtures["Test Fixtures and DTO Builders"] --> TenantPlan["TenantPlan"]
TestFixtures --> TenantStatus["TenantStatus"]
TenantPlan --> TestService["OpenFrame Test Service"]
TenantStatus --> TestService
TestService --> Platform["OpenFrame Tenant Platform"]
Both enumerations are leaf contracts: callers choose one declared value, then the resulting tenant representation is consumed by higher-level test flows. Neither type owns validation rules beyond the Java enum constraint, nor does either communicate with external systems.
| Component | Source | Responsibility |
|---|---|---|
TenantPlan |
TenantPlan.java | Defines the tenant subscription tier used by test DTOs. |
TenantStatus |
TenantStatus.java | Defines whether a tenant is active or inactive in test data. |
TenantPlan models four subscription tiers:
| Value | Meaning in the contract |
|---|---|
FREE |
Free tier. |
BASIC |
Basic tier. |
PREMIUM |
Premium tier. |
ENTERPRISE |
Enterprise tier. |
The enum is a vocabulary, not an entitlement engine. Code that needs to determine a feature, limit, price, or service-level behavior must apply that policy elsewhere.
TenantStatus models the two lifecycle states exposed by this test DTO contract:
| Value | Meaning in the contract |
|---|---|
ACTIVE |
The tenant is represented as active. |
INACTIVE |
The tenant is represented as inactive. |
No intermediate, pending, suspended, or deleted state is defined here. Tests requiring such behavior must use the appropriate platform model or explicitly define a separate contract rather than infer additional meanings from these values.
flowchart TD
Setup["Test Setup"] --> SelectPlan["Select TenantPlan"]
Setup --> SelectStatus["Select TenantStatus"]
SelectPlan --> BuildDto["Build Tenant Test DTO"]
SelectStatus --> BuildDto
BuildDto --> ExerciseFlow["Exercise Test Flow"]
ExerciseFlow --> AssertResult["Assert Tenant-Aware Result"]
This separation lets tests state the relevant tenant dimensions clearly while keeping plan-specific and status-specific platform behavior outside the transport vocabulary.