implemented new data loading arguement -component to limit data loading to a single component (by name)

example:
java -jar ofbiz.jar -install -component=mycomponent -readers=seed,ext,demo



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@520902 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Zeneski
2007-03-21 14:48:21 +00:00
parent 2425310630
commit ec22d58cac
3 changed files with 47 additions and 22 deletions
@@ -52,6 +52,7 @@ public class EntityDataLoadContainer implements Container {
protected String readers = null;
protected String directory = null;
protected String file = null;
protected String component = null;
protected boolean useDummyFks = false;
protected boolean maintainTxs = false;
protected boolean tryInserts = false;
@@ -109,6 +110,8 @@ public class EntityDataLoadContainer implements Container {
} catch (Exception e) {
this.txTimeout = -1;
}
} else if ("component".equalsIgnoreCase(argumentName)) {
this.component = argumentVal;
} else if ("delegator".equalsIgnoreCase(argumentName)) {
this.overrideDelegator = argumentVal;
} else if ("group".equalsIgnoreCase(argumentName)) {
@@ -183,7 +186,7 @@ public class EntityDataLoadContainer implements Container {
// get the reader name URLs first
List urlList = null;
if (readerNames != null) {
urlList = EntityDataLoader.getUrlList(helperName, readerNames);
urlList = EntityDataLoader.getUrlList(helperName, component, readerNames);
} else if (!"none".equalsIgnoreCase(this.readers)) {
urlList = EntityDataLoader.getUrlList(helperName);
}