com.ibm.portal.resolver.helper.cor
Class SingleContentLocationFactory
java.lang.Object
com.ibm.portal.resolver.helper.cor.AbstractContentLocationFactory
com.ibm.portal.resolver.helper.cor.SingleContentLocationFactory
public abstract class SingleContentLocationFactory
- extends AbstractContentLocationFactory
Content Operations Registry (COR) ContentLocationFactory
that
dispatches to one single content location. Create a subclass of this class
and pass an instance of the content location to be used as an initialization
parameter. Per default the SingleContentLocationFactory
will accept
all URIs that match the given URI scheme. If a different matching policy is
required, override the isValid(URI)
method.
- Since:
- 6.1.0
- See Also:
DefaultContentLocation
Constructor Summary |
protected |
SingleContentLocationFactory()
Just keep the defaults and let the object initialize itself via
IExecutableExtension.setInitializationData(IConfigurationElement, String, Object)
. |
protected |
SingleContentLocationFactory(java.lang.String aDefaultScheme,
ContentLocation aLocation)
Default initialization |
Method Summary |
ContentLocation |
getContentLocation(java.lang.String locationId)
|
ContentLocation |
getContentLocation(java.net.URI uri)
|
protected java.lang.String |
getScheme()
|
protected java.lang.String[] |
getSchemes()
|
protected boolean |
isValid(java.net.URI uri)
Checks, if the URI can be handled by this content location factory |
void |
setInitializationData(org.eclipse.core.runtime.IConfigurationElement aConfig,
java.lang.String aPropertyName,
java.lang.Object aData)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SingleContentLocationFactory
protected SingleContentLocationFactory()
- Just keep the defaults and let the object initialize itself via
IExecutableExtension.setInitializationData(IConfigurationElement, String, Object)
.
SingleContentLocationFactory
protected SingleContentLocationFactory(java.lang.String aDefaultScheme,
ContentLocation aLocation)
- Default initialization
- Parameters:
aDefaultScheme
- URI scheme that this content location factory matches. This
value should match the match.uri.scheme
value in
the contentLocationType
extension in the
plugin.xml
.aLocation
- implementatoin of the content location, see
DefaultContentLocation
for a convenience class
getContentLocation
public ContentLocation getContentLocation(java.lang.String locationId)
getContentLocation
public ContentLocation getContentLocation(java.net.URI uri)
getScheme
protected java.lang.String getScheme()
- Overrides:
getScheme
in class AbstractContentLocationFactory
- Returns:
- the scheme that this location factory matches
getSchemes
protected java.lang.String[] getSchemes()
- Overrides:
getSchemes
in class AbstractContentLocationFactory
- Returns:
- the schemes
isValid
protected boolean isValid(java.net.URI uri)
- Description copied from class:
AbstractContentLocationFactory
- Checks, if the URI can be handled by this content location factory
- Specified by:
isValid
in class AbstractContentLocationFactory
- Parameters:
uri
- URI to check
- Returns:
- true, if the URI can be handled, else false
setInitializationData
public void setInitializationData(org.eclipse.core.runtime.IConfigurationElement aConfig,
java.lang.String aPropertyName,
java.lang.Object aData)
throws org.eclipse.core.runtime.CoreException
- Overrides:
setInitializationData
in class AbstractContentLocationFactory
- Throws:
org.eclipse.core.runtime.CoreException