Skip to content

Commit 39ecc88

Browse files
committed
[who-icatx/icatx-project#174]: Added ContextAwareCapability
1 parent 747b457 commit 39ecc88

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@
4242
<version>0.9.4</version>
4343
</dependency>
4444

45+
<dependency>
46+
<groupId>edu.stanford.protege</groupId>
47+
<artifactId>webprotege-criteria</artifactId>
48+
<version>0.9.5-WHO</version>
49+
</dependency>
50+
4551
<dependency>
4652
<groupId>org.springframework.boot</groupId>
4753
<artifactId>spring-boot-starter-test</artifactId>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package edu.stanford.protege.webprotege.authorization;
2+
3+
import com.fasterxml.jackson.annotation.JsonProperty;
4+
import edu.stanford.protege.webprotege.common.ProjectId;
5+
import edu.stanford.protege.webprotege.criteria.CompositeRootCriteria;
6+
7+
import java.util.*;
8+
9+
public record ContextAwareCapability(
10+
@JsonProperty("id") String id,
11+
@JsonProperty("contextCriteria") CompositeRootCriteria contextCriteria
12+
) implements Capability {
13+
14+
public static final String CONTEXT_AWARE_CAPABILITY = "ContextAwareCapability";
15+
16+
@Override
17+
public GenericParameterizedCapability asGenericCapability() {
18+
return new GenericParameterizedCapability(CONTEXT_AWARE_CAPABILITY, id(), new HashMap<>());
19+
}
20+
}

0 commit comments

Comments
 (0)