public final class URLBasedResource extends AbstractResource
Constructor and Description |
---|
URLBasedResource(URL baseURL,
String contentPath) |
Modifier and Type | Method and Description |
---|---|
<T> T |
addAttachment(Class<T> clazz,
T value)
Attach an arbirtary object with this element.
|
<T> T |
getAttachment(Class<T> clazz)
Get the attached object for a given key
|
InputStream |
getContent() |
String |
getContentPath() |
URL |
getContentURL() |
<T> T |
removeAttachment(Class<T> clazz)
Remove an attached object for a given key
|
addCapability, addRequirement, getCapabilities, getIdentityCapability, getRequirements, isFragment, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAttachment, getAttachment, removeAttachment
public URL getContentURL()
public String getContentPath()
public InputStream getContent()
getContent
in interface XResource
getContent
in class AbstractResource
public <T> T addAttachment(Class<T> clazz, T value)
XAttachmentSupport
addAttachment
in interface XAttachmentSupport
clazz
- key for the attachmentpublic <T> T getAttachment(Class<T> clazz)
XAttachmentSupport
getAttachment
in interface XAttachmentSupport
clazz
- key for the attachmentpublic <T> T removeAttachment(Class<T> clazz)
XAttachmentSupport
removeAttachment
in interface XAttachmentSupport
clazz
- key for the attachmentCopyright © 2013 JBoss by Red Hat. All Rights Reserved.