Package org.drools.util.io
Class BaseResource
- java.lang.Object
-
- org.drools.util.io.BaseResource
-
- All Implemented Interfaces:
Externalizable,Serializable,InternalResource,org.kie.api.io.Resource
- Direct Known Subclasses:
ByteArrayResource,ClassPathResource,DescrResource,FileSystemResource,InputStreamResource,ReaderResource
public abstract class BaseResource extends Object implements InternalResource, Externalizable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]bytes
-
Constructor Summary
Constructors Constructor Description BaseResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCategory(String tag)booleanequals(Object o)byte[]getBytes()List<String>getCategories()org.kie.api.io.ResourceConfigurationgetConfiguration()StringgetDescription()Returns the description of the resource.org.kie.api.io.ResourceTypegetResourceType()StringgetSourcePath()StringgetTargetPath()inthashCode()voidreadExternal(ObjectInput in)voidsetCategories(String categories)InternalResourcesetConfiguration(org.kie.api.io.ResourceConfiguration conf)voidsetDescription(String description)InternalResourcesetResourceType(org.kie.api.io.ResourceType resourceType)InternalResourcesetSourcePath(String path)InternalResourcesetTargetPath(String path)StringtoString()voidwriteExternal(ObjectOutput out)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.drools.util.io.InternalResource
getEncoding, getURL, hasURL, isDirectory, listResources
-
-
-
-
Method Detail
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
getConfiguration
public org.kie.api.io.ResourceConfiguration getConfiguration()
- Specified by:
getConfigurationin interfaceInternalResource- Specified by:
getConfigurationin interfaceorg.kie.api.io.Resource
-
setConfiguration
public InternalResource setConfiguration(org.kie.api.io.ResourceConfiguration conf)
- Specified by:
setConfigurationin interfaceInternalResource- Specified by:
setConfigurationin interfaceorg.kie.api.io.Resource
-
setResourceType
public InternalResource setResourceType(org.kie.api.io.ResourceType resourceType)
- Specified by:
setResourceTypein interfaceInternalResource- Specified by:
setResourceTypein interfaceorg.kie.api.io.Resource
-
getResourceType
public org.kie.api.io.ResourceType getResourceType()
- Specified by:
getResourceTypein interfaceInternalResource- Specified by:
getResourceTypein interfaceorg.kie.api.io.Resource
-
getDescription
public String getDescription()
Description copied from interface:InternalResourceReturns the description of the resource. This is just a text description of the resource used to add more information about it. This is not a mandatory attribute- Specified by:
getDescriptionin interfaceInternalResource- Returns:
- the name of the resource, or null if is not set.
-
setDescription
public void setDescription(String description)
- Specified by:
setDescriptionin interfaceInternalResource
-
getSourcePath
public String getSourcePath()
- Specified by:
getSourcePathin interfaceorg.kie.api.io.Resource
-
getTargetPath
public String getTargetPath()
- Specified by:
getTargetPathin interfaceorg.kie.api.io.Resource
-
setSourcePath
public InternalResource setSourcePath(String path)
- Specified by:
setSourcePathin interfaceorg.kie.api.io.Resource
-
setTargetPath
public InternalResource setTargetPath(String path)
- Specified by:
setTargetPathin interfaceorg.kie.api.io.Resource
-
getCategories
public List<String> getCategories()
- Specified by:
getCategoriesin interfaceInternalResource
-
setCategories
public void setCategories(String categories)
- Specified by:
setCategoriesin interfaceInternalResource
-
addCategory
public void addCategory(String tag)
- Specified by:
addCategoryin interfaceInternalResource
-
getBytes
public byte[] getBytes()
- Specified by:
getBytesin interfaceInternalResource
-
-