org.at4j.archive.builder
Class ArchiveEntrySettingsRule<T extends ArchiveEntrySettings<T>>

java.lang.Object
  extended by org.at4j.archive.builder.ArchiveEntrySettingsRule<T>
Type Parameters:
T - The type of settings.

public class ArchiveEntrySettingsRule<T extends ArchiveEntrySettings<T>>
extends Object

This is a rule for setting archive entry settings for one or several entries. A rule is an ArchiveEntrySettings object with a EntityToArchiveFilter do decide which entries that it will apply to.

A rule can have different scopes. If it is added as a global rule to the ArchiveBuilder its scope is all entries added to the builder from that point in time on. If it is used in in any of the builder's addRecursively methods, its scope is all entries added by that method call.

The settings from this rule is combined with default settings and settings from other rules as is described in the ArchiveBuilder documentation.

Since:
1.0
Author:
Karl Gustafsson
See Also:
ArchiveBuilder

Constructor Summary
ArchiveEntrySettingsRule(T settings, Filter<EntryToArchive> filter)
          Create a new rule.
 
Method Summary
 Filter<EntryToArchive> getFilter()
          Get the filter that determines which entries that this rule will apply to.
 T getSettings()
          Get the entry settings for this rule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArchiveEntrySettingsRule

public ArchiveEntrySettingsRule(T settings,
                                Filter<EntryToArchive> filter)
Create a new rule.

Parameters:
settings - The entry settings for the rule.
filter - The filter that is used to determine which entries this rule will apply to. If this is null, the rule will apply to all entries that is within its scope. This kind of filters often implements the marker interface EntityToArchiveFilter.
Method Detail

getSettings

public T getSettings()
Get the entry settings for this rule.

Returns:
The entry settings for this rule.

getFilter

public Filter<EntryToArchive> getFilter()
Get the filter that determines which entries that this rule will apply to. This kind of filters often implements the marker interface EntityToArchiveFilter.

Returns:
The filter, or null if this rule should apply to all entries within its scope.