|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.entityfs.support.lang.ObjectProxySupport<T>
org.entityfs.impl.AbstractEntityDelegateProxy<FileDelegate,FileAdapter>
org.entityfs.impl.AbstractFileDelegateProxy
org.entityfs.cap.entityattrs.impl.metadata.AttributesEnablingFileDelegateProxy<T>
public class AttributesEnablingFileDelegateProxy<T extends EntityAttributes>
Constructor Summary | |
---|---|
AttributesEnablingFileDelegateProxy(FileDelegate fd,
AbstractEntityAttributesEnablingFileSystemDelegate<T> fsd,
ChildEntityAttributeManager<T> attrs)
|
Method Summary | |
---|---|
void |
assertParentIsReadLocked()
|
void |
assertParentIsWriteLocked()
|
void |
copyAttributes(DirectoryImplementation targetParent,
EntityImplementation target)
This implementation does not copy any attributes. |
void |
delete()
Delete the file. |
T |
getAttributes()
Get the entity attributes. |
Class<T> |
getAttributesType()
Get the type of entity attributes provided by this delegate. |
protected AbstractEntityAttributesEnablingFileSystemDelegate<T> |
getFileSystemDelegate()
|
void |
rename(String oldName,
DirectoryImplementation targetDir,
String newName)
Rename and/or move the entity. |
void |
setAttributes(T attr)
Set (and save) the entity attributes. |
void |
setDefaultAttributes(String name,
ObjectFactory<T> defaultAttributesFactory)
This sets attributes from the default attributes factory on the new entity if the file system delegate has an EntityAttributesPreparer set. |
void |
setParentAttributes(ChildEntityAttributeManager<T> attr)
|
Methods inherited from class org.entityfs.impl.AbstractFileDelegateProxy |
---|
getDataSize, getSize, openChannelForRead, openChannelForWrite, openForRandomAccess, openForRead, openForWrite, replaceContents |
Methods inherited from class org.entityfs.impl.AbstractEntityDelegateProxy |
---|
canRead, canWrite, copy, exists, getDelegateOfTypeOrNull, getEntityAdapter, getFileSystem, getLastModified, getName, getOwner, init, isReadOnly, setLastModified, setOwner |
Methods inherited from class org.entityfs.support.lang.ObjectProxySupport |
---|
equals, getProxied, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.entityfs.impl.EntityDelegate |
---|
canRead, canWrite, copy, exists, getDelegateOfTypeOrNull, getEntityAdapter, getFileSystem, getLastModified, getName, getOwner, init, isReadOnly, setLastModified, setOwner |
Constructor Detail |
---|
public AttributesEnablingFileDelegateProxy(FileDelegate fd, AbstractEntityAttributesEnablingFileSystemDelegate<T> fsd, ChildEntityAttributeManager<T> attrs)
Method Detail |
---|
public Class<T> getAttributesType()
AttributesEntityDelegate
getAttributesType
in interface AttributesEntityDelegate<T extends EntityAttributes>
public void setParentAttributes(ChildEntityAttributeManager<T> attr)
protected AbstractEntityAttributesEnablingFileSystemDelegate<T> getFileSystemDelegate()
public void assertParentIsReadLocked()
public void assertParentIsWriteLocked()
public T getAttributes()
AttributesEntityDelegate
getAttributes
in interface AttributesEntityDelegate<T extends EntityAttributes>
public void setAttributes(T attr)
AttributesEntityDelegate
setAttributes
in interface AttributesEntityDelegate<T extends EntityAttributes>
attr
- The new attributes for the entity.public void delete()
FileDelegate
delete
in interface FileDelegate
delete
in class AbstractFileDelegateProxy
public void rename(String oldName, DirectoryImplementation targetDir, String newName) throws FileSystemException
EntityDelegate
rename
in interface EntityDelegate
rename
in class AbstractEntityDelegateProxy<FileDelegate,FileAdapter>
oldName
- The old name,targetDir
- The new parent directory.newName
- The new name.
FileSystemException
- On errors.public void setDefaultAttributes(String name, ObjectFactory<T> defaultAttributesFactory)
EntityAttributesPreparer
set. (Otherwise, the attributes will be
set the first time that they are saved.)
Subclasses may override this if necessary.
setDefaultAttributes
in interface AttributesEntityDelegate<T extends EntityAttributes>
name
- The name of the new entity.defaultAttributesFactory
- Factory for the default entity attributes
for the entity type of the delegate.public void copyAttributes(DirectoryImplementation targetParent, EntityImplementation target)
AbstractEntityDelegateProxy
copyAttributes
in interface EntityDelegate
copyAttributes
in class AbstractEntityDelegateProxy<FileDelegate,FileAdapter>
targetParent
- The parent directory of the target. This is null
if target
is a root directory of a file system. Otherwise
it is locked for writing.target
- The target entity to copy attributes to. Locked for
writing.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |