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 Modifier and Type Field Description private java.lang.Integer
gid
private java.lang.String
groupName
private boolean
isSymbolicLink
private int
mode
private java.lang.Integer
uid
private java.lang.String
userName
-
Fields inherited from interface org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes
UNKNOWN_OCTAL_MODE
-
-
Constructor Summary
Constructors Constructor Description SimpleResourceAttributes()
SimpleResourceAttributes(java.lang.Integer uid, java.lang.String userName, java.lang.Integer gid, java.lang.String groupName, int mode)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Integer
getGroupId()
Gets the unix group id.java.lang.String
getGroupName()
The group name.int
getOctalMode()
Octal mode attributes.java.lang.String
getOctalModeString()
java.lang.Integer
getUserId()
Gets the unix user id.java.lang.String
getUserName()
Returns the user name of the user owning the file.boolean
isGroupExecutable()
boolean
isGroupReadable()
boolean
isGroupWritable()
boolean
isOwnerExecutable()
boolean
isOwnerReadable()
boolean
isOwnerWritable()
boolean
isSymbolicLink()
boolean
isWorldExecutable()
boolean
isWorldReadable()
boolean
isWorldWritable()
static PlexusIoResourceAttributes
lastResortDummyAttributesForBrokenOS()
PlexusIoResourceAttributes
setGroupId(java.lang.Integer gid)
PlexusIoResourceAttributes
setGroupName(java.lang.String name)
PlexusIoResourceAttributes
setOctalMode(int mode)
PlexusIoResourceAttributes
setOctalModeString(java.lang.String mode)
void
setSymbolicLink(boolean isSymbolicLink)
PlexusIoResourceAttributes
setUserId(java.lang.Integer uid)
PlexusIoResourceAttributes
setUserName(java.lang.String name)
java.lang.String
toString()
-
-
-
Method Detail
-
lastResortDummyAttributesForBrokenOS
public static PlexusIoResourceAttributes lastResortDummyAttributesForBrokenOS()
-
getOctalMode
public int getOctalMode()
Description copied from interface:PlexusIoResourceAttributes
Octal mode attributes.PlexusIoResourceAttributes.UNKNOWN_OCTAL_MODE
if unsupported on current file/file system- Specified by:
getOctalMode
in interfacePlexusIoResourceAttributes
-
getGroupId
@Nullable public java.lang.Integer getGroupId()
Description copied from interface:PlexusIoResourceAttributes
Gets the unix group id.- Specified by:
getGroupId
in 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:PlexusIoResourceAttributes
The group name. May be null if groups are unsupported- Specified by:
getGroupName
in interfacePlexusIoResourceAttributes
- Returns:
- the group names
-
getUserId
public java.lang.Integer getUserId()
Description copied from interface:PlexusIoResourceAttributes
Gets the unix user id.- Specified by:
getUserId
in interfacePlexusIoResourceAttributes
- Returns:
- The unix user id, may be null ("not set"), even on unix
-
getUserName
public java.lang.String getUserName()
Description copied from interface:PlexusIoResourceAttributes
Returns the user name of the user owning the file. Probably not null :)- Specified by:
getUserName
in interfacePlexusIoResourceAttributes
- Returns:
- The user name
-
isGroupExecutable
public boolean isGroupExecutable()
- Specified by:
isGroupExecutable
in interfacePlexusIoResourceAttributes
-
isGroupReadable
public boolean isGroupReadable()
- Specified by:
isGroupReadable
in interfacePlexusIoResourceAttributes
-
isGroupWritable
public boolean isGroupWritable()
- Specified by:
isGroupWritable
in interfacePlexusIoResourceAttributes
-
isOwnerExecutable
public boolean isOwnerExecutable()
- Specified by:
isOwnerExecutable
in interfacePlexusIoResourceAttributes
-
isOwnerReadable
public boolean isOwnerReadable()
- Specified by:
isOwnerReadable
in interfacePlexusIoResourceAttributes
-
isOwnerWritable
public boolean isOwnerWritable()
- Specified by:
isOwnerWritable
in interfacePlexusIoResourceAttributes
-
isWorldExecutable
public boolean isWorldExecutable()
- Specified by:
isWorldExecutable
in interfacePlexusIoResourceAttributes
-
isWorldReadable
public boolean isWorldReadable()
- Specified by:
isWorldReadable
in interfacePlexusIoResourceAttributes
-
isWorldWritable
public boolean isWorldWritable()
- Specified by:
isWorldWritable
in 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:
toString
in classjava.lang.Object
-
setSymbolicLink
public void setSymbolicLink(boolean isSymbolicLink)
-
isSymbolicLink
public boolean isSymbolicLink()
- Specified by:
isSymbolicLink
in interfacePlexusIoResourceAttributes
-
-