public class FilePolicyLoader extends Object implements PolicyLoader
| Constructor and Description |
|---|
FilePolicyLoader(org.osgi.framework.BundleContext context,
String policyLocation)
Creates a new instance of the file policy loader.
|
| Modifier and Type | Method and Description |
|---|---|
Document |
getPolicy()
Retrieves the policy in a document form.
|
protected Document |
loadFromFile(URL policyFileURL)
Loads the policy and converts it into a Document.
|
public FilePolicyLoader(org.osgi.framework.BundleContext context,
String policyLocation)
throws IOException
context - Used to obtain the file from the file system.policyLocation - Location of the file within the bundle classpath.IOException - If an error occurs while trying to load the policy file.protected Document loadFromFile(URL policyFileURL) throws IOException
policyFileURL - URL that is based in from the bundlecontext.IOException - If an error occurs while trying to parse the file into a Document.public Document getPolicy()
PolicyLoadergetPolicy in interface PolicyLoaderThis work is licensed under a Creative Commons Attribution 4.0 International License.