Class ProcessSpaceScopeResolver
java.lang.Object
org.exoplatform.processes.mcp.ProcessSpaceScopeResolver
- All Implemented Interfaces:
io.meeds.mcp.server.plugin.SpaceScopeResolver
@Service("processSpaceScopeResolver")
@Profile("mcp-server")
public class ProcessSpaceScopeResolver
extends Object
implements io.meeds.mcp.server.plugin.SpaceScopeResolver
Tells which space a process (a workflow) belongs to, for the space scope of
the processes tools: the space of the process's project, when every manager
of that project is a role of one and the same space group
(
<role>:/spaces/<name>), the rule of the task add-on's project
resolver. A project with a user manager, a group outside the spaces or a
second space among its managers, a missing process, project or space
belong to no space. The process is read as the system (null user
id), for its project id only, never for an authorization flag: the tools
read the process again with the caller's memberships and gate on its
acl. The read gives a project id only, never returned to the model,
since a space scope decision needs the space of any process, whoever asks.
Its only visible effect is that a process id outside the call's space is
refused by the scope, and one inside it that the caller may not submit to,
by the tool's own check.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionProcessSpaceScopeResolver(org.exoplatform.processes.service.ProcessesService processesService, org.exoplatform.task.service.ProjectService projectService, org.exoplatform.social.core.space.spi.SpaceService spaceService) -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.meeds.mcp.server.plugin.SpaceScopeResolver
canEdit
-
Field Details
-
NAME
-
-
Constructor Details
-
ProcessSpaceScopeResolver
public ProcessSpaceScopeResolver(org.exoplatform.processes.service.ProcessesService processesService, org.exoplatform.task.service.ProjectService projectService, org.exoplatform.social.core.space.spi.SpaceService spaceService) - Parameters:
processesService- reads the processprojectService- reads the process's projectspaceService- reads the space of a group
-
-
Method Details
-
getName
-
spaceOf
- Specified by:
spaceOfin interfaceio.meeds.mcp.server.plugin.SpaceScopeResolver- Parameters:
objectId- the process (workflow) id- Returns:
- the id of the space of the process's project, or null for a project that isn't managed through exactly one space, a missing process, project or space, an id that isn't one, or a lookup that fails
-
spaceOfProject
- Parameters:
projectId- the id of a process project- Returns:
- the id of the space whose group all the project's managers are roles of, else null: any manager that is a user, a group outside the spaces or a role of another group gives none, and so does a missing project, a zero id included
-