net.sf.jpkgmk.prototype
Class PrototypeEntryFile

java.lang.Object
  extended by net.sf.jpkgmk.AbstractLineProvider
      extended by net.sf.jpkgmk.prototype.AbstractPrototypeEntry
          extended by net.sf.jpkgmk.prototype.PrototypeEntryFile
All Implemented Interfaces:
LineProvider, PrototypeEntry
Direct Known Subclasses:
PrototypeEntryFileEditable, PrototypeEntryFileVolatile, PrototypeEntryInfo

public class PrototypeEntryFile
extends AbstractPrototypeEntry

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 $

Nested Class Summary
static class PrototypeEntryFile.PrototypeEntryFileParser
          Parser to create a prototype file object from a string array
 
Field Summary
 
Fields inherited from class net.sf.jpkgmk.prototype.AbstractPrototypeEntry
DEFAULT_FILE_CLASS
 
Constructor Summary
protected PrototypeEntryFile(java.lang.Integer part, PrototypeEntryType type, java.lang.String fileClass, java.lang.String entryPath, java.lang.String entryPathSource, java.lang.String perm, java.lang.String owner, java.lang.String group, PrototypeEntryCommandDefault entryCommandDefault)
          Full constructor taking all arguments supported for this entry type
  PrototypeEntryFile(java.lang.Integer part, java.lang.String fileClass, java.lang.String entryPath, java.lang.String entryPathSource, java.lang.String perm, java.lang.String owner, java.lang.String group, PrototypeEntryCommandDefault entryCommandDefault)
          Full constructor taking all arguments supported for this entry type
  PrototypeEntryFile(java.lang.String entryPath)
          Constructor taking the mandatory arguments to create a prototype file entry
 
Method Summary
protected  void create(java.io.File targetDir, java.lang.String entryPathExpanded, java.lang.String entryPathSourceExpanded)
          Copies the file of this prototype entry into the target directory
protected  PkgMapEntry createPkgMapEntry(java.lang.Integer part, PkgMapEntryType resultType, 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, java.io.File targetDir)
           
 java.lang.Long getChecksum(java.io.File filePath)
          This field is not specified for named pipes, special devices, directories, or linked files.
 java.lang.Long getFileSize(java.io.File filePath)
          Append file size (not specified for named pipes, special devices, directories or linked files)
 java.lang.Long getLastModifiedTime(java.io.File filePath)
           
 
Methods inherited from class net.sf.jpkgmk.prototype.AbstractPrototypeEntry
buildAbsolutePath, create, createPkgMapEntry, equals, getEntryPath, getEntryPathSource, getFileClass, getGroup, getLine, getMajor, getMinor, getMode, getOwner, getType, hashCode, resolveGroup, resolveMode, resolveOwner, toString
 
Methods inherited from class net.sf.jpkgmk.AbstractLineProvider
write
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.jpkgmk.LineProvider
write
 

Constructor Detail

PrototypeEntryFile

public PrototypeEntryFile(java.lang.String entryPath)
Constructor taking the mandatory arguments to create a prototype file entry

Parameters:
entryPath -

PrototypeEntryFile

public PrototypeEntryFile(java.lang.Integer part,
                          java.lang.String fileClass,
                          java.lang.String entryPath,
                          java.lang.String entryPathSource,
                          java.lang.String perm,
                          java.lang.String owner,
                          java.lang.String group,
                          PrototypeEntryCommandDefault entryCommandDefault)
Full constructor taking all arguments supported for this entry type

Parameters:
fileClass -
entryPath - path to the file or directory
entryPathSource - the target path in that this file should have in the package
perm -
owner -
group -

PrototypeEntryFile

protected PrototypeEntryFile(java.lang.Integer part,
                             PrototypeEntryType type,
                             java.lang.String fileClass,
                             java.lang.String entryPath,
                             java.lang.String entryPathSource,
                             java.lang.String perm,
                             java.lang.String owner,
                             java.lang.String group,
                             PrototypeEntryCommandDefault entryCommandDefault)
Full constructor taking all arguments supported for this entry type

Parameters:
part -
fileClass -
entryPath - the target path that this file/directory should have in the created package
entryPathSource - path to the local source file
perm -
owner -
group -
Method Detail

create

protected void create(java.io.File targetDir,
                      java.lang.String entryPathExpanded,
                      java.lang.String entryPathSourceExpanded)
               throws java.io.IOException
Description copied from class: AbstractPrototypeEntry
Copies the file of this prototype entry into the target directory

Specified by:
create in class AbstractPrototypeEntry
Throws:
java.io.IOException

createPkgMapEntry

protected PkgMapEntry createPkgMapEntry(java.lang.Integer part,
                                        PkgMapEntryType resultType,
                                        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,
                                        java.io.File targetDir)
Specified by:
createPkgMapEntry in class AbstractPrototypeEntry

getFileSize

public java.lang.Long getFileSize(java.io.File filePath)
Append file size (not specified for named pipes, special devices, directories or linked files)

Parameters:
filePath -
Returns:
Returns the file size. If this type has no file size null is returned.

getChecksum

public java.lang.Long getChecksum(java.io.File filePath)
This field is not specified for named pipes, special devices, directories, or linked files.

Parameters:
filePath -
Returns:

getLastModifiedTime

public java.lang.Long getLastModifiedTime(java.io.File filePath)


Copyright © 2007-2008. All Rights Reserved.