public class DefaultDescriptorContext extends java.lang.Object implements DescriptorContext
DescriptorFactory, test.oracle.adf.share.services.DescriptorContextTests| Constructor and Description |
|---|
DefaultDescriptorContext(javax.naming.Context namingContext)
The primary constructor called by the factory creation code path.
|
DefaultDescriptorContext(java.net.URL jarURL) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getJarFileName() |
java.lang.String |
getJarName() |
java.net.URL |
getJarURL() |
java.util.jar.Manifest |
getManifest() |
javax.naming.Context |
getNamingContext() |
java.lang.String |
getString(java.util.Collection<java.lang.String> descriptorNames, java.lang.String suffix) |
java.lang.String |
getString(java.lang.String[] descriptorNames, java.lang.String suffix) |
int |
hashCode() |
boolean |
isDescriptorVisible(java.util.Collection<java.lang.String> names, boolean checkParents) |
boolean |
isDescriptorVisible(java.lang.String[] names, boolean checkParents)
See overloaded method.
|
boolean |
isPackageVisible(java.lang.String packageName, boolean checkParents)
Scan all manifest relevant packages (including the main one) and bundles to determine if any rule causes the package to be made explicitly visible or not.
|
boolean |
jarExists() |
java.lang.String |
toString() |
public DefaultDescriptorContext(java.net.URL jarURL)
jarURL - May be null if the class loader context should be used, but this is actually only used for unit tests.java.lang.RuntimeExceptionpublic DefaultDescriptorContext(javax.naming.Context namingContext)
namingContext -public javax.naming.Context getNamingContext()
getNamingContext in interface DescriptorContextpublic java.net.URL getJarURL()
getJarURL in interface DescriptorContext
public java.lang.String getJarName()
throws java.io.IOException
getJarName in interface DescriptorContextjava.io.IOException
public java.lang.String getJarFileName()
throws java.io.IOException
getJarFileName in interface DescriptorContextjava.io.IOException
public java.lang.String getString(java.lang.String[] descriptorNames,
java.lang.String suffix)
throws java.io.IOException
getString in interface DescriptorContextjava.io.IOException - if jar access fails (getLastModified, getManifest, etc)getString(Collection<String> descriptorNames, String suffix)
public java.lang.String getString(java.util.Collection<java.lang.String> descriptorNames,
java.lang.String suffix)
throws java.io.IOException
getString in interface DescriptorContextdescriptorNames - components of the bundle key to buildsuffix - see oracle.adf.share.services.DescriptorConstants.ALL_SUFFIXESThe key will likely have 2 parts:
"ADF_DataControl", "model/AppModule", and the suffix part (ex: "name")
java.io.IOException - if jar access fails (getLastModified, getManifest, etc)
public boolean isDescriptorVisible(java.lang.String[] names,
boolean checkParents)
throws java.io.IOException
DescriptorContextisDescriptorVisible in interface DescriptorContextjava.io.IOException
public boolean isDescriptorVisible(java.util.Collection<java.lang.String> names,
boolean checkParents)
throws java.io.IOException
isDescriptorVisible in interface DescriptorContextjava.io.IOException
public boolean isPackageVisible(java.lang.String packageName,
boolean checkParents)
throws java.io.IOException
DescriptorContextisPackageVisible in interface DescriptorContextpackageName - null or empty string for the main jar manifest attribute (and resource bundles). Otherwise, the packageName to check for "Design-Visibility" in the jar manifest. If the value has multiple elements (separated by either '/' or '.') then the following rules apply:
checkParents - Passing false will disable the inheritance checking described here and just check the currently requested package.java.io.IOException
public java.util.jar.Manifest getManifest()
throws java.io.IOException
getManifest in interface DescriptorContextjava.io.IOExceptionpublic boolean jarExists()
jarExists in interface DescriptorContextpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object