public final class DatasourceResourceProvider extends Object implements ResourceProviderPro, Sizeable
Modifier and Type | Class and Description |
---|---|
class |
DatasourceResourceProvider.ConnectionData |
Modifier and Type | Field and Description |
---|---|
static int |
DBTYPE_ANSI92 |
static int |
DBTYPE_MSSQL |
static int |
DBTYPE_MYSQL |
Constructor and Description |
---|
DatasourceResourceProvider() |
Modifier and Type | Method and Description |
---|---|
boolean |
concatSupported(DatasourceResourceProvider.ConnectionData data) |
void |
create(DatasourceResourceProvider.ConnectionData data,
int fullPathHash,
int pathHash,
String path,
String name,
int type) |
void |
delete(DatasourceResourceProvider.ConnectionData data,
int fullPathHash,
String path,
String name) |
Map |
getArguments()
returns the arguments defined for this resource
|
Attr |
getAttr(DatasourceResourceProvider.ConnectionData data,
int fullPathHash,
String path,
String name) |
Attr[] |
getAttrs(DatasourceResourceProvider.ConnectionData data,
int pathHash,
String path) |
InputStream |
getInputStream(DatasourceResourceProvider.ConnectionData data,
int fullPathHash,
String path,
String name) |
OutputStream |
getOutputStream(DatasourceResourceProvider.ConnectionData data,
int fullPathHash,
int pathHash,
String path,
String name,
boolean append) |
Resource |
getResource(String path)
return a resource that match given path
|
String |
getScheme()
returns the scheme of the resource
|
char |
getSeparator() |
ResourceProvider |
init(String scheme,
Map arguments)
initalize ram resource
|
boolean |
isAttributesSupported()
returns if the resource support attributes for his resources
|
boolean |
isCaseSensitive()
returns if the resources of the provider are case-sensitive or not
|
boolean |
isModeSupported()
returns if the resource support mode for his resources
|
void |
lock(Resource res) |
DatasourceResourceProvider.ConnectionData |
parse(StringBuilder subPath,
String path) |
void |
read(Resource res) |
boolean |
setLastModified(DatasourceResourceProvider.ConnectionData data,
int fullPathHash,
String path,
String name,
long time) |
boolean |
setMode(DatasourceResourceProvider.ConnectionData data,
int fullPathHash,
String path,
String name,
int mode) |
void |
setResources(Resources resources) |
long |
sizeOf()
return the size of the object
|
void |
unlock(Resource res) |
public static final int DBTYPE_ANSI92
public static final int DBTYPE_MSSQL
public static final int DBTYPE_MYSQL
public DatasourceResourceProvider()
public long sizeOf()
Sizeable
public ResourceProvider init(String scheme, Map arguments)
init
in interface ResourceProvider
scheme
- arguments
- public Resource getResource(String path)
ResourceProvider
getResource
in interface ResourceProvider
public DatasourceResourceProvider.ConnectionData parse(StringBuilder subPath, String path)
public String getScheme()
ResourceProvider
getScheme
in interface ResourceProvider
public void setResources(Resources resources)
setResources
in interface ResourceProvider
public void lock(Resource res) throws IOException
lock
in interface ResourceProvider
IOException
public void unlock(Resource res)
unlock
in interface ResourceProvider
public void read(Resource res) throws IOException
read
in interface ResourceProvider
IOException
public boolean isAttributesSupported()
ResourceProvider
isAttributesSupported
in interface ResourceProvider
public boolean isCaseSensitive()
ResourceProvider
isCaseSensitive
in interface ResourceProvider
public boolean isModeSupported()
ResourceProvider
isModeSupported
in interface ResourceProvider
public Attr getAttr(DatasourceResourceProvider.ConnectionData data, int fullPathHash, String path, String name)
public Attr[] getAttrs(DatasourceResourceProvider.ConnectionData data, int pathHash, String path) throws PageException
PageException
public void create(DatasourceResourceProvider.ConnectionData data, int fullPathHash, int pathHash, String path, String name, int type) throws IOException
IOException
public void delete(DatasourceResourceProvider.ConnectionData data, int fullPathHash, String path, String name) throws IOException
IOException
public InputStream getInputStream(DatasourceResourceProvider.ConnectionData data, int fullPathHash, String path, String name) throws IOException
IOException
public OutputStream getOutputStream(DatasourceResourceProvider.ConnectionData data, int fullPathHash, int pathHash, String path, String name, boolean append) throws IOException
IOException
public boolean setLastModified(DatasourceResourceProvider.ConnectionData data, int fullPathHash, String path, String name, long time)
public boolean setMode(DatasourceResourceProvider.ConnectionData data, int fullPathHash, String path, String name, int mode)
public boolean concatSupported(DatasourceResourceProvider.ConnectionData data)
public Map getArguments()
ResourceProvider
getArguments
in interface ResourceProvider
public char getSeparator()
getSeparator
in interface ResourceProviderPro
Copyright © 2015 Lucee