use of org.finos.legend.sdlc.server.inmemory.domain.api.InMemoryProject in project legend-sdlc by finos.
the class InMemoryEntityApi method getWorkspaceEntityModificationContext.
@Override
public EntityModificationContext getWorkspaceEntityModificationContext(String projectId, String workspaceId, WorkspaceType workspaceType) {
InMemoryProject project = this.backend.getProject(projectId);
InMemoryWorkspace workspace = workspaceType == WorkspaceType.GROUP ? project.getGroupWorkspace(workspaceId) : project.getUserWorkspace(workspaceId);
return new InMemoryEntityModificationContext(workspace.getCurrentRevision().getEntities());
}
use of org.finos.legend.sdlc.server.inmemory.domain.api.InMemoryProject in project legend-sdlc by finos.
the class InMemoryEntityApi method getVersionEntityAccessContext.
@Override
public EntityAccessContext getVersionEntityAccessContext(String projectId, VersionId versionId) {
InMemoryProject project = this.backend.getProject(projectId);
InMemoryVersion version = project.getVersion(versionId.toVersionIdString());
return new InMemoryEntityAccessContext(version.getRevision().getEntities());
}
use of org.finos.legend.sdlc.server.inmemory.domain.api.InMemoryProject in project legend-sdlc by finos.
the class InMemoryEntityApi method getWorkspaceEntityAccessContext.
@Override
public EntityAccessContext getWorkspaceEntityAccessContext(String projectId, String workspaceId, WorkspaceType workspaceType) {
InMemoryProject project = this.backend.getProject(projectId);
InMemoryWorkspace workspace = workspaceType == WorkspaceType.GROUP ? project.getGroupWorkspace(workspaceId) : project.getUserWorkspace(workspaceId);
return new InMemoryEntityAccessContext(workspace.getCurrentRevision().getEntities());
}
use of org.finos.legend.sdlc.server.inmemory.domain.api.InMemoryProject in project legend-sdlc by finos.
the class InMemoryEntityApi method getWorkspaceRevisionEntityAccessContext.
@Override
public EntityAccessContext getWorkspaceRevisionEntityAccessContext(String projectId, String workspaceId, WorkspaceType workspaceType, String revisionId) {
InMemoryProject project = this.backend.getProject(projectId);
InMemoryWorkspace workspace = workspaceType == WorkspaceType.GROUP ? project.getGroupWorkspace(workspaceId) : project.getUserWorkspace(workspaceId);
InMemoryRevision revision = workspace.getRevision(revisionId);
return new InMemoryEntityAccessContext(revision.getEntities());
}
use of org.finos.legend.sdlc.server.inmemory.domain.api.InMemoryProject in project legend-sdlc by finos.
the class InMemoryProjectConfigurationApi method getProjectRevisionProjectConfiguration.
@Override
public ProjectConfiguration getProjectRevisionProjectConfiguration(String projectId, String revisionId) {
InMemoryProject project = this.backend.getProject(projectId);
InMemoryRevision revision = project.getRevision(revisionId);
return revision.getConfiguration();
}
Aggregations