Search in sources :

Example 1 with InMemoryProject

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());
}
Also used : InMemoryProject(org.finos.legend.sdlc.server.inmemory.domain.api.InMemoryProject) InMemoryWorkspace(org.finos.legend.sdlc.server.inmemory.domain.api.InMemoryWorkspace)

Example 2 with InMemoryProject

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());
}
Also used : InMemoryProject(org.finos.legend.sdlc.server.inmemory.domain.api.InMemoryProject) InMemoryVersion(org.finos.legend.sdlc.server.inmemory.domain.api.InMemoryVersion)

Example 3 with InMemoryProject

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());
}
Also used : InMemoryProject(org.finos.legend.sdlc.server.inmemory.domain.api.InMemoryProject) InMemoryWorkspace(org.finos.legend.sdlc.server.inmemory.domain.api.InMemoryWorkspace)

Example 4 with InMemoryProject

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());
}
Also used : InMemoryRevision(org.finos.legend.sdlc.server.inmemory.domain.api.InMemoryRevision) InMemoryProject(org.finos.legend.sdlc.server.inmemory.domain.api.InMemoryProject) InMemoryWorkspace(org.finos.legend.sdlc.server.inmemory.domain.api.InMemoryWorkspace)

Example 5 with InMemoryProject

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();
}
Also used : InMemoryRevision(org.finos.legend.sdlc.server.inmemory.domain.api.InMemoryRevision) InMemoryProject(org.finos.legend.sdlc.server.inmemory.domain.api.InMemoryProject)

Aggregations

InMemoryProject (org.finos.legend.sdlc.server.inmemory.domain.api.InMemoryProject)7 InMemoryWorkspace (org.finos.legend.sdlc.server.inmemory.domain.api.InMemoryWorkspace)3 InMemoryRevision (org.finos.legend.sdlc.server.inmemory.domain.api.InMemoryRevision)2 Workspace (org.finos.legend.sdlc.domain.model.project.workspace.Workspace)1 VersionId (org.finos.legend.sdlc.domain.model.version.VersionId)1 InMemoryVersion (org.finos.legend.sdlc.server.inmemory.domain.api.InMemoryVersion)1