diff --git a/pic-sure-api-war/src/main/java/edu/harvard/dbmi/avillach/PicSureWarInit.java b/pic-sure-api-war/src/main/java/edu/harvard/dbmi/avillach/PicSureWarInit.java index 9bd35b08..5706f1cf 100644 --- a/pic-sure-api-war/src/main/java/edu/harvard/dbmi/avillach/PicSureWarInit.java +++ b/pic-sure-api-war/src/main/java/edu/harvard/dbmi/avillach/PicSureWarInit.java @@ -8,6 +8,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.annotation.PostConstruct; import javax.annotation.Resource; import javax.ejb.Singleton; import javax.enterprise.context.ApplicationScoped; @@ -29,10 +30,18 @@ public class PicSureWarInit { private String default_application_uuid; @Resource(mappedName = "java:global/openAccessEnabled") + private String open_access_enabled_str; + private boolean open_access_enabled; + @Resource(mappedName = "java:global/openAccessValidateUrl") private String open_access_validate_url; + @PostConstruct + public void init() { + this.open_access_enabled = Boolean.parseBoolean(open_access_enabled_str); + } + // to be able to pre modified public static final ObjectMapper objectMapper = new ObjectMapper();