[MGNLCT-9] Reuse automatic workspace creation Created: 04/Jul/17  Updated: 04/Jun/18  Resolved: 22/May/18

Status: Closed
Project: Content Types
Component/s: None
Affects Version/s: 0.5.1
Fix Version/s: 1.0

Type: Task Priority: Neutral
Reporter: Ilgun Ilgun Assignee: Oanh Thai Hoang
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 1d 5h
Original Estimate: Not Specified

Issue Links:
dependency
relation
is related to MGNLCT-35 Reuse existing system to support rena... Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:
Epic Link: Content types foundation
Sprint: Saigon 142, Saigon 143, Saigon 144, Saigon 145, Saigon 146
Story Points: 3

 Description   

In version 0.5.1, workspace creation was already supported.
Reuse the existing system.



 Comments   
Comment by Ngoc Nguyenthanh [ 09/May/18 ]

Issues

  • Can't be renamed
  • Can't be deleted
    • Jackrabbit don't support for delete operator.
    • Check the API: WorkspaceImpl#deleteWorkspace => Always throws UnsupportedRepositoryOperationException

Conclusion

  • Only supports for creation.
  • Possible solution: create a Workspace placeholder with name as an alias point to a real workspace. However we need to support an API or a way for user to interact with the workspace data.
Comment by Oanh Thai Hoang [ 15/May/18 ]

Can't be renamed

--> In fact, we can rename logical workspace. All workspace names are viewed in GUI are logical name (not physical name). See one example is https://git.magnolia-cms.com/projects/PLATFORM/repos/ce/browse/magnolia-empty-webapp/src/main/webapp/WEB-INF/config/default/repositories.xml#74-78.

So we don't need to rename physical name, just rename logical and we already have all API to access, get, retrieve with logical name.

All we need now is:

Can't be deleted

--> Same as rename solution above, we can delete logical workspace name in "default" workspace. And yes, the real physical workspace still here, all we need is clean all data in this workspace.
 

Comment by Oanh Thai Hoang [ 18/May/18 ]

POC for renaming workspace is pushed to main and content-type

Comment by Viet Nguyen [ 18/May/18 ]

I've got a sample implementation here could you please consider to re-use if possible:
https://wiki.magnolia-cms.com/display/SERVICES/JCR+support+module

Comment by Ngoc Nguyenthanh [ 22/May/18 ]

A minimal definition

datasource:
  autoCreate: true
  • JCR data source is set by default. However can be specified an another class to support different definition.
  • The default namespace will be the name of content type

autoCreate will be checked whenever auto generation of a workspace is needed.

A workspace name can be set by workspace property

datasource:
  workspace: dragonFly
  autoCreate: true

 

Repository is pointing to the magnolia by default. Could be supported in another ticket.

 

Generated at Mon Feb 12 00:36:17 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.