Package com.onec.ui

Class DocumentCommandService

java.lang.Object
com.onec.ui.DocumentCommandService

public class DocumentCommandService extends Object
Write-side commands for documents — create, update, delete, post, unpost — plus the document reconstruction needed for posting. Extracted from GenericDocumentController so the same code path is shared by the REST API and other callers (e.g. the MCP server), and access control / read-only checks are enforced in exactly one place.

Every mutating method enforces requireWritable() (global read-only mode) and UiAccessService.requireWrite(java.security.Principal, com.onec.metadata.CatalogDescriptor) against the caller's Principal, so callers never bypass the role model.