public ActivateWorkspaceResult execute(ActivateWorkspaceAction action,
ExecutionContext context) throws ActionException {
identity.checkLoggedIn();
Person person = retrievePerson();
WorkspaceId workspaceId = action.getWorkspaceId();
TranslationWorkspace workspace =
translationWorkspaceManager.getOrRegisterWorkspace(workspaceId);
String httpSessionId = getHttpSessionId();
EditorClientId editorClientId =
new EditorClientId(httpSessionId, generateEditorClientNum());
workspace
.addEditorClient(httpSessionId, editorClientId, person.getId());
// Send EnterWorkspace event to clients
EnterWorkspace event = new EnterWorkspace(editorClientId, person);
workspace.publish(event);
HLocale locale =
localeServiceImpl.getByLocaleId(workspaceId.getLocaleId());
HProject project =
projectDAO.getBySlug(workspaceId.getProjectIterationId()
.getProjectSlug());
HProjectIteration projectIteration =
projectIterationDAO.getBySlug(workspaceId
.getProjectIterationId().getProjectSlug(), workspaceId
.getProjectIterationId().getIterationSlug());
boolean isProjectActive =
isProjectIterationActive(project.getStatus(),
projectIteration.getStatus());