|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ECEntityAttributes<T extends EntityAttributes>
This interface defines an entity capability that associates some kind of
EntityAttributes
with an entity.
This interface is inherited by interfaces that define concrete
implementations of the generic types specified in this interface, such as the
ECUnixAttributes
interface.
Entity attributes are metadata attributes that are handled by a dedicated
capability provider. Two implementations are the
MetadataNtfsAttributesCapabilityProvider
for NTFS attributes and the
MetadataUnixAttributesCapabilityProvider
for Unix attributes such as the owner UID and GID and the entity's
UnixEntityMode
(permissions).
The attributes of an entity is a property of its parent directory. A consequence of this is that a file system's root directory does not support entity attributes since it does not have a parent directory.
Clients that expect a certain entity attribute capability type should use
that capability directly. This interface can be used by clients that don't
want to make assumptions about the specific entity attribute implementation
that an entity supports. Clients using this interface can test the
EntityAttributes
instance returned from getAttributes()
by
checking it if it is instanceof
anything, for instance instanceof
UidGidAttributes
.
Changes made to an EntityAttributes
object are not automatically
saved to its parent entity. Clients must call
setAttributes(EntityAttributes)
to update the parent entity with the
new attributes.
When copying an entity with EntityAttributes
, the attributes are not
copied. Instead, the target entity is given a default set of attributes.
ECTEntityAttributes
,
ECNamedEntityAttributes
,
EntityAttributes
Method Summary | |
---|---|
T |
getAttributes()
Get the attributes for an entity. |
Class<T> |
getAttributesType()
Get the type of attributes stored by this capability. |
void |
setAttributes(T attr)
Set the attributes for an entity. |
Methods inherited from interface org.entityfs.cap.EntityCapability |
---|
getEntity, isValid |
Method Detail |
---|
T getAttributes() throws AccessDeniedException, ReadLockRequiredException
The returned object is only guaranteed to represent the real attributes
of the entity as long as the calling thread has an
EntityLock
on the entity's parent directory.
AccessDeniedException
- If the current Subject
does not
have execute access to the entity's parent directory.
ReadLockRequiredException
- If the client does not have a read lock
on the entity's parent directory.void setAttributes(T attr) throws ReadOnlyException, AccessDeniedException, WriteLockRequiredException
attr
- The new attributes.
ReadOnlyException
- If the entity is read only.
AccessDeniedException
- If the current Subject
does not
have write and execute access to the entity's parent directory.
WriteLockRequiredException
- If the client does not have a write
lock on the entity's parent directory.Class<T> getAttributesType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |