From 704025f1dae65e5f88083ffd1dd270483f3b25bf Mon Sep 17 00:00:00 2001 From: Patrick Huang Date: Wed, 20 May 2015 14:21:21 +1000 Subject: [PATCH] rhbz1222730 - add options to use cache in java client --- .../client/commands/pull/PullOptionsImpl.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/PullOptionsImpl.java b/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/PullOptionsImpl.java index 37766379..c77775f4 100644 --- a/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/PullOptionsImpl.java +++ b/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/PullOptionsImpl.java @@ -169,4 +169,18 @@ public boolean isContinueAfterError() { public boolean isAuthRequired() { return false; } + + @Option(name = "--use-cache", usage = "Whether to use an Entity cache when fetching documents.\n" + + "When using the cache, documents that have been retrieved previously and have not changed since then will not be retrieved again.\n" + + "Default is " + DEFAULT_USE_CACHE + ".") + public void setUseCache(boolean useCache) { + this.useCache = useCache; + } + + @Option(name = "--purge-cache", usage = "Whether to purge the cache before performing the pull operation.\n" + + "This means that all documents will be fetched from the server anew.\n" + + "Default is " + DEFAULT_PURGE_CACHE + ".") + public void setPurgeCache(boolean purgeCache) { + this.purgeCache = purgeCache; + } }