added option to disable pre processor execution

This commit is contained in:
Sebastian Sdorra
2012-06-13 16:31:38 +02:00
parent 50dc72be50
commit c3fb8c04ca
2 changed files with 43 additions and 5 deletions

View File

@@ -133,7 +133,7 @@ public final class BrowseCommandBuilder
}
}
if (result != null)
if (! disablePreProcessors && result != null)
{
preProcessorUtil.prepareForReturn(repository, result);
}
@@ -160,6 +160,22 @@ public final class BrowseCommandBuilder
return this;
}
/**
* Disable the execution of pre processors.
*
*
* @param disablePreProcessors true to disable the pre processors execution
*
* @return {@code this}
*/
public BrowseCommandBuilder setDisablePreProcessors(
boolean disablePreProcessors)
{
this.disablePreProcessors = disablePreProcessors;
return this;
}
/**
* Retrieve only files which are children of the given path.
* This path have to be a directory.
@@ -274,7 +290,10 @@ public final class BrowseCommandBuilder
private Cache<CacheKey, BrowserResult> cache;
/** disables the cache */
private boolean disableCache;
private boolean disableCache = false;
/** disables the execution of pre processors */
private boolean disablePreProcessors = false;
/** Field description */
private PreProcessorUtil preProcessorUtil;

View File

@@ -199,7 +199,7 @@ public final class LogCommandBuilder
}
}
if (changeset != null)
if (! disablePreProcessors && changeset != null)
{
preProcessorUtil.prepareForReturn(repository, changeset);
}
@@ -242,7 +242,7 @@ public final class LogCommandBuilder
}
}
if (cpr != null)
if (! disablePreProcessors && cpr != null)
{
preProcessorUtil.prepareForReturn(repository, cpr);
}
@@ -284,6 +284,22 @@ public final class LogCommandBuilder
return this;
}
/**
* Disable the execution of pre processors.
*
*
* @param disablePreProcessors true to disable the pre processors execution
*
* @return {@code this}
*/
public LogCommandBuilder setDisablePreProcessors(
boolean disablePreProcessors)
{
this.disablePreProcessors = disablePreProcessors;
return this;
}
/**
* Retrieve changesets until the given the {@link Changeset}
* with the given id.
@@ -461,7 +477,10 @@ public final class LogCommandBuilder
private Cache<CacheKey, ChangesetPagingResult> cache;
/** disable cache */
private boolean disableCache;
private boolean disableCache = false;
/** disable the execution of pre processors */
private boolean disablePreProcessors = false;
/** Implementation of the log command */
private LogCommand logCommand;