Package org.hl7.fhir.utilities.http
Class ManagedWebAccess
- java.lang.Object
-
- org.hl7.fhir.utilities.http.ManagedWebAccess
-
public class ManagedWebAccess extends Object
see security.md - manages access to the local file system by the FHIR HAPI Core library By using accessPolicy, allowedDomains and accessor, a host java application can control whether this library has direct access to the web (and which domains it is allowed to access), or whether the host application provides controlled access, or whether no access is allowed at all (in which case other information providers need to be provided)- Author:
- Grahame
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceManagedWebAccess.IWebAccessorstatic classManagedWebAccess.WebAccessPolicy
-
Constructor Summary
Constructors Constructor Description ManagedWebAccess()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ManagedWebAccessBuilderbuilder()static HTTPResultget(String url)static HTTPResultget(String url, String accept)static ManagedWebAccess.IWebAccessorgetAccessor()static ManagedWebAccess.WebAccessPolicygetAccessPolicy()static StringgetUserAgent()static HTTPResultpost(String url, byte[] content, String contentType, String accept)static HTTPResultput(String url, byte[] content, String contentType, String accept)static voidsetAccessPolicy(ManagedWebAccess.WebAccessPolicy accessPolicy)static voidsetUserAgent(String userAgent)
-
-
-
Constructor Detail
-
ManagedWebAccess
public ManagedWebAccess()
-
-
Method Detail
-
getAccessPolicy
public static ManagedWebAccess.WebAccessPolicy getAccessPolicy()
-
setAccessPolicy
public static void setAccessPolicy(ManagedWebAccess.WebAccessPolicy accessPolicy)
-
getUserAgent
public static String getUserAgent()
-
setUserAgent
public static void setUserAgent(String userAgent)
-
getAccessor
public static ManagedWebAccess.IWebAccessor getAccessor()
-
builder
public static ManagedWebAccessBuilder builder()
-
get
public static HTTPResult get(String url) throws IOException
- Throws:
IOException
-
get
public static HTTPResult get(String url, String accept) throws IOException
- Throws:
IOException
-
post
public static HTTPResult post(String url, byte[] content, String contentType, String accept) throws IOException
- Throws:
IOException
-
put
public static HTTPResult put(String url, byte[] content, String contentType, String accept) throws IOException
- Throws:
IOException
-
-