net.sf.jpkgmk.pkgmap
Class AbstractPkgMapEntry
java.lang.Object
net.sf.jpkgmk.AbstractLineProvider
net.sf.jpkgmk.pkgmap.AbstractPkgMapEntry
- All Implemented Interfaces:
- java.lang.Comparable<AbstractPkgMapEntry>, LineProvider, PkgMapEntry
- Direct Known Subclasses:
- PkgMapEntryDevice, PkgMapEntryFile, PkgMapEntryInfo, PkgMapEntryLink, PkgMapEntryPipe
public abstract class AbstractPkgMapEntry
- extends AbstractLineProvider
- implements PkgMapEntry, java.lang.Comparable<AbstractPkgMapEntry>
Abstract class that can be used for the most of the pkgmap entries, for example files, directories, links ...
- Since:
- 1.0
- Version:
- $Revision: 2 $ $Date: 2008-08-20 21:14:19 +0200 (Mi, 20 Aug 2008) $
- Author:
- gommma (gommma AT users.sourceforge.net), Last changed by: $Author: gommma $
Constructor Summary |
AbstractPkgMapEntry(java.lang.Integer part,
PkgMapEntryType type,
java.lang.String entryClass,
java.lang.String entryPath,
java.lang.String entryPathSource,
java.lang.Integer major,
java.lang.Integer minor,
java.lang.String mode,
java.lang.String owner,
java.lang.String group)
Full constructor taking all possible arguments |
AbstractPkgMapEntry(PkgMapEntryType fileType,
java.lang.String entryPath)
Constructor taking the mandatory arguments to create a pkgmap entry |
AbstractPkgMapEntry(PkgMapEntryType fileType,
java.lang.String entryPath,
java.lang.String mode,
java.lang.String owner,
java.lang.String group)
|
AbstractPkgMapEntry(PkgMapEntryType fileType,
java.lang.String fileClass,
java.lang.String entryPath,
java.lang.String entryPathSource,
java.lang.String mode,
java.lang.String owner,
java.lang.String group)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
AbstractPkgMapEntry
public AbstractPkgMapEntry(PkgMapEntryType fileType,
java.lang.String entryPath)
- Constructor taking the mandatory arguments to create a pkgmap entry
- Parameters:
fileType
- value
-
AbstractPkgMapEntry
public AbstractPkgMapEntry(PkgMapEntryType fileType,
java.lang.String entryPath,
java.lang.String mode,
java.lang.String owner,
java.lang.String group)
- Parameters:
fileType
- entryClass
- entryPath
- the target path in that this file/directory should have in the packagemode
- owner
- group
-
AbstractPkgMapEntry
public AbstractPkgMapEntry(PkgMapEntryType fileType,
java.lang.String fileClass,
java.lang.String entryPath,
java.lang.String entryPathSource,
java.lang.String mode,
java.lang.String owner,
java.lang.String group)
- Parameters:
fileType
- fileClass
- entryPath
- the target path in that this file/directory should have in the packageentryPathSource
- path to the local source filemode
- owner
- group
-
AbstractPkgMapEntry
public AbstractPkgMapEntry(java.lang.Integer part,
PkgMapEntryType type,
java.lang.String entryClass,
java.lang.String entryPath,
java.lang.String entryPathSource,
java.lang.Integer major,
java.lang.Integer minor,
java.lang.String mode,
java.lang.String owner,
java.lang.String group)
- Full constructor taking all possible arguments
- Parameters:
part
- Optional part numbertype
- entryClass
- entryPath
- the target path in that this file/directory should have in the packageentryPathSource
- major
- The major device number. The field is only specified for block or character special devices.minor
- The minor device number. The field is only specified for block or character special devices.mode
- owner
- group
-
createLine
public java.lang.String createLine()
- Returns:
- The pkgmap line
getLine
public java.lang.String getLine()
- Specified by:
getLine
in interface LineProvider
- Returns:
- The prototype line
getPart
public java.lang.Integer getPart()
getType
public PkgMapEntryType getType()
- Specified by:
getType
in interface PkgMapEntry
- Returns:
- Returns the type of this entry
getEntryPath
public java.lang.String getEntryPath()
getEntryPathSource
public java.lang.String getEntryPathSource()
getEntryClass
public java.lang.String getEntryClass()
getMode
public java.lang.String getMode()
getOwner
public java.lang.String getOwner()
getGroup
public java.lang.String getGroup()
getMajor
public java.lang.Integer getMajor()
getMinor
public java.lang.Integer getMinor()
getModtime
public java.lang.Long getModtime()
setModtime
public void setModtime(java.lang.Long modtime)
getChecksum
public java.lang.Long getChecksum()
setChecksum
public void setChecksum(java.lang.Long checksum)
getFilesize
public java.lang.Long getFilesize()
setFilesize
public void setFilesize(java.lang.Long filesize)
compareTo
public int compareTo(AbstractPkgMapEntry o)
- Compares this object with the given
AbstractPkgMapEntry
using the
or the entryPath
if the classes are equal. Needed for sorting the pkgmap entries.
As defined in the sun docs:
"The package objects in pkgmap are listed in alphabetical order by class and by path name to
reduce the time it takes to install the package."
- Specified by:
compareTo
in interface java.lang.Comparable<AbstractPkgMapEntry>
- See Also:
Comparable.compareTo(java.lang.Object)
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj,
boolean ignoreLastModified)
- Specified by:
equals
in interface PkgMapEntry
ignoreLastModified
- whether or not the "lastModified" field should be ignored when checking for equality
- Returns:
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2007-2008. All Rights Reserved.