org.entityfs.cap.entityattrs.ntfs
Class NtfsAttributes

java.lang.Object
  extended by org.entityfs.cap.entityattrs.ntfs.NtfsAttributes
All Implemented Interfaces:
Cloneable, CreationTimeAttributes, EntityAttributes, NtFileAttributesAttributes, UidGidAttributes, UnixEntityModeAttributes, CreationTimeConfigurable, NtFileAttributesConfigurable, UidGidConfigurable, UnixEntityModeConfigurable

public class NtfsAttributes
extends Object
implements UnixEntityModeAttributes, NtFileAttributesAttributes, CreationTimeAttributes, UidGidAttributes

This object contains NTFS attributes that an entity may have.

For generic information about EntityAttributes objects, see the ECEntityAttributes documentation.

Since:
1.0
Author:
Karl Gustafsson
See Also:
EntityAttributes
In_jar:
entityfs-entity_attributes

Constructor Summary
NtfsAttributes()
           
 
Method Summary
 Object clone()
          The Cloneable interface does not make the clone() method visible.
 boolean equals(Object o)
           
 boolean equalsExceptForCreationTime(Object o)
          Test to see if the supplied attributes object is equal to this object except for the two objects creation times.
 long getCreationTime()
          Get the creation time of the entity.
 int getGid()
          Get the group id.
 Set<NtFileAttributes> getNtFileAttributes()
          Get the attributes.
 int getUid()
          Get the user id.
 UnixEntityMode getUnixEntityMode()
          Get the current UnixEntityMode.
 int hashCode()
           
 void setCreationTime(long creationTime)
          Set the creation time of the entity in milliseconds since January 1, 1970
 void setGid(int gid)
          Set the group id.
 void setNtFileAttributes(int attr)
          Set the attributes.
 void setNtFileAttributes(Set<NtFileAttributes> ntFileAttributes)
          Set the attributes.
 void setUid(int uid)
          Set the user id.
 void setUnixEntityMode(int m)
          Set the UnixEntityMode using its integer representation.
 void setUnixEntityMode(UnixEntityMode unixEntityMode)
          Set the UnixEntityMode.
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NtfsAttributes

public NtfsAttributes()
Method Detail

getCreationTime

public long getCreationTime()
Description copied from interface: CreationTimeConfigurable
Get the creation time of the entity.

Specified by:
getCreationTime in interface CreationTimeConfigurable
Returns:
The entity's creation time in milliseconds since January 1st, 1970.
See Also:
Date.getTime()

setCreationTime

public void setCreationTime(long creationTime)
Description copied from interface: CreationTimeConfigurable
Set the creation time of the entity in milliseconds since January 1, 1970

Specified by:
setCreationTime in interface CreationTimeConfigurable
Parameters:
creationTime - The new creation time.
See Also:
Date.getTime()

getGid

public int getGid()
Description copied from interface: UidGidConfigurable
Get the group id.

Specified by:
getGid in interface UidGidConfigurable
Returns:
The group id.

setGid

public void setGid(int gid)
            throws IllegalArgumentException
Description copied from interface: UidGidConfigurable
Set the group id.

Specified by:
setGid in interface UidGidConfigurable
Parameters:
gid - The group id. It must be a positive integer.
Throws:
IllegalArgumentException - If the GID is invalid.

getNtFileAttributes

public Set<NtFileAttributes> getNtFileAttributes()
Description copied from interface: NtFileAttributesConfigurable
Get the attributes.

Specified by:
getNtFileAttributes in interface NtFileAttributesConfigurable
Returns:
The attributes.

setNtFileAttributes

public void setNtFileAttributes(Set<NtFileAttributes> ntFileAttributes)
Description copied from interface: NtFileAttributesConfigurable
Set the attributes.

Specified by:
setNtFileAttributes in interface NtFileAttributesConfigurable
Parameters:
ntFileAttributes - The attributes.

setNtFileAttributes

public void setNtFileAttributes(int attr)
Description copied from interface: NtFileAttributesConfigurable
Set the attributes. The attributes are represented by a single integer that is made from adding different attributes' flag values

Specified by:
setNtFileAttributes in interface NtFileAttributesConfigurable
Parameters:
attr - The attributes code.
See Also:
NtFileAttributes.getIntValue()

getUid

public int getUid()
Description copied from interface: UidGidConfigurable
Get the user id.

Specified by:
getUid in interface UidGidConfigurable
Returns:
The user id.

setUid

public void setUid(int uid)
            throws IllegalArgumentException
Description copied from interface: UidGidConfigurable
Set the user id.

Specified by:
setUid in interface UidGidConfigurable
Parameters:
uid - The user id. It must be a positive integer.
Throws:
IllegalArgumentException - If the UID is invalid.

getUnixEntityMode

public UnixEntityMode getUnixEntityMode()
Description copied from interface: UnixEntityModeConfigurable
Get the current UnixEntityMode.

Specified by:
getUnixEntityMode in interface UnixEntityModeConfigurable
Returns:
The current UnixEntityMode.

setUnixEntityMode

public void setUnixEntityMode(UnixEntityMode unixEntityMode)
Description copied from interface: UnixEntityModeConfigurable
Set the UnixEntityMode.

Specified by:
setUnixEntityMode in interface UnixEntityModeConfigurable
Parameters:
unixEntityMode - The new UnixEntityMode.
See Also:
UnixEntityModeConfigurable.setUnixEntityMode(int)

setUnixEntityMode

public void setUnixEntityMode(int m)
Description copied from interface: UnixEntityModeConfigurable
Set the UnixEntityMode using its integer representation.

Specified by:
setUnixEntityMode in interface UnixEntityModeConfigurable
Parameters:
m - An integer representing the mode, for instance 0644 or 01777.
See Also:
UnixEntityModeConfigurable.setUnixEntityMode(UnixEntityMode)

equalsExceptForCreationTime

public boolean equalsExceptForCreationTime(Object o)
Test to see if the supplied attributes object is equal to this object except for the two objects creation times.

Specified by:
equalsExceptForCreationTime in interface CreationTimeAttributes
Parameters:
o - The other entity attributes object.
Returns:
true if the supplied entity attributes object is equal to this object except for the creation time.

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

clone

public Object clone()
Description copied from interface: EntityAttributes
The Cloneable interface does not make the clone() method visible. This declaration does.

Specified by:
clone in interface EntityAttributes
Overrides:
clone in class Object
Returns:
A clone of this object.
See Also:
Cloneable

toString

public String toString()
Overrides:
toString in class Object