|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AdapterFactory
An AdapterFactory
is an immutable file system-global object that is
used mainly by directory entity implementations to create backend entity
adapters of the right type. Adapter factory implementations are file system
backend-specific.
CapabilityProvider
:s can proxy adapter factories to proxy the
returned entity adapter objects. See the Developer's guide for more on
proxying.
Method Summary | |
---|---|
EntityAdapter |
createEntityAdapter(EntityType et,
FileSystemAdapter fs,
DirectoryAdapter parent,
String name,
Object data,
boolean existsInBackend)
Create an entity adapter object. |
FileSystemAdapter |
createFileSystemAdapter(AdapterFactory af,
LogAdapterHolder lah,
int bufferSize)
Create a file system's FileSystemAdapter object. |
Method Detail |
---|
FileSystemAdapter createFileSystemAdapter(AdapterFactory af, LogAdapterHolder lah, int bufferSize)
FileSystemAdapter
object.
af
- The file system's AdapterFactory
. If capabilities have
proxied the adapter factory, this instance may be different from the
adapter factory receiving the call. If this method needs to create entity
adapters, this instance should be used. That ensures that all capability
providers get an opportunity to proxy the created adapters.lah
- The file system's LogAdapterHolder
.bufferSize
- The default size (in bytes) of temporary buffers that
the file system might use.
EntityAdapter createEntityAdapter(EntityType et, FileSystemAdapter fs, DirectoryAdapter parent, String name, Object data, boolean existsInBackend) throws EntityNotFoundException
EntityAdapter.create()
after calling this method.
et
- The type of entity adapter to create.fs
- The file system adapter.parent
- The adapter for the parent directory. This is set to
null
when creating the root directory.name
- The entity's name.data
- Extra data needed to create the entity. This may be null
.existsInBackend
- Does the entity already exist in the backend? This
is set to true
when creating entity adapters for existing
entities, false
when creating entity adapters for new entities.
EntityNotFoundException
- If no corresponding entity exists in the
file system even though existsInBackend
was set to true
.
Those who create entity adapters should check that before calling this
method, so if this exception is thrown it means that there is a bug in
the caller.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |