getWorkspaceHandler().setWorkspaceId(workspaceId);
getWorkspaceHandler().deleteWorkspace();
}
public void actionCreateWorkspace(CommandRequest request) {
final WorkspaceImpl newWorkspace = new WorkspaceImpl();
try {
buildI18nValues(request);
if (validateBeforeCreation()) {
newWorkspace.setId(UIServices.lookup().getWorkspacesManager().generateWorkspaceId());
newWorkspace.setTitle(title);
newWorkspace.setName(name);
newWorkspace.setSkinId(skinId);
newWorkspace.setEnvelopeId(envelopeId);
// Register workspace (persistent operation)
new HibernateTxFragment() {
protected void txFragment(Session session) throws Exception {
UIServices.lookup().getWorkspacesManager().addNewWorkspace(newWorkspace);