org.entityfs.impl
Interface DirectoryViewImplementation

All Superinterfaces:
Comparable<EntityView>, Deletable, DirectoryView, EntityAcceptingEntityView<DirectoryView>, EntityAcceptingEntityViewImplementation<DirectoryView>, EntityHolder, EntityListable, EntityRepository, EntityView, EntityViewImplementation, Iterable<EntityView>, Lockable, Named, Observable, ReadLockable, ReadWriteLockable, ViewCapable<DirectoryView>, WriteLockable
All Known Subinterfaces:
DirectoryImplementation
All Known Implementing Classes:
DirectoryImpl, DirectoryViewImpl

public interface DirectoryViewImplementation
extends EntityAcceptingEntityViewImplementation<DirectoryView>, DirectoryView

This is the interface for a DirectoryView implementation. It contains methods that are only used by file system implementations; not by file system clients. A DirectoryView object can always be cast to a DirectoryViewImplementation object.

The methods in this interface should only be used by file system and capability implementations.

Since:
1.0
Author:
Karl Gustafsson
In_jar:
entityfs-core

Method Summary
 Set<EntityView> copyFrom(EntityImplementation source, String targetName, boolean preserveAttrs, List<EntityAttributeSetter> asl, EntityLock[] setupLocks)
          Copy the contents from the EntityAdapter to one or more new entities in the viewed directory.
 
Methods inherited from interface org.entityfs.impl.EntityViewImplementation
getAbsoluteLocationNoLocking, getFileSystemImplementation, getNameNoLocking, getObserverList
 
Methods inherited from interface org.entityfs.DirectoryView
getUniqueEntityName, newEntity
 
Methods inherited from interface org.entityfs.EntityAcceptingEntityView
canBeDereferenced, dereferenceOrNull
 
Methods inherited from interface org.entityfs.EntityView
canRead, canWrite, copy, copy, copyAttributes, createLock, disconnect, getCapability, getFileSystem, getLastModified, getParent, getType, getViewed, getViewedEntity, isConnected, isRootDirectory, isValid, lock, rename, setLastModified, supportsCapability, touch
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.entityfs.event.Observable
addObserver, countObservers, deleteObserver, deleteObservers
 
Methods inherited from interface org.entityfs.Named
getName
 
Methods inherited from interface org.entityfs.lock.ReadLockable
getReadLock, isReadLockedByCurrentThread, lockForReading
 
Methods inherited from interface org.entityfs.Deletable
delete, isDeleted
 
Methods inherited from interface org.entityfs.lock.WriteLockable
getWriteLock, isWriteLockedByCurrentThread, lockForWriting
 
Methods inherited from interface org.entityfs.ViewCapable
getFilter, hasFilters, newView
 
Methods inherited from interface org.entityfs.EntityHolder
containsEntity, containsEntity, getEntityOrNull
 
Methods inherited from interface org.entityfs.EntityListable
isEmpty, listEntities
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

copyFrom

Set<EntityView> copyFrom(EntityImplementation source,
                         String targetName,
                         boolean preserveAttrs,
                         List<EntityAttributeSetter> asl,
                         EntityLock[] setupLocks)
                         throws EntityFoundException
Copy the contents from the EntityAdapter to one or more new entities in the viewed directory. The directory implementation of this method delegates to DirectoryDelegate.copyFromEntity(EntityImplementation, String, boolean, List, EntityLock[]) after validating the target directory.

Parameters:
source - The entity to copy from.
targetName - The name of the new entity.
preserveAttrs - Should entity attributes be copied to the target entity?
asl - A list of EntityAttributeSetter objects that are run just after the target entity has been created, before the setupLocks are released. May be null. This may only be non- null if preserveAttrs is true.
setupLocks - Locks required for setting up the target entity. The locks are released when the target entity has been created. It is the responsibility of this method to unlock the lock (once), even in case of errors.
Returns:
The created entities. ViewCapable entities inherit the filter instances from this directory view.
Throws:
EntityFoundException