public class ResourceFactory extends Object
Convenience Factory to provide Resource implementations for the desired IO resource.
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); kbuilder.add( ResourceFactory.newUrlResource( "htp://www.domain.org/myProcess.bpmn2" ), ResourceType.BPMN2 );
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); kbuilder.add( ResourceFactory.newClassPathResource( "htp://www.domain.org/myrules.drl", getClass() ), ResourceType.DRL );
Constructor and Description |
---|
ResourceFactory() |
Modifier and Type | Method and Description |
---|---|
static ResourceChangeNotifier |
getResourceChangeNotifierService()
A Service that can be started, to provide notifications of changed Resources.
|
static ResourceChangeScanner |
getResourceChangeScannerService()
As service, that scans the disk for changes, this acts as a Monitor for the Notifer service.
|
static org.kie.api.io.Resource |
newByteArrayResource(byte[] bytes) |
static org.kie.api.io.Resource |
newClassPathResource(String path) |
static org.kie.api.io.Resource |
newClassPathResource(String path,
Class clazz) |
static org.kie.api.io.Resource |
newClassPathResource(String path,
ClassLoader classLoader) |
static org.kie.api.io.Resource |
newClassPathResource(String path,
String encoding) |
static org.kie.api.io.Resource |
newClassPathResource(String path,
String encoding,
Class clazz) |
static org.kie.api.io.Resource |
newClassPathResource(String path,
String encoding,
ClassLoader classLoader) |
static org.kie.api.io.Resource |
newDescrResource(KnowledgeDescr descr) |
static org.kie.api.io.Resource |
newFileResource(File file) |
static org.kie.api.io.Resource |
newFileResource(String fileName) |
static org.kie.api.io.Resource |
newInputStreamResource(InputStream stream) |
static org.kie.api.io.Resource |
newInputStreamResource(InputStream stream,
String encoding) |
static org.kie.api.io.Resource |
newReaderResource(Reader reader) |
static org.kie.api.io.Resource |
newReaderResource(Reader reader,
String encoding) |
static org.kie.api.io.Resource |
newUrlResource(String path) |
static org.kie.api.io.Resource |
newUrlResource(URL url) |
public static ResourceChangeNotifier getResourceChangeNotifierService()
public static ResourceChangeScanner getResourceChangeScannerService()
public static org.kie.api.io.Resource newUrlResource(URL url)
public static org.kie.api.io.Resource newUrlResource(String path)
public static org.kie.api.io.Resource newFileResource(File file)
public static org.kie.api.io.Resource newFileResource(String fileName)
public static org.kie.api.io.Resource newByteArrayResource(byte[] bytes)
public static org.kie.api.io.Resource newInputStreamResource(InputStream stream)
public static org.kie.api.io.Resource newInputStreamResource(InputStream stream, String encoding)
public static org.kie.api.io.Resource newReaderResource(Reader reader)
public static org.kie.api.io.Resource newReaderResource(Reader reader, String encoding)
public static org.kie.api.io.Resource newClassPathResource(String path)
public static org.kie.api.io.Resource newClassPathResource(String path, Class clazz)
public static org.kie.api.io.Resource newClassPathResource(String path, ClassLoader classLoader)
public static org.kie.api.io.Resource newClassPathResource(String path, String encoding)
public static org.kie.api.io.Resource newClassPathResource(String path, String encoding, Class clazz)
public static org.kie.api.io.Resource newClassPathResource(String path, String encoding, ClassLoader classLoader)
public static org.kie.api.io.Resource newDescrResource(KnowledgeDescr descr)
Copyright © 2001–2016 JBoss by Red Hat. All rights reserved.