|
KIE API 6.0.0.Beta3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Resource
Generic interface to provide a Reader or InputStream for the underlying IO resource.
Method Summary | |
---|---|
ResourceConfiguration |
getConfiguration()
Returns the configuration for the resource if one is available |
InputStream |
getInputStream()
Open an InputStream to the resource, the user must close this when finished. |
Reader |
getReader()
Opens a Reader to the resource, the user most close this when finished. |
ResourceType |
getResourceType()
Returns the type of the resource if one could be inferred by the extension of the resource of if it was explicitly set. |
String |
getSourcePath()
Returns the name of the resource, if one is available. |
String |
getTargetPath()
Returns the path that should be used when writing this resource down to KieFileSystem |
Resource |
setConfiguration(ResourceConfiguration conf)
Sets the resource configuration in case it is necessary. |
Resource |
setResourceType(ResourceType type)
Sets the resource type. |
Resource |
setSourcePath(String path)
Sets this resource name. |
Resource |
setTargetPath(String path)
In case this resource should be written to a different path when writing it down to the KieFileSystem, this property allows the application to set such path. |
Method Detail |
---|
InputStream getInputStream() throws IOException
IOException
Reader getReader() throws IOException
IOException
String getSourcePath()
String getTargetPath()
ResourceType getResourceType()
ResourceConfiguration getConfiguration()
Resource setSourcePath(String path)
path
- the path of the resource
Resource setTargetPath(String path)
path
- the path of the resource
Resource setResourceType(ResourceType type)
type
- the resource type
Resource setConfiguration(ResourceConfiguration conf)
type
- the resource configuration
|
KIE API 6.0.0.Beta3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |