Skip to content

Commit a7928dc

Browse files
committed
GitHub Issue 1282: add getJobNames to reduce memory usage
GitHub Issue 1309: check sampleId scope
1 parent 272c907 commit a7928dc

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

api/src/org/labkey/api/workflow/Job.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,9 @@ public void setAttachments(List<AttachmentFile> attachments)
312312
@JsonIgnore
313313
public abstract @NotNull List<? extends ExpMaterial> getSamples();
314314

315+
@JsonIgnore
316+
public abstract @NotNull List<String> getSampleNames();
317+
315318
public void setEntities(List<WorkEntity> entities)
316319
{
317320
_entities = entities;

api/src/org/labkey/api/workflow/WorkEntity.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
import com.fasterxml.jackson.annotation.JsonProperty;
2020
import org.apache.commons.collections4.MapUtils;
2121
import org.apache.commons.lang3.StringUtils;
22+
import org.jetbrains.annotations.NotNull;
2223
import org.jetbrains.annotations.Nullable;
2324
import org.json.JSONObject;
24-
import org.labkey.api.exp.api.ExpMaterial;
2525
import org.labkey.api.security.User;
2626
import org.labkey.api.security.UserManager;
2727
import org.labkey.api.util.GUID;
@@ -76,15 +76,15 @@ public WorkEntity(Map<String, Object> map)
7676
this.setContainerId(new GUID((String) map.get("Container")));
7777
}
7878

79-
public WorkEntity(ExpMaterial sample)
79+
public WorkEntity(@NotNull Long rowId, @NotNull WorkEntity.EntityType entityType)
8080
{
81-
_entityType = EntityType.Sample;
82-
_entityValue = sample.getRowId();
81+
_entityType = entityType;
82+
_entityValue = rowId;
8383
}
8484

85-
public WorkEntity(ExpMaterial sample, WorkType workType, Long workRowId, @Nullable Long actionId)
85+
public WorkEntity(@NotNull Long rowId, @NotNull WorkEntity.EntityType entityType, WorkType workType, Long workRowId, @Nullable Long actionId)
8686
{
87-
this(sample);
87+
this(rowId, entityType);
8888
_workType = workType;
8989
_workRowId = workRowId;
9090
_actionId = actionId;

0 commit comments

Comments
 (0)