-
Notifications
You must be signed in to change notification settings - Fork 2
Workspace Management
This document covers the backend workspace management system, which handles the organization and tracking of physical workspaces within the Effective Office platform. The workspace module provides APIs for retrieving workspace information, managing workspace zones and utilities, and integrating with the booking system for availability checking.
For information about the booking workflow and calendar integration, see [Booking Management](Booking Management). For details about the client-side workspace display and selection, see [Room Display & Slot Management](Room Display and Slot Management).
The workspace module follows a layered architecture with clear separation between web, service, and data access layers:
Workspace Module Architecture
The workspace system is built around several core entities that represent the physical office layout and amenities:
Entity Relationship Diagram
Entity | Purpose | Key Fields |
---|---|---|
WorkspaceEntity |
Represents physical meeting rooms and workspaces |
id , name , tag , zone_id
|
WorkspaceZoneEntity |
Logical grouping of workspaces by location |
id , name
|
UtilityEntity |
Equipment and amenities available in workspaces |
id , name , icon_url
|
WorkspaceUtilityEntity |
Links workspaces to utilities with quantities |
workspace_id , utility_id , count
|
The WorkspaceController
exposes the following REST endpoints for workspace operations:
API Endpoint Structure
Method | Path | Purpose | Parameters |
---|---|---|---|
GET | /v1/workspaces/{id} |
Retrieve single workspace by ID |
id (UUID) |
GET | /v1/workspaces |
Retrieve workspaces by tag with optional booking data |
workspace_tag , with_bookings_from , with_bookings_until
|
GET | /v1/workspaces/zones |
Retrieve all workspace zones | None |
The controller integrates with BookingService
to include booking information when time range parameters are provided in the workspace query.
The WorkspaceService
implements the WorkspaceDomainService
interface and provides core business logic:
Service Operations Flow
Method | Return Type | Purpose |
---|---|---|
findById(UUID) |
Workspace? |
Retrieve workspace by unique identifier |
findAllByTag(String) |
List<Workspace> |
Filter workspaces by type (e.g., "meeting", "desk") |
findAllZones() |
List<WorkspaceZone> |
Get all organizational zones |
findCalendarIdByWorkspaceId(UUID) |
CalendarId? |
Map workspace to Google Calendar ID |
All service methods use @Transactional(readOnly = true)
for optimal database performance.
The workspace module integrates with the booking system through calendar ID mappings:
Calendar Integration Architecture
The CalendarIdRepository
maintains the mapping between workspace UUIDs and Google Calendar IDs, enabling the booking system to create events in the correct calendar for each workspace.
Workspaces track available equipment and amenities through the utility system:
Utility Association Model
The count
field in WorkspaceUtilityEntity
tracks quantity of each utility type per workspace, added in database migration V2.
The workspace module integrates with several other system components:
Integration | Purpose | Implementation |
---|---|---|
Booking Module | Availability checking and event creation |
BookingService injection in controller |
User Module | Workspace assignments and permissions | Domain service interface |
Notification Module | Workspace-related alerts | Event-driven notifications |
Authorization | API endpoint security | JWT token validation |
The controller includes booking information in workspace responses when time range parameters are provided, enabling clients to display real-time availability.