Class SimpleResourceAttributes
- java.lang.Object
-
- org.codehaus.plexus.components.io.attributes.SimpleResourceAttributes
-
- All Implemented Interfaces:
PlexusIoResourceAttributes
public class SimpleResourceAttributes extends java.lang.Object implements PlexusIoResourceAttributes
-
-
Field Summary
-
Fields inherited from interface org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes
UNKNOWN_OCTAL_MODE
-
-
Constructor Summary
Constructors Constructor Description SimpleResourceAttributes(java.lang.Integer uid, java.lang.String userName, java.lang.Integer gid, java.lang.String groupName, int mode)SimpleResourceAttributes(java.lang.Integer uid, java.lang.String userName, java.lang.Integer gid, java.lang.String groupName, int mode, boolean isSymbolicLink)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.IntegergetGroupId()Gets the unix group id.java.lang.StringgetGroupName()The group name.intgetOctalMode()Octal mode attributes.java.lang.StringgetOctalModeString()java.lang.IntegergetUserId()Gets the unix user id.java.lang.StringgetUserName()Returns the user name of the user owning the file.booleanisGroupExecutable()booleanisGroupReadable()booleanisGroupWritable()booleanisOwnerExecutable()booleanisOwnerReadable()booleanisOwnerWritable()booleanisSymbolicLink()Indicates if this is a symbolic link element.booleanisWorldExecutable()booleanisWorldReadable()booleanisWorldWritable()static PlexusIoResourceAttributeslastResortDummyAttributesForBrokenOS()PlexusIoResourceAttributessetGroupId(java.lang.Integer gid)PlexusIoResourceAttributessetGroupName(java.lang.String name)PlexusIoResourceAttributessetOctalMode(int mode)PlexusIoResourceAttributessetOctalModeString(java.lang.String mode)voidsetSymbolicLink(boolean isSymbolicLink)PlexusIoResourceAttributessetUserId(java.lang.Integer uid)PlexusIoResourceAttributessetUserName(java.lang.String name)java.lang.StringtoString()
-
-
-
Constructor Detail
-
SimpleResourceAttributes
public SimpleResourceAttributes(java.lang.Integer uid, java.lang.String userName, java.lang.Integer gid, java.lang.String groupName, int mode)
-
SimpleResourceAttributes
public SimpleResourceAttributes(java.lang.Integer uid, java.lang.String userName, java.lang.Integer gid, java.lang.String groupName, int mode, boolean isSymbolicLink)
-
-
Method Detail
-
lastResortDummyAttributesForBrokenOS
public static PlexusIoResourceAttributes lastResortDummyAttributesForBrokenOS()
-
getOctalMode
public int getOctalMode()
Description copied from interface:PlexusIoResourceAttributesOctal mode attributes.PlexusIoResourceAttributes.UNKNOWN_OCTAL_MODEif unsupported on current file/file system- Specified by:
getOctalModein interfacePlexusIoResourceAttributes
-
getGroupId
@Nullable public java.lang.Integer getGroupId()
Description copied from interface:PlexusIoResourceAttributesGets the unix group id.- Specified by:
getGroupIdin interfacePlexusIoResourceAttributes- Returns:
- The unix group id, may be null ("not set"), even on unix
-
getGroupName
@Nullable public java.lang.String getGroupName()
Description copied from interface:PlexusIoResourceAttributesThe group name. May be null if groups are unsupported- Specified by:
getGroupNamein interfacePlexusIoResourceAttributes- Returns:
- the group names
-
getUserId
public java.lang.Integer getUserId()
Description copied from interface:PlexusIoResourceAttributesGets the unix user id.- Specified by:
getUserIdin interfacePlexusIoResourceAttributes- Returns:
- The unix user id, may be null ("not set"), even on unix
-
getUserName
public java.lang.String getUserName()
Description copied from interface:PlexusIoResourceAttributesReturns the user name of the user owning the file. Probably not null :)- Specified by:
getUserNamein interfacePlexusIoResourceAttributes- Returns:
- The user name
-
isGroupExecutable
public boolean isGroupExecutable()
- Specified by:
isGroupExecutablein interfacePlexusIoResourceAttributes
-
isGroupReadable
public boolean isGroupReadable()
- Specified by:
isGroupReadablein interfacePlexusIoResourceAttributes
-
isGroupWritable
public boolean isGroupWritable()
- Specified by:
isGroupWritablein interfacePlexusIoResourceAttributes
-
isOwnerExecutable
public boolean isOwnerExecutable()
- Specified by:
isOwnerExecutablein interfacePlexusIoResourceAttributes
-
isOwnerReadable
public boolean isOwnerReadable()
- Specified by:
isOwnerReadablein interfacePlexusIoResourceAttributes
-
isOwnerWritable
public boolean isOwnerWritable()
- Specified by:
isOwnerWritablein interfacePlexusIoResourceAttributes
-
isWorldExecutable
public boolean isWorldExecutable()
- Specified by:
isWorldExecutablein interfacePlexusIoResourceAttributes
-
isWorldReadable
public boolean isWorldReadable()
- Specified by:
isWorldReadablein interfacePlexusIoResourceAttributes
-
isWorldWritable
public boolean isWorldWritable()
- Specified by:
isWorldWritablein interfacePlexusIoResourceAttributes
-
getOctalModeString
public java.lang.String getOctalModeString()
-
setOctalMode
public PlexusIoResourceAttributes setOctalMode(int mode)
-
setGroupId
public PlexusIoResourceAttributes setGroupId(java.lang.Integer gid)
-
setGroupName
public PlexusIoResourceAttributes setGroupName(java.lang.String name)
-
setUserId
public PlexusIoResourceAttributes setUserId(java.lang.Integer uid)
-
setUserName
public PlexusIoResourceAttributes setUserName(java.lang.String name)
-
setOctalModeString
public PlexusIoResourceAttributes setOctalModeString(java.lang.String mode)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
setSymbolicLink
public void setSymbolicLink(boolean isSymbolicLink)
-
isSymbolicLink
public boolean isSymbolicLink()
Description copied from interface:PlexusIoResourceAttributesIndicates if this is a symbolic link element. For file-based resource attributes this value may be always "false" for versions prior to java7.- Specified by:
isSymbolicLinkin interfacePlexusIoResourceAttributes- Returns:
- True if the file is a symlink or false if not.
-
-