JTools

org.jtools.props
Class SimplePropertyRepository.PropertyEntry

java.lang.Object
  extended by org.jtools.props.SimplePropertyRepository.PropertyEntry
All Implemented Interfaces:
PropertyRepositoryEntry
Enclosing class:
SimplePropertyRepository

protected static class SimplePropertyRepository.PropertyEntry
extends Object
implements PropertyRepositoryEntry


Nested Class Summary
protected static class SimplePropertyRepository.PropertyEntry.SimpleDirectoryFilter
           
protected static class SimplePropertyRepository.PropertyEntry.SimpleFileFilter
           
 
Nested classes/interfaces inherited from interface org.jtools.props.PropertyRepositoryEntry
PropertyRepositoryEntry.ItemType
 
Constructor Summary
SimplePropertyRepository.PropertyEntry(SimplePropertyRepository.PropertyEntry Parent, String key, PropertyRepositoryEntry.ItemType itemType, boolean isDynamic, String MainEntry, String staticDirectoryName, String BaseFile, String Prefix, String ListProperty, String concatListProperty, boolean addTargetAsSuffix)
           
 
Method Summary
 boolean addTargetAsSuffix()
          indicates whether a target should added as suffix.
 PropertyRepositoryEntry createDirSubEntry(String key, String staticDirectoryName, String BaseFile, String MainEntry, String Prefix, String ListProperty, String concatListProperty, boolean addTargetAsSuffix)
           
 PropertyRepositoryEntry createFileSubEntry(String key, String staticDirectoryName, String BaseFile, String Prefix, String ListProperty, String concatListProperty, boolean addTargetAsSuffix)
           
 String getBaseFilename()
          returns the filename (without extension) of a basefile
 String getConcatListProperty()
          indicates whether an property with the generated suffix has to be concatenated with the list property.
 String getEntryKey()
          returns the key of this entry
 PropertyRepositoryEntry.ItemType getItemType()
          indicates whether the items are files or subdirectories.
 String getKeyPrefix()
          returns the property prefix of this entries properties. if this is an static entry it will be taken 1-to-1. if this entry is dynamic, this prefix will be added to the parents entry.
 String getListProperty()
          returns the property prefix of this entries properties. if this is an static entry it will be taken 1-to-1. if this entry is dynamic, this prefix will be added to the parents entry.
 String getMainEntryFilename()
          returns the name of the main property file in the directory.
 PropertyRepositoryEntry getParentEntry()
          returns the parent entry.
 String getStaticDirectoryName()
          returns the static directory. if Parent is not null, the directory is relative to the parents directoyr
 boolean isDynamic()
          indicates whether the directory name is dynamic or static.
 int read(PropertySupport dest, File repositoryBase, String Extension, String... targets)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimplePropertyRepository.PropertyEntry

public SimplePropertyRepository.PropertyEntry(SimplePropertyRepository.PropertyEntry Parent,
                                              String key,
                                              PropertyRepositoryEntry.ItemType itemType,
                                              boolean isDynamic,
                                              String MainEntry,
                                              String staticDirectoryName,
                                              String BaseFile,
                                              String Prefix,
                                              String ListProperty,
                                              String concatListProperty,
                                              boolean addTargetAsSuffix)
Method Detail

addTargetAsSuffix

public boolean addTargetAsSuffix()
Description copied from interface: PropertyRepositoryEntry
indicates whether a target should added as suffix.

Specified by:
addTargetAsSuffix in interface PropertyRepositoryEntry

createDirSubEntry

public PropertyRepositoryEntry createDirSubEntry(String key,
                                                 String staticDirectoryName,
                                                 String BaseFile,
                                                 String MainEntry,
                                                 String Prefix,
                                                 String ListProperty,
                                                 String concatListProperty,
                                                 boolean addTargetAsSuffix)
Specified by:
createDirSubEntry in interface PropertyRepositoryEntry

createFileSubEntry

public PropertyRepositoryEntry createFileSubEntry(String key,
                                                  String staticDirectoryName,
                                                  String BaseFile,
                                                  String Prefix,
                                                  String ListProperty,
                                                  String concatListProperty,
                                                  boolean addTargetAsSuffix)
Specified by:
createFileSubEntry in interface PropertyRepositoryEntry

getBaseFilename

public String getBaseFilename()
Description copied from interface: PropertyRepositoryEntry
returns the filename (without extension) of a basefile

Specified by:
getBaseFilename in interface PropertyRepositoryEntry

getConcatListProperty

public String getConcatListProperty()
Description copied from interface: PropertyRepositoryEntry
indicates whether an property with the generated suffix has to be concatenated with the list property.

Specified by:
getConcatListProperty in interface PropertyRepositoryEntry

getEntryKey

public String getEntryKey()
Description copied from interface: PropertyRepositoryEntry
returns the key of this entry

Specified by:
getEntryKey in interface PropertyRepositoryEntry

getItemType

public PropertyRepositoryEntry.ItemType getItemType()
Description copied from interface: PropertyRepositoryEntry
indicates whether the items are files or subdirectories.

Specified by:
getItemType in interface PropertyRepositoryEntry

getKeyPrefix

public String getKeyPrefix()
Description copied from interface: PropertyRepositoryEntry
returns the property prefix of this entries properties. if this is an static entry it will be taken 1-to-1. if this entry is dynamic, this prefix will be added to the parents entry.

Specified by:
getKeyPrefix in interface PropertyRepositoryEntry

getListProperty

public String getListProperty()
Description copied from interface: PropertyRepositoryEntry
returns the property prefix of this entries properties. if this is an static entry it will be taken 1-to-1. if this entry is dynamic, this prefix will be added to the parents entry.

Specified by:
getListProperty in interface PropertyRepositoryEntry

getMainEntryFilename

public String getMainEntryFilename()
Description copied from interface: PropertyRepositoryEntry
returns the name of the main property file in the directory.

Specified by:
getMainEntryFilename in interface PropertyRepositoryEntry

getParentEntry

public PropertyRepositoryEntry getParentEntry()
Description copied from interface: PropertyRepositoryEntry
returns the parent entry.

Specified by:
getParentEntry in interface PropertyRepositoryEntry

getStaticDirectoryName

public String getStaticDirectoryName()
Description copied from interface: PropertyRepositoryEntry
returns the static directory. if Parent is not null, the directory is relative to the parents directoyr

Specified by:
getStaticDirectoryName in interface PropertyRepositoryEntry

isDynamic

public boolean isDynamic()
Description copied from interface: PropertyRepositoryEntry
indicates whether the directory name is dynamic or static.

Specified by:
isDynamic in interface PropertyRepositoryEntry

read

public int read(PropertySupport dest,
                File repositoryBase,
                String Extension,
                String... targets)
         throws IOException
Specified by:
read in interface PropertyRepositoryEntry
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object

JTools

© 2000-2006, JTools.org.