mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 10:04:21 +00:00
[Issue: 2800] Put dynamic workflowgroup links on Collections in an array
This commit is contained in:
@@ -47,9 +47,9 @@ public class CollectionResourceWorkflowGroupHalLinkFactory
|
|||||||
Map<String, Role> roles = WorkflowUtils.getCollectionRoles(collection);
|
Map<String, Role> roles = WorkflowUtils.getCollectionRoles(collection);
|
||||||
UUID resourceUuid = UUID.fromString(halResource.getContent().getUuid());
|
UUID resourceUuid = UUID.fromString(halResource.getContent().getUuid());
|
||||||
for (Map.Entry<String, Role> entry : roles.entrySet()) {
|
for (Map.Entry<String, Role> entry : roles.entrySet()) {
|
||||||
list.add(buildLink("workflowGroups/" + entry.getKey(), getMethodOn()
|
list.add(buildLink("workflowGroups", getMethodOn()
|
||||||
.getWorkflowGroupForRole(resourceUuid, null, null,
|
.getWorkflowGroupForRole(resourceUuid, null, null,
|
||||||
entry.getKey())));
|
entry.getKey())).withName(entry.getKey()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -44,12 +44,4 @@ public abstract class HALResource<T> extends EntityModel<T> {
|
|||||||
public void setPageHeader(EmbeddedPageHeader page) {
|
public void setPageHeader(EmbeddedPageHeader page) {
|
||||||
this.pageHeader = page;
|
this.pageHeader = page;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public EntityModel<T> add(Link link) {
|
|
||||||
if (!hasLink(link.getRel())) {
|
|
||||||
return super.add(link);
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user