Modified: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Parser.jj
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Parser.jj?rev=924378&r1=924377&r2=924378&view=diff ============================================================================== --- ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Parser.jj (original) +++ ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Parser.jj Wed Mar 17 17:28:01 2010 @@ -49,773 +49,773 @@ import javolution.util.FastMap; import javolution.util.FastSet; public final class Parser { - private boolean deleteSupportsUsing = true; - private boolean updateSupportsFrom = true; + private boolean deleteSupportsUsing = true; + private boolean updateSupportsFrom = true; - public Parser deleteSupportsUsing(boolean value) { - deleteSupportsUsing = value; - return this; - } - - public Parser updateSupportsFrom(boolean value) { - updateSupportsFrom = value; - return this; - } - - private Condition reduce(List<Condition> conditions, Joiner joiner) { - if (conditions.size() == 1) { - return conditions.get(0); - } - return new ConditionList(joiner, conditions); - } + public Parser deleteSupportsUsing(boolean value) { + deleteSupportsUsing = value; + return this; + } + + public Parser updateSupportsFrom(boolean value) { + updateSupportsFrom = value; + return this; + } + + private Condition reduce(List<Condition> conditions, Joiner joiner) { + if (conditions.size() == 1) { + return conditions.get(0); + } + return new ConditionList(joiner, conditions); + } } PARSER_END(Parser) TOKEN_MGR_DECLS: { - private final FastList<Integer> stack = new FastList<Integer>(); + private final FastList<Integer> stack = new FastList<Integer>(); - void pushState(int newState) { - stack.add(curLexState); - SwitchTo(newState); - } - - void popState() { - SwitchTo(stack.removeLast()); - } + void pushState(int newState) { + stack.add(curLexState); + SwitchTo(newState); + } + + void popState() { + SwitchTo(stack.removeLast()); + } } TOKEN: { - <OPEN_PAREN: "("> -| <CLOSE_PAREN: ")"> -| <AND: "AND"> -| <OR: "OR"> -| <PERIOD: "."> -| <JOIN: "JOIN"> -| <LEFT: "LEFT"> -| <AS: "AS"> -| <WHERE: "WHERE"> -| <HAVING: "HAVING"> -| <GROUP: "GROUP"> -| <ORDER: "ORDER"> -//| <UNION: "UNION"> -| <BY: "BY"> -| <ON: "ON"> -| <USING: "USING"> -| <LIMIT: "LIMIT"> -| <OFFSET: "OFFSET"> -| <SELECT: "SELECT"> -| <DELETE: "DELETE"> -| <UPDATE: "UPDATE"> -| <INSERT: "INSERT"> -| <RELATION: "RELATION"> -| <EXCLUDE: "EXCLUDE"> -| <UPPER: "UPPER"> -| <LOWER: "LOWER"> -| <TYPE: "TYPE"> -| <TITLE: "TITLE"> -| <SET: "SET"> -| <FROM: "FROM"> -| <SEMI: ";"> -| <STAR: "*"> -| <COMMA: ","> -| <PLUS: "+"> -| <MINUS: "-"> -| <DESC: "DESC"> -| <ASC: "ASC"> -| <EQUALS: "="> -| <BETWEEN: "BETWEEN"> -| <INTO: "INTO"> -| <VALUES: "VALUES"> -| <CREATE: "CREATE"> -| <VIEW: "VIEW"> -| <IS: "IS"> -| <NOT: "NOT"> -| <NULL: "NULL"> -| <START_DQUOTE: "\""> { pushState(IN_DQUOTE); } -| <START_SQUOTE: "'"> { pushState(IN_SQUOTE); } -| <INTEGER: - "0" ( - "x" (["0"-"9","a"-"b"])+ - | (["0"-"7"])+ - ) - | ["1"-"9"] (["0"-"9"])* - > -| <NAME: ["a"-"z"] (["a"-"z","0"-"9","_","-"])*> -| <PARAMETER: "?" (["a"-"z"])+> -//| <WORD: (~["'", "\"", "/", " ", "\f", "\n", "\r", "\t", "*"])+> + <OPEN_PAREN: "("> +| <CLOSE_PAREN: ")"> +| <AND: "AND"> +| <OR: "OR"> +| <PERIOD: "."> +| <JOIN: "JOIN"> +| <LEFT: "LEFT"> +| <AS: "AS"> +| <WHERE: "WHERE"> +| <HAVING: "HAVING"> +| <GROUP: "GROUP"> +| <ORDER: "ORDER"> +//| <UNION: "UNION"> +| <BY: "BY"> +| <ON: "ON"> +| <USING: "USING"> +| <LIMIT: "LIMIT"> +| <OFFSET: "OFFSET"> +| <SELECT: "SELECT"> +| <DELETE: "DELETE"> +| <UPDATE: "UPDATE"> +| <INSERT: "INSERT"> +| <RELATION: "RELATION"> +| <EXCLUDE: "EXCLUDE"> +| <UPPER: "UPPER"> +| <LOWER: "LOWER"> +| <TYPE: "TYPE"> +| <TITLE: "TITLE"> +| <SET: "SET"> +| <FROM: "FROM"> +| <SEMI: ";"> +| <STAR: "*"> +| <COMMA: ","> +| <PLUS: "+"> +| <MINUS: "-"> +| <DESC: "DESC"> +| <ASC: "ASC"> +| <EQUALS: "="> +| <BETWEEN: "BETWEEN"> +| <INTO: "INTO"> +| <VALUES: "VALUES"> +| <CREATE: "CREATE"> +| <VIEW: "VIEW"> +| <IS: "IS"> +| <NOT: "NOT"> +| <NULL: "NULL"> +| <START_DQUOTE: "\""> { pushState(IN_DQUOTE); } +| <START_SQUOTE: "'"> { pushState(IN_SQUOTE); } +| <INTEGER: + "0" ( + "x" (["0"-"9","a"-"b"])+ + | (["0"-"7"])+ + ) + | ["1"-"9"] (["0"-"9"])* + > +| <NAME: ["a"-"z"] (["a"-"z","0"-"9","_","-"])*> +| <PARAMETER: "?" (["a"-"z"])+> +//| <WORD: (~["'", "\"", "/", " ", "\f", "\n", "\r", "\t", "*"])+> } <DEFAULT> SKIP: { - <SPACE: " " | "\f" | "\n" | "\r" | "\t"> + <SPACE: " " | "\f" | "\n" | "\r" | "\t"> } <*> MORE: { - <COMMENT_START: "/*"> { if (curLexState != IN_COMMENT) pushState(IN_COMMENT); } + <COMMENT_START: "/*"> { if (curLexState != IN_COMMENT) pushState(IN_COMMENT); } } <IN_COMMENT> MORE: { - <(~[])> -| <COMMENT_END: "*/"> { popState(); } + <(~[])> +| <COMMENT_END: "*/"> { popState(); } } <IN_DQUOTE,IN_SQUOTE> TOKEN: { - <ESCAPED: "\\" ["r", "n", "b", "t", "f"]> + <ESCAPED: "\\" ["r", "n", "b", "t", "f"]> } <IN_DQUOTE> TOKEN: { - <END_DQUOTE: "\""> { popState(); } + <END_DQUOTE: "\""> { popState(); } } <IN_SQUOTE> TOKEN: { - <ESCAPE_SQUOTE: "''"> -| <END_SQUOTE: "'"> { popState(); } + <ESCAPE_SQUOTE: "''"> +| <END_SQUOTE: "'"> { popState(); } } <DEFAULT,IN_DQUOTE,IN_SQUOTE> TOKEN: { - <TEXT: (~[])> + <TEXT: (~[])> } // ------------------- public List<SQLStatement<?>> SQLFile(): { - List<SQLStatement<?>> list = FastList.newInstance(); - SQLStatement<?> statement; + List<SQLStatement<?>> list = FastList.newInstance(); + SQLStatement<?> statement; } { - ( statement=Statement() ( <SEMI> )? { list.add(statement); } )* - <EOF> - { return list; } + ( statement=Statement() ( <SEMI> )? { list.add(statement); } )* + <EOF> + { return list; } } public SQLStatement StandaloneStatement(): { - SQLStatement statement; + SQLStatement statement; } { - statement=Statement() ( <SEMI> )? <EOF> { return statement; } + statement=Statement() ( <SEMI> )? <EOF> { return statement; } } public SQLView ViewStatement(): { - SQLView sqlView; + SQLView sqlView; } { - sqlView=View() ( <SEMI> )? <EOF> { return sqlView; } + sqlView=View() ( <SEMI> )? <EOF> { return sqlView; } } public SQLSelect SelectStatement(): { - SQLSelect sqlSelect; + SQLSelect sqlSelect; } { - sqlSelect=Select() ( <SEMI> )? <EOF> { return sqlSelect; } + sqlSelect=Select() ( <SEMI> )? <EOF> { return sqlSelect; } } public SQLDelete DeleteStatement(): { - SQLDelete sqlDelete; + SQLDelete sqlDelete; } { - sqlDelete=Delete() ( <SEMI> )? <EOF> { return sqlDelete; } + sqlDelete=Delete() ( <SEMI> )? <EOF> { return sqlDelete; } } public SQLUpdate UpdateStatement(): { - SQLUpdate sqlUpdate; + SQLUpdate sqlUpdate; } { - sqlUpdate=Update() ( <SEMI> )? <EOF> { return sqlUpdate; } + sqlUpdate=Update() ( <SEMI> )? <EOF> { return sqlUpdate; } } public SQLInsert InsertStatement(): { - SQLInsert sqlInsert; + SQLInsert sqlInsert; } { - sqlInsert=Insert() ( <SEMI> )? <EOF> { return sqlInsert; } + sqlInsert=Insert() ( <SEMI> )? <EOF> { return sqlInsert; } } public Condition Condition(): { Condition c; } { - c=ConditionExpression() <EOF> { return c; } + c=ConditionExpression() <EOF> { return c; } } private SQLStatement Statement(): { - SQLStatement statement; + SQLStatement statement; } { - ( - statement=Select() { return statement; } - | statement=Delete() { return statement; } - | statement=Update() { return statement; } - | statement=Insert() { return statement; } - | statement=View() { return statement; } - ) + ( + statement=Select() { return statement; } + | statement=Delete() { return statement; } + | statement=Update() { return statement; } + | statement=Insert() { return statement; } + | statement=View() { return statement; } + ) } private SQLView View(): { - String name; - SQLSelect sqlSelect; + String name; + SQLSelect sqlSelect; } { - <CREATE> <VIEW> name=NamePart() <AS> sqlSelect=Select() - { return new SQLView(name, sqlSelect); } + <CREATE> <VIEW> name=NamePart() <AS> sqlSelect=Select() + { return new SQLView(name, sqlSelect); } } private SQLSelect Select(): { - Integer i; - List<OrderByItem> orderBy = null; - List<String> groupBy = null; - Map<String, FieldDef> fieldDefs = FastMap.newInstance(); - List<FieldAll> fieldAlls = FastList.newInstance(); - Set<String> fieldAllAliases = FastSet.newInstance(); - Table table; - Map<String, Relation> relations = FastMap.newInstance(); - Condition whereCondition = null, havingCondition = null; - int offset = -1, limit = -1; -} -{ - <SELECT> ( - FieldDef(fieldDefs, fieldAlls, fieldAllAliases) - ( <COMMA> FieldDef(fieldDefs, fieldAlls, fieldAllAliases) )* - ) - <FROM> table=Table() - ( <RELATION> Relation(relations) )* - ( <WHERE> whereCondition=ConditionExpression() )? - ( <HAVING> havingCondition=ConditionExpression() )? - ( <GROUP> <BY> groupBy=FieldList() )? - ( <ORDER> <BY> orderBy=OrderByList() )? - ( <OFFSET> offset=Integer() )? - ( <LIMIT> limit=Integer() )? - { return new SQLSelect(fieldAlls, fieldDefs, table, relations, whereCondition, havingCondition, groupBy, orderBy, offset, limit); } + Integer i; + List<OrderByItem> orderBy = null; + List<String> groupBy = null; + Map<String, FieldDef> fieldDefs = FastMap.newInstance(); + List<FieldAll> fieldAlls = FastList.newInstance(); + Set<String> fieldAllAliases = FastSet.newInstance(); + Table table; + Map<String, Relation> relations = FastMap.newInstance(); + Condition whereCondition = null, havingCondition = null; + int offset = -1, limit = -1; +} +{ + <SELECT> ( + FieldDef(fieldDefs, fieldAlls, fieldAllAliases) + ( <COMMA> FieldDef(fieldDefs, fieldAlls, fieldAllAliases) )* + ) + <FROM> table=Table() + ( <RELATION> Relation(relations) )* + ( <WHERE> whereCondition=ConditionExpression() )? + ( <HAVING> havingCondition=ConditionExpression() )? + ( <GROUP> <BY> groupBy=FieldList() )? + ( <ORDER> <BY> orderBy=OrderByList() )? + ( <OFFSET> offset=Integer() )? + ( <LIMIT> limit=Integer() )? + { return new SQLSelect(fieldAlls, fieldDefs, table, relations, whereCondition, havingCondition, groupBy, orderBy, offset, limit); } } private void Relation(Map<String, Relation> relations): { - String type = null, title = null, entityName; - List<KeyMap> keyMaps; + String type = null, title = null, entityName; + List<KeyMap> keyMaps; } { - ( <TYPE> type=NamePart() )? - ( <TITLE> title=NamePart() )? - <NAME> { entityName = getToken(0).image; } - keyMaps=KeyMaps("cur", "other") - { - Relation relation = new Relation(type, title, entityName, keyMaps); - if (relations.containsKey(relation.getName())) throw new ParseException("Duplicate relation: " + relation); - relations.put(relation.getName(), relation); - } + ( <TYPE> type=NamePart() )? + ( <TITLE> title=NamePart() )? + <NAME> { entityName = getToken(0).image; } + keyMaps=KeyMaps("cur", "other") + { + Relation relation = new Relation(type, title, entityName, keyMaps); + if (relations.containsKey(relation.getName())) throw new ParseException("Duplicate relation: " + relation); + relations.put(relation.getName(), relation); + } } private SQLUpdate Update(): { - TableName tableName; - List<Table> tableList = null; - Condition whereCondition = null; - List<SetField> allSetFields = FastList.newInstance(); - List<SetField> setFields; - Joined joined = null; + TableName tableName; + List<Table> tableList = null; + Condition whereCondition = null; + List<SetField> allSetFields = FastList.newInstance(); + List<SetField> setFields; + Joined joined = null; } { - <UPDATE> tableName=TableName() - <SET> - setFields=SetField() { allSetFields.addAll(setFields); } - ( <COMMA> setFields=SetField() { allSetFields.addAll(setFields); } )* - ( LOOKAHEAD(<FROM>, {updateSupportsFrom}) <FROM> joined=JoinedRest(false, tableName) )? - ( <WHERE> whereCondition=ConditionExpression() )? - { return new SQLUpdate(new Table(tableName, joined), allSetFields, whereCondition); } + <UPDATE> tableName=TableName() + <SET> + setFields=SetField() { allSetFields.addAll(setFields); } + ( <COMMA> setFields=SetField() { allSetFields.addAll(setFields); } )* + ( LOOKAHEAD(<FROM>, {updateSupportsFrom}) <FROM> joined=JoinedRest(false, tableName) )? + ( <WHERE> whereCondition=ConditionExpression() )? + { return new SQLUpdate(new Table(tableName, joined), allSetFields, whereCondition); } } private SQLDelete Delete(): { - TableName tableName; - List<Table> tableList = null; - Condition whereCondition = null; - Joined joined = null; + TableName tableName; + List<Table> tableList = null; + Condition whereCondition = null; + Joined joined = null; } { - <DELETE> <FROM> tableName=TableName() - ( LOOKAHEAD(<USING>, {deleteSupportsUsing}) <USING> joined=JoinedRest(false, tableName) )? - ( <WHERE> whereCondition=ConditionExpression() )? - { return new SQLDelete(new Table(tableName, joined), whereCondition); } + <DELETE> <FROM> tableName=TableName() + ( LOOKAHEAD(<USING>, {deleteSupportsUsing}) <USING> joined=JoinedRest(false, tableName) )? + ( <WHERE> whereCondition=ConditionExpression() )? + { return new SQLDelete(new Table(tableName, joined), whereCondition); } } private SQLInsert Insert(): { - TableName tableName; - List<String> columns = FastList.newInstance(); - String n; - InsertSource source; + TableName tableName; + List<String> columns = FastList.newInstance(); + String n; + InsertSource source; } { - <INSERT> <INTO> tableName=TableName() ( - <OPEN_PAREN> - n=NamePart() { columns.add(n); } - ( <COMMA> n=NamePart() { columns.add(n); } )* - <CLOSE_PAREN> - )? - ( source=InsertValues() | source=Select() ) - { return new SQLInsert(tableName, source, columns); } + <INSERT> <INTO> tableName=TableName() ( + <OPEN_PAREN> + n=NamePart() { columns.add(n); } + ( <COMMA> n=NamePart() { columns.add(n); } )* + <CLOSE_PAREN> + )? + ( source=InsertValues() | source=Select() ) + { return new SQLInsert(tableName, source, columns); } } private InsertValues InsertValues(): { - List<InsertRow> list = FastList.newInstance(); - InsertRow row; + List<InsertRow> list = FastList.newInstance(); + InsertRow row; } { - <VALUES> - row=InsertRow() { list.add(row); } - ( <COMMA> row=InsertRow() { list.add(row); } )* - { return new InsertValues(list); } + <VALUES> + row=InsertRow() { list.add(row); } + ( <COMMA> row=InsertRow() { list.add(row); } )* + { return new InsertValues(list); } } private InsertRow InsertRow(): { - List<Value> list = FastList.newInstance(); - Value v; + List<Value> list = FastList.newInstance(); + Value v; } { - <OPEN_PAREN> - v=InsertValue() { list.add(v); } - ( <COMMA> v=InsertValue() { list.add(v); } )* - <CLOSE_PAREN> - { return new InsertRow(list); } + <OPEN_PAREN> + v=InsertValue() { list.add(v); } + ( <COMMA> v=InsertValue() { list.add(v); } )* + <CLOSE_PAREN> + { return new InsertRow(list); } } private Value InsertValue(): { - Value v; - Integer i; - String s; + Value v; + Integer i; + String s; } { - v=ParameterValue() { return v; } -| i=Integer() { return new NumberValue<Integer>(i); } -| s=SQuoted() { return new StringValue(s); } + v=ParameterValue() { return v; } +| i=Integer() { return new NumberValue<Integer>(i); } +| s=SQuoted() { return new StringValue(s); } } private List<SetField> SetField(): { - List<SetField> setFields = FastList.newInstance(); - String n; - Value v; - List<String> columnList = FastList.newInstance(); - List<Value> valueList = FastList.newInstance(); -} -{ - ( - n=NamePart() <EQUALS> ( - v=Value() { setFields.add(new SetField(n, v)); } - | v=MathValue() { setFields.add(new SetField(n, v)); } - ) - | <OPEN_PAREN> - n=NamePart() { columnList.add(n); } - ( <COMMA> n=NamePart() { columnList.add(n); } )* - <CLOSE_PAREN> - <EQUALS> - <OPEN_PAREN> - (v=Value()|v=MathValue()) { valueList.add(v); } - ( <COMMA> (v=Value()|v=MathValue()) { valueList.add(v); } )* - <CLOSE_PAREN> { - if (columnList.size() != valueList.size()) throw new ParseException(); - for (int i = 0; i < columnList.size(); i++) { - setFields.add(new SetField(columnList.get(i), valueList.get(i))); - } - } - ) - { return setFields; } + List<SetField> setFields = FastList.newInstance(); + String n; + Value v; + List<String> columnList = FastList.newInstance(); + List<Value> valueList = FastList.newInstance(); +} +{ + ( + n=NamePart() <EQUALS> ( + v=Value() { setFields.add(new SetField(n, v)); } + | v=MathValue() { setFields.add(new SetField(n, v)); } + ) + | <OPEN_PAREN> + n=NamePart() { columnList.add(n); } + ( <COMMA> n=NamePart() { columnList.add(n); } )* + <CLOSE_PAREN> + <EQUALS> + <OPEN_PAREN> + (v=Value()|v=MathValue()) { valueList.add(v); } + ( <COMMA> (v=Value()|v=MathValue()) { valueList.add(v); } )* + <CLOSE_PAREN> { + if (columnList.size() != valueList.size()) throw new ParseException(); + for (int i = 0; i < columnList.size(); i++) { + setFields.add(new SetField(columnList.get(i), valueList.get(i))); + } + } + ) + { return setFields; } } private Table Table(): { - TableName tableName; - Joined joined = null; + TableName tableName; + Joined joined = null; } { - tableName=TableName() - ( joined=Joined(tableName) )? - { return new Table(tableName, joined); } + tableName=TableName() + ( joined=Joined(tableName) )? + { return new Table(tableName, joined); } } private Joined Joined(TableName leftTableName): { - Boolean isOptional; - Joined joined = null; + Boolean isOptional; + Joined joined = null; } { - isOptional=Joiner() joined=JoinedRest(isOptional, leftTableName) - { return joined; } + isOptional=Joiner() joined=JoinedRest(isOptional, leftTableName) + { return joined; } } private Joined JoinedRest(boolean isOptional, TableName leftTableName): { - TableName rightTableName; - List<KeyMap> keyMaps; - Joined joined = null; + TableName rightTableName; + List<KeyMap> keyMaps; + Joined joined = null; } { - rightTableName=TableName() - keyMaps=KeyMaps(leftTableName.getAlias(), rightTableName.getAlias()) - ( joined=Joined(rightTableName) )? - { return new Joined(isOptional, rightTableName, keyMaps, joined); } + rightTableName=TableName() + keyMaps=KeyMaps(leftTableName.getAlias(), rightTableName.getAlias()) + ( joined=Joined(rightTableName) )? + { return new Joined(isOptional, rightTableName, keyMaps, joined); } } private List<KeyMap> KeyMaps(String leftAlias, String rightAlias): { - List<KeyMap> keyMaps = FastList.newInstance(); - String n; + List<KeyMap> keyMaps = FastList.newInstance(); + String n; } { - ( - <ON> - KeyMap(keyMaps, leftAlias, rightAlias) - ( <AND> KeyMap(keyMaps, leftAlias, rightAlias) )* - | - <USING> - n=NamePart() { keyMaps.add(new KeyMap(n, n)); } - ( <COMMA> n=NamePart() { keyMaps.add(new KeyMap(n, n)); } )* - ) - { return keyMaps; } + ( + <ON> + KeyMap(keyMaps, leftAlias, rightAlias) + ( <AND> KeyMap(keyMaps, leftAlias, rightAlias) )* + | + <USING> + n=NamePart() { keyMaps.add(new KeyMap(n, n)); } + ( <COMMA> n=NamePart() { keyMaps.add(new KeyMap(n, n)); } )* + ) + { return keyMaps; } } private void KeyMap(List<KeyMap> keyMaps, String leftAlias, String rightAlias): { - String alias1, field1; - String alias2, field2; + String alias1, field1; + String alias2, field2; } { - alias1=NamePart() <PERIOD> field1=NamePart() - <EQUALS> - alias2=NamePart() <PERIOD> field2=NamePart() - { - if (alias1.equals(leftAlias)) { - if (!alias2.equals(rightAlias)) throw new ParseException("invalid right alias(" + alias2 + "), expected(" + rightAlias + ")"); - keyMaps.add(new KeyMap(field1, field2)); - } else if (alias1.equals(rightAlias)) { - if (!alias2.equals(leftAlias)) throw new ParseException("invalid left alias(" + alias2 + "), expected(" + leftAlias + ")"); - keyMaps.add(new KeyMap(field2, field1)); - } else { - throw new ParseException("invalid aliases, expected(" + leftAlias + " or " + rightAlias + ")"); - } - } + alias1=NamePart() <PERIOD> field1=NamePart() + <EQUALS> + alias2=NamePart() <PERIOD> field2=NamePart() + { + if (alias1.equals(leftAlias)) { + if (!alias2.equals(rightAlias)) throw new ParseException("invalid right alias(" + alias2 + "), expected(" + rightAlias + ")"); + keyMaps.add(new KeyMap(field1, field2)); + } else if (alias1.equals(rightAlias)) { + if (!alias2.equals(leftAlias)) throw new ParseException("invalid left alias(" + alias2 + "), expected(" + leftAlias + ")"); + keyMaps.add(new KeyMap(field2, field1)); + } else { + throw new ParseException("invalid aliases, expected(" + leftAlias + " or " + rightAlias + ")"); + } + } } private TableName TableName(): { - String tableName, alias = null; + String tableName, alias = null; } { - tableName=NamePart() - ( (<AS>)? alias=NamePart() )? - { return new TableName(tableName, alias); } + tableName=NamePart() + ( (<AS>)? alias=NamePart() )? + { return new TableName(tableName, alias); } } private Boolean Joiner(): {} { - <LEFT> <JOIN> { return Boolean.TRUE; } -| <JOIN> { return Boolean.FALSE; } + <LEFT> <JOIN> { return Boolean.TRUE; } +| <JOIN> { return Boolean.FALSE; } } private void FieldDef(Map<String, FieldDef> fieldDefs, List<FieldAll> fieldAlls, Set<String> fieldAllAliases): { - StaticValue v; - String n, fieldAlias = null, fieldName, exc; - FieldDef def; - Set<String> excludeList = FastSet.newInstance(); -} -{ - ( - n=NamePart() ( - <PERIOD> ( - <STAR> - ( - { if (fieldAllAliases.contains(n)) throw new ParseException("Duplicate aliasAll(" + n + ")"); } - <EXCLUDE> <OPEN_PAREN> - exc=NamePart() { excludeList.add(exc); } - ( <COMMA> exc=NamePart() { excludeList.add(exc); } )* - <CLOSE_PAREN> - )? - { fieldAlls.add(new FieldAll(n, excludeList)); return; } - | fieldName=NamePart() ( <AS> fieldAlias=NamePart() )? { def = new FieldDefFieldValue(new FieldValue(n, fieldName), fieldAlias); } - ) - | v=FunctionCallRest(n) ( <AS> fieldAlias=NamePart() )? { def = new FieldDefValue(v, fieldAlias); } - | ( <AS> fieldAlias=NamePart() )? { def = new FieldDefFieldValue(new FieldValue(null, n), fieldAlias); } - ) - | v=MathValue() ( <AS> fieldAlias=NamePart() )? { def = new FieldDefValue(v, fieldAlias); } - ) { - if (fieldDefs.containsKey(def.getAlias())) throw new ParseException("duplicate alias(" + def.getAlias() + ")"); - fieldDefs.put(def.getAlias(), def); - } + StaticValue v; + String n, fieldAlias = null, fieldName, exc; + FieldDef def; + Set<String> excludeList = FastSet.newInstance(); +} +{ + ( + n=NamePart() ( + <PERIOD> ( + <STAR> + ( + { if (fieldAllAliases.contains(n)) throw new ParseException("Duplicate aliasAll(" + n + ")"); } + <EXCLUDE> <OPEN_PAREN> + exc=NamePart() { excludeList.add(exc); } + ( <COMMA> exc=NamePart() { excludeList.add(exc); } )* + <CLOSE_PAREN> + )? + { fieldAlls.add(new FieldAll(n, excludeList)); return; } + | fieldName=NamePart() ( <AS> fieldAlias=NamePart() )? { def = new FieldDefFieldValue(new FieldValue(n, fieldName), fieldAlias); } + ) + | v=FunctionCallRest(n) ( <AS> fieldAlias=NamePart() )? { def = new FieldDefValue(v, fieldAlias); } + | ( <AS> fieldAlias=NamePart() )? { def = new FieldDefFieldValue(new FieldValue(null, n), fieldAlias); } + ) + | v=MathValue() ( <AS> fieldAlias=NamePart() )? { def = new FieldDefValue(v, fieldAlias); } + ) { + if (fieldDefs.containsKey(def.getAlias())) throw new ParseException("duplicate alias(" + def.getAlias() + ")"); + fieldDefs.put(def.getAlias(), def); + } } private StaticValue MathValue(): { - ConstantValue v; - List<ConstantValue> values = FastList.newInstance(); - String operator = null, newOperator; -} -{ - <OPEN_PAREN> - v=ConstantValue() { values.add(v); } - ( - newOperator=MathOperator() - v=ConstantValue() { - if (operator == null) { - operator = newOperator; - } else if (!newOperator.equals(operator)) { - throw new ParseException("Different operators in complex alias(" + operator + ":" + newOperator + ")"); - } - values.add(v); - } - )* - <CLOSE_PAREN> - { - if (values.size() == 1 && values.get(0) instanceof StaticValue) return (StaticValue) values.get(0); - return new MathValue(operator, values); - } + ConstantValue v; + List<ConstantValue> values = FastList.newInstance(); + String operator = null, newOperator; +} +{ + <OPEN_PAREN> + v=ConstantValue() { values.add(v); } + ( + newOperator=MathOperator() + v=ConstantValue() { + if (operator == null) { + operator = newOperator; + } else if (!newOperator.equals(operator)) { + throw new ParseException("Different operators in complex alias(" + operator + ":" + newOperator + ")"); + } + values.add(v); + } + )* + <CLOSE_PAREN> + { + if (values.size() == 1 && values.get(0) instanceof StaticValue) return (StaticValue) values.get(0); + return new MathValue(operator, values); + } } private FunctionCall FunctionCallRest(String name): { - Value arg; - List<Value> args = FastList.newInstance(); + Value arg; + List<Value> args = FastList.newInstance(); } { - <OPEN_PAREN> - ( - arg=Value() { args.add(arg); } - ( <COMMA> arg=Value() { args.add(arg); } )* - ) ? - <CLOSE_PAREN> - { return new FunctionCall(name, args); } + <OPEN_PAREN> + ( + arg=Value() { args.add(arg); } + ( <COMMA> arg=Value() { args.add(arg); } )* + ) ? + <CLOSE_PAREN> + { return new FunctionCall(name, args); } } private ConstantValue ConstantValue(): { - String n; - ConstantValue v; - int i; - String s; + String n; + ConstantValue v; + int i; + String s; } { - n=NamePart() ( - v=FunctionCallRest(n) { return v; } - | v=FieldValue(n) { return v; } - ) -| i=Integer() { return new NumberValue<Integer>(i); } -| s=SQuoted() { return new StringValue(s); } -| v=MathValue() { return v; } + n=NamePart() ( + v=FunctionCallRest(n) { return v; } + | v=FieldValue(n) { return v; } + ) +| i=Integer() { return new NumberValue<Integer>(i); } +| s=SQuoted() { return new StringValue(s); } +| v=MathValue() { return v; } } private String NamePart(): {} { - <NAME> { return getToken(0).image; } -| <TYPE> { return getToken(0).image; } + <NAME> { return getToken(0).image; } +| <TYPE> { return getToken(0).image; } } private String DQuoted(): { StringBuilder sb = new StringBuilder(); } { - <START_DQUOTE> (<TEXT> { sb.append(getToken(0).image); } | <ESCAPED> { sb.append(getToken(0).image); })* <END_DQUOTE> - { return sb.toString(); } + <START_DQUOTE> (<TEXT> { sb.append(getToken(0).image); } | <ESCAPED> { sb.append(getToken(0).image); })* <END_DQUOTE> + { return sb.toString(); } } private String SQuoted(): { StringBuilder sb = new StringBuilder(); } { - <START_SQUOTE> ( - <TEXT> { sb.append(getToken(0).image); } - | <ESCAPED> { sb.append(getToken(0).image); } - | <ESCAPE_SQUOTE> { sb.append("'"); } - )* <END_SQUOTE> - { return sb.toString(); } + <START_SQUOTE> ( + <TEXT> { sb.append(getToken(0).image); } + | <ESCAPED> { sb.append(getToken(0).image); } + | <ESCAPE_SQUOTE> { sb.append("'"); } + )* <END_SQUOTE> + { return sb.toString(); } } private List<String> FieldList(): { - List<String> list = FastList.newInstance(); - String n; + List<String> list = FastList.newInstance(); + String n; } { - n=NamePart() { list.add(n); } - ( <COMMA> n=NamePart() { list.add(n); } )* - { return list; } + n=NamePart() { list.add(n); } + ( <COMMA> n=NamePart() { list.add(n); } )* + { return list; } } private FieldValue FieldValue(String fieldName): { - String s; + String s; } { - ( <PERIOD> s=NamePart() { return new FieldValue(fieldName, s); } )? - { - return new FieldValue(fieldName); - } + ( <PERIOD> s=NamePart() { return new FieldValue(fieldName, s); } )? + { + return new FieldValue(fieldName); + } } private List<OrderByItem> OrderByList(): { - List<OrderByItem> orderBy = FastList.newInstance(); - OrderByItem obi; + List<OrderByItem> orderBy = FastList.newInstance(); + OrderByItem obi; } { - obi=OrderByItem() { orderBy.add(obi); } - ( <COMMA> obi=OrderByItem() { orderBy.add(obi); } )* - { return orderBy; } + obi=OrderByItem() { orderBy.add(obi); } + ( <COMMA> obi=OrderByItem() { orderBy.add(obi); } )* + { return orderBy; } } private OrderByItem OrderByItem(): { - String functionName = null, fieldName = null; - boolean descending = false, orderingSet = false; - OrderByItem.Order ordering = OrderByItem.Order.DEFAULT; -} -{ - ( - <PLUS> { ordering = OrderByItem.Order.ASCENDING; } - | <MINUS> { ordering = OrderByItem.Order.DESCENDING; } - )? - ( - ( <UPPER> | <LOWER> ) { functionName = getToken(0).image; } - <OPEN_PAREN> fieldName=NamePart() <CLOSE_PAREN> - | fieldName=NamePart() - ) - LOOKAHEAD({!orderingSet}) ( - <DESC> { ordering = OrderByItem.Order.DESCENDING; } - | <ASC> { ordering = OrderByItem.Order.ASCENDING; } - )? - { return new OrderByItem(ordering, functionName, fieldName); } + String functionName = null, fieldName = null; + boolean descending = false, orderingSet = false; + OrderByItem.Order ordering = OrderByItem.Order.DEFAULT; +} +{ + ( + <PLUS> { ordering = OrderByItem.Order.ASCENDING; } + | <MINUS> { ordering = OrderByItem.Order.DESCENDING; } + )? + ( + ( <UPPER> | <LOWER> ) { functionName = getToken(0).image; } + <OPEN_PAREN> fieldName=NamePart() <CLOSE_PAREN> + | fieldName=NamePart() + ) + LOOKAHEAD({!orderingSet}) ( + <DESC> { ordering = OrderByItem.Order.DESCENDING; } + | <ASC> { ordering = OrderByItem.Order.ASCENDING; } + )? + { return new OrderByItem(ordering, functionName, fieldName); } } private Integer Integer(): {} { - <INTEGER> { return Integer.decode(getToken(0).image); } + <INTEGER> { return Integer.decode(getToken(0).image); } } private Value Value(): { - String n; - Value v; - int i; - String s; + String n; + Value v; + int i; + String s; } { - n=NamePart() ( - v=FunctionCallRest(n) { return v; } - | v=FieldValue(n) { return v; } - ) -| i=Integer() { return new NumberValue<Integer>(i); } -| s=SQuoted() { return new StringValue(s); } + n=NamePart() ( + v=FunctionCallRest(n) { return v; } + | v=FieldValue(n) { return v; } + ) +| i=Integer() { return new NumberValue<Integer>(i); } +| s=SQuoted() { return new StringValue(s); } } private Condition ConditionExpression(): { Condition c; } { - c=OrExpression() { return c; } + c=OrExpression() { return c; } } private Condition AndExpression(): { - List<Condition> list = FastList.newInstance(); - Condition c; + List<Condition> list = FastList.newInstance(); + Condition c; } { - c=BooleanExpression() { list.add(c); } + c=BooleanExpression() { list.add(c); } ( <AND> c=BooleanExpression() { list.add(c); } )* - { return reduce(list, Joiner.AND); } + { return reduce(list, Joiner.AND); } } private Condition OrExpression(): { - List<Condition> list = FastList.newInstance(); - Condition c; + List<Condition> list = FastList.newInstance(); + Condition c; } { - c=AndExpression() { list.add(c); } + c=AndExpression() { list.add(c); } ( <OR> c=AndExpression() { list.add(c); } )* - { return reduce(list, Joiner.OR); } + { return reduce(list, Joiner.OR); } } private Value RightValue(): { - Value v; + Value v; } { - v=Value() { return v; } -| v=ParameterValue() { return v; } + v=Value() { return v; } +| v=ParameterValue() { return v; } } private ParameterValue ParameterValue(): {} { - <PARAMETER> { return new ParameterValue(getToken(0).image.substring(1)); } + <PARAMETER> { return new ParameterValue(getToken(0).image.substring(1)); } } private Condition BooleanExpression(): { - Value v1, v2, v, r1, r2; - String op; - Condition c; - List<Value> list = FastList.newInstance(); -} -{ - v1=Value() ( - <BETWEEN> - r1=RightValue() - <AND> - r2=RightValue() - { return new BetweenCondition(v1, r1, r2); } - | <IS> ( - <NULL> { op = "="; v2 = Value.NULL; } - | <NOT> <NULL> { op = "!="; v2 = Value.NULL; } - ) - | op=ComparisonOperator() ( - v2=RightValue() - | <OPEN_PAREN> - v=RightValue() { list.add(v); } - ( <COMMA> v=RightValue() { list.add(v); } )* - <CLOSE_PAREN> - { return new ListCondition(v1, op, list); } - ) - ) - { return new BooleanCondition(v1, op, v2); } -| <OPEN_PAREN> c=ConditionExpression() <CLOSE_PAREN> { return c; } + Value v1, v2, v, r1, r2; + String op; + Condition c; + List<Value> list = FastList.newInstance(); +} +{ + v1=Value() ( + <BETWEEN> + r1=RightValue() + <AND> + r2=RightValue() + { return new BetweenCondition(v1, r1, r2); } + | <IS> ( + <NULL> { op = "="; v2 = Value.NULL; } + | <NOT> <NULL> { op = "!="; v2 = Value.NULL; } + ) + | op=ComparisonOperator() ( + v2=RightValue() + | <OPEN_PAREN> + v=RightValue() { list.add(v); } + ( <COMMA> v=RightValue() { list.add(v); } )* + <CLOSE_PAREN> + { return new ListCondition(v1, op, list); } + ) + ) + { return new BooleanCondition(v1, op, v2); } +| <OPEN_PAREN> c=ConditionExpression() <CLOSE_PAREN> { return c; } } private String ComparisonOperator(): { - StringBuilder sb; + StringBuilder sb; } { - (<TEXT>)+ { sb = new StringBuilder(); sb.append(getToken(0).image); } - ( - <EQUALS> { sb.append(getToken(0).image); } - ((<TEXT>)+ { sb.append(getToken(0).image); })? - )* { return sb.toString(); } -| <NAME> { return getToken(0).image; } -| <EQUALS> { return getToken(0).image.toLowerCase(); } + (<TEXT>)+ { sb = new StringBuilder(); sb.append(getToken(0).image); } + ( + <EQUALS> { sb.append(getToken(0).image); } + ((<TEXT>)+ { sb.append(getToken(0).image); })? + )* { return sb.toString(); } +| <NAME> { return getToken(0).image; } +| <EQUALS> { return getToken(0).image.toLowerCase(); } } private String MathOperator(): {} { - ( <TEXT> )+ { return getToken(0).image.toLowerCase(); } -| <NAME> { return getToken(0).image.toLowerCase(); } + ( <TEXT> )+ { return getToken(0).image.toLowerCase(); } +| <NAME> { return getToken(0).image.toLowerCase(); } } Modified: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/test/GoodParseAll.sql URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/test/GoodParseAll.sql?rev=924378&r1=924377&r2=924378&view=diff ============================================================================== --- ofbiz/trunk/framework/sql/src/org/ofbiz/sql/test/GoodParseAll.sql (original) +++ ofbiz/trunk/framework/sql/src/org/ofbiz/sql/test/GoodParseAll.sql Wed Mar 17 17:28:01 2010 @@ -18,46 +18,46 @@ */ SELECT - a.*, - b.* EXCLUDE (partyId, partyId), - c.* EXCLUDE (partyId), - d.roleTypeId, - d.description AS roleDescription, - SUM(a.partyId), - FOO(a.partyId, 1) AS baz, - (a.partyId || '-' || a.partyTypeId) AS one + a.*, + b.* EXCLUDE (partyId, partyId), + c.* EXCLUDE (partyId), + d.roleTypeId, + d.description AS roleDescription, + SUM(a.partyId), + FOO(a.partyId, 1) AS baz, + (a.partyId || '-' || a.partyTypeId) AS one FROM - Party a LEFT JOIN Person b USING partyId - LEFT JOIN PartyGroup c ON b.partyId = c.partyId - JOIN PartyRole d ON c.partyId = d.partyId AND c.partyId = d.partyId + Party a LEFT JOIN Person b USING partyId + LEFT JOIN PartyGroup c ON b.partyId = c.partyId + JOIN PartyRole d ON c.partyId = d.partyId AND c.partyId = d.partyId RELATION TYPE one TITLE MainA Person USING partyId RELATION TITLE MainB Person USING partyId RELATION TYPE one Person USING partyId RELATION PartyGroup USING partyId WHERE - a.partyTypeId = 'PERSON' - AND - b.lastName LIKE ?lastName - AND - b.birthDate BETWEEN '1974-12-01' AND '1974-12-31' - OR - ( - b.partyId IN ('1', '2', '3', '4') - AND - b.gender = 'M' - ) - + a.partyTypeId = 'PERSON' + AND + b.lastName LIKE ?lastName + AND + b.birthDate BETWEEN '1974-12-01' AND '1974-12-31' + OR + ( + b.partyId IN ('1', '2', '3', '4') + AND + b.gender = 'M' + ) + HAVING - b.firstName LIKE '%foo%' + b.firstName LIKE '%foo%' ORDER BY - LOWER(lastName), firstName, birthDate DESC + LOWER(lastName), firstName, birthDate DESC OFFSET 5 LIMIT 10 ; INSERT INTO Party (partyId, partyTypeId, statusId) VALUES - ('a', 'PERSON', 'PARTY_DISABLED'), - (5, 'PARTY_GROUP', ?name); + ('a', 'PERSON', 'PARTY_DISABLED'), + (5, 'PARTY_GROUP', ?name); INSERT INTO Person (partyId, firstName) SELECT partyId, (partyId || '-auto') AS firstName FROM Party WHERE partyId IN ('a', 'b'); UPDATE Person SET (lastName) = (('auto-' || partyId)) WHERE partyId IN ('a', 'b'); UPDATE Person SET (lastName, height, width) = (('auto-' || partyId), 5, 7) WHERE partyId IN ('a', 'b'); Modified: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/test/TestSelect.sql URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/test/TestSelect.sql?rev=924378&r1=924377&r2=924378&view=diff ============================================================================== --- ofbiz/trunk/framework/sql/src/org/ofbiz/sql/test/TestSelect.sql (original) +++ ofbiz/trunk/framework/sql/src/org/ofbiz/sql/test/TestSelect.sql Wed Mar 17 17:28:01 2010 @@ -18,27 +18,27 @@ */ SELECT - a.*, - b.firstName, - b.lastName + a.*, + b.firstName, + b.lastName FROM - Party a JOIN Person b ON a.partyId = b.partyId + Party a JOIN Person b ON a.partyId = b.partyId WHERE - a.partyTypeId = 'PERSON' - AND - b.lastName LIKE ?lastName + a.partyTypeId = 'PERSON' + AND + b.lastName LIKE ?lastName HAVING - b.firstName LIKE '%foo%' + b.firstName LIKE '%foo%' OFFSET 5 LIMIT 10 ; SELECT - a.partyTypeId, - COUNT(a.partyId) AS count + a.partyTypeId, + COUNT(a.partyId) AS count FROM - Party a LEFT JOIN Person b USING partyId - LEFT JOIN PartyGroup c USING partyId + Party a LEFT JOIN Person b USING partyId + LEFT JOIN PartyGroup c USING partyId GROUP BY - partyTypeId + partyTypeId ; Modified: ofbiz/trunk/framework/testtools/documents/TestTools.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/documents/TestTools.xml?rev=924378&r1=924377&r2=924378&view=diff ============================================================================== --- ofbiz/trunk/framework/testtools/documents/TestTools.xml (original) +++ ofbiz/trunk/framework/testtools/documents/TestTools.xml Wed Mar 17 17:28:01 2010 @@ -18,13 +18,13 @@ under the License. --> <chapter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - version="5.0" xmlns:xl="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" - xsi:schemaLocation="http://docbook.org/ns/docbook ../../applications/content/dtd/docbook.xsd" - xmlns="http://docbook.org/ns/docbook"> - <title>The OFBiz Test Tools Introduction.</title> + version="5.0" xmlns:xl="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" + xsi:schemaLocation="http://docbook.org/ns/docbook ../../applications/content/dtd/docbook.xsd" + xmlns="http://docbook.org/ns/docbook"> + <title>The OFBiz Test Tools Introduction.</title> <para> Ofbiz contains a test framework consisting out of the <link xl:href="http://junit.org">JUnit framework</link> and the <link xl:href="http://seleniumhq.org/">Selenium firefox plugin.</link> with the <link xl:href="http://sourceforge.net/projects/seleniumxml/">XML extension.</link> - For a excellent JUnit introduction check the <link xl:href="http://clarkware.com/articles/JUnitPrimer.html">Clarkware site.</link> + For a excellent JUnit introduction check the <link xl:href="http://clarkware.com/articles/JUnitPrimer.html">Clarkware site.</link> </para> </chapter> Modified: ofbiz/trunk/framework/testtools/dtd/SeleniumXml.xsd URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/dtd/SeleniumXml.xsd?rev=924378&r1=924377&r2=924378&view=diff ============================================================================== --- ofbiz/trunk/framework/testtools/dtd/SeleniumXml.xsd (original) +++ ofbiz/trunk/framework/testtools/dtd/SeleniumXml.xsd Wed Mar 17 17:28:01 2010 @@ -1,84 +1,84 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. --> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" - elementFormDefault="qualified"> - <!-- - ================================================== - ========== Element and Attribute definitions for - ========== SeleniumXml project =================== - ================================================== - --> - <xs:group name="AllCommands"><!-- All SeleniumXml command which normally match with the SeleniumRC Java API. --> - <xs:choice> - <xs:element ref="testcase" /> - <xs:element ref="type" /> - <xs:element ref="loadData" /> - <xs:element ref="selectPopup" /> - <xs:element ref="getAllWindowIds" /> - <xs:element ref="captureTextInPage" /> - <xs:element ref="getSelectedLabel" /> - <xs:element ref="getSelectedValue" /> - <xs:element ref="getSelectedId" /> - <xs:element ref="assertContains" /> - <xs:element ref="getHtmlSource" /> - <xs:element ref="getBodyText" /> - <xs:element ref="print" /> - <xs:element ref="waitForPageToLoad" /> - <xs:element ref="getSelectedIds" /> - <xs:element ref="copy" /> - <xs:element ref="append" /> - <xs:element ref="open" /> - <xs:element ref="click" /> - <xs:element ref="select" /> - <xs:element ref="uniqueId" /> - <xs:element ref="randomAlphaString" /> - <xs:element ref="randomString" /> - <xs:element ref="setSpeed" /> - </xs:choice> - </xs:group> + elementFormDefault="qualified"> + <!-- + ================================================== + ========== Element and Attribute definitions for + ========== SeleniumXml project =================== + ================================================== + --> + <xs:group name="AllCommands"><!-- All SeleniumXml command which normally match with the SeleniumRC Java API. --> + <xs:choice> + <xs:element ref="testcase" /> + <xs:element ref="type" /> + <xs:element ref="loadData" /> + <xs:element ref="selectPopup" /> + <xs:element ref="getAllWindowIds" /> + <xs:element ref="captureTextInPage" /> + <xs:element ref="getSelectedLabel" /> + <xs:element ref="getSelectedValue" /> + <xs:element ref="getSelectedId" /> + <xs:element ref="assertContains" /> + <xs:element ref="getHtmlSource" /> + <xs:element ref="getBodyText" /> + <xs:element ref="print" /> + <xs:element ref="waitForPageToLoad" /> + <xs:element ref="getSelectedIds" /> + <xs:element ref="copy" /> + <xs:element ref="append" /> + <xs:element ref="open" /> + <xs:element ref="click" /> + <xs:element ref="select" /> + <xs:element ref="uniqueId" /> + <xs:element ref="randomAlphaString" /> + <xs:element ref="randomString" /> + <xs:element ref="setSpeed" /> + </xs:choice> + </xs:group> - <xs:element name="testcase"> - <xs:annotation> - <xs:documentation></xs:documentation> - </xs:annotation> + <xs:element name="testcase"> + <xs:annotation> + <xs:documentation></xs:documentation> + </xs:annotation> - <xs:complexType> - <xs:sequence> - <xs:group minOccurs="0" maxOccurs="unbounded" ref="AllCommands"/> - </xs:sequence> - - <xs:attributeGroup ref="attlist.name-value" /> - <xs:attribute name="LABEL" type="xs:string" use="required" /> - </xs:complexType> - </xs:element> - - <xs:element name="type" > - <xs:annotation> + <xs:complexType> + <xs:sequence> + <xs:group minOccurs="0" maxOccurs="unbounded" ref="AllCommands"/> + </xs:sequence> + + <xs:attributeGroup ref="attlist.name-value" /> + <xs:attribute name="LABEL" type="xs:string" use="required" /> + </xs:complexType> + </xs:element> + + <xs:element name="type" > + <xs:annotation> <xs:documentation> </xs:documentation> </xs:annotation> <xs:complexType> <xs:attributeGroup ref="attlist.name-value"/> - </xs:complexType> - </xs:element> + </xs:complexType> + </xs:element> <xs:element name="loadData"> <xs:annotation> <xs:documentation> @@ -88,7 +88,7 @@ <xs:attributeGroup ref="attlist.file"/> <xs:attributeGroup ref="attlist.loadData"/> </xs:complexType> - </xs:element> + </xs:element> <xs:element name="selectPopup"> <xs:annotation> @@ -118,7 +118,7 @@ <xs:complexType> <xs:attributeGroup ref="attlist.captureTextInPage"/> </xs:complexType> - </xs:element> + </xs:element> <xs:element name="getSelectedLabel"> <xs:annotation> @@ -306,10 +306,10 @@ </xs:complexType> </xs:element> - <!-- +++++++++++++++++++++++++++++++++++++++++++ --> - <!-- Attribute Lists for all Element definitions --> - <!-- +++++++++++++++++++++++++++++++++++++++++++ --> - <xs:attributeGroup name="attlist.file"> + <!-- +++++++++++++++++++++++++++++++++++++++++++ --> + <!-- Attribute Lists for all Element definitions --> + <!-- +++++++++++++++++++++++++++++++++++++++++++ --> + <xs:attributeGroup name="attlist.file"> <xs:attribute type="xs:string" name="file" use="optional"> <xs:annotation> <xs:documentation> @@ -318,7 +318,7 @@ </xs:attribute> </xs:attributeGroup> - <xs:attributeGroup name="attlist.name-value"> + <xs:attributeGroup name="attlist.name-value"> <xs:attribute type="xs:string" name="name" use="required"> <xs:annotation> <xs:documentation> Modified: ofbiz/trunk/framework/testtools/dtd/test-suite.xsd URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/dtd/test-suite.xsd?rev=924378&r1=924377&r2=924378&view=diff ============================================================================== --- ofbiz/trunk/framework/testtools/dtd/test-suite.xsd (original) +++ ofbiz/trunk/framework/testtools/dtd/test-suite.xsd Wed Mar 17 17:28:01 2010 @@ -39,7 +39,7 @@ under the License. <xs:choice minOccurs="1" maxOccurs="unbounded"> <xs:element ref="test-case"/> <xs:element ref="test-group"/> - </xs:choice> + </xs:choice> <xs:attributeGroup ref="attlist.test-suite"/> </xs:complexType> </xs:element> Modified: ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/recorded/AjaxExample.html URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/recorded/AjaxExample.html?rev=924378&r1=924377&r2=924378&view=diff ============================================================================== --- ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/recorded/AjaxExample.html (original) +++ ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/recorded/AjaxExample.html Wed Mar 17 17:28:01 2010 @@ -30,124 +30,124 @@ <tr><td rowspan="1" colspan="3">AjaxExample</td></tr> </thead><tbody> <tr> - <td>open</td> - <td>/example/control/updateExampleFeature</td> - <td></td> + <td>open</td> + <td>/example/control/updateExampleFeature</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=Logout</td> - <td></td> + <td>clickAndWait</td> + <td>link=Logout</td> + <td></td> </tr> <tr> - <td>type</td> - <td>PASSWORD</td> - <td>ofbiz</td> + <td>type</td> + <td>PASSWORD</td> + <td>ofbiz</td> </tr> <tr> - <td>clickAndWait</td> - <td>//input[@value='Login']</td> - <td></td> + <td>clickAndWait</td> + <td>//input[@value='Login']</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=Ajax Examples</td> - <td></td> + <td>clickAndWait</td> + <td>link=Ajax Examples</td> + <td></td> </tr> <tr> - <td>type</td> - <td>exampleName</td> - <td>AJAX example name</td> + <td>type</td> + <td>exampleName</td> + <td>AJAX example name</td> </tr> <tr> - <td>type</td> - <td>description</td> - <td>AJAX description</td> + <td>type</td> + <td>description</td> + <td>AJAX description</td> </tr> <tr> - <td>type</td> - <td>longDescription</td> - <td>This is a long description</td> + <td>type</td> + <td>longDescription</td> + <td>This is a long description</td> </tr> <tr> - <td>type</td> - <td>comments</td> - <td>this is a comment</td> + <td>type</td> + <td>comments</td> + <td>this is a comment</td> </tr> <tr> - <td>type</td> - <td>exampleSize</td> - <td>10</td> + <td>type</td> + <td>exampleSize</td> + <td>10</td> </tr> <tr> - <td>click</td> - <td>//img[@alt='View Calendar']</td> - <td></td> + <td>click</td> + <td>//img[@alt='View Calendar']</td> + <td></td> </tr> <tr> - <td>click</td> - <td>//tr[5]/td[2]/div</td> - <td></td> + <td>click</td> + <td>//tr[5]/td[2]/div</td> + <td></td> </tr> <tr> - <td>click</td> - <td>link=OK</td> - <td></td> + <td>click</td> + <td>link=OK</td> + <td></td> </tr> <tr> - <td>click</td> - <td>//div[@id='_G266__body']/table/tbody/tr[9]/td[2]/a/img</td> - <td></td> + <td>click</td> + <td>//div[@id='_G266__body']/table/tbody/tr[9]/td[2]/a/img</td> + <td></td> </tr> <tr> - <td>click</td> - <td>link=Now</td> - <td></td> + <td>click</td> + <td>link=Now</td> + <td></td> </tr> <tr> - <td>click</td> - <td>link=OK</td> - <td></td> + <td>click</td> + <td>link=OK</td> + <td></td> </tr> <tr> - <td>select</td> - <td>anotherText</td> - <td>label=Explicit Option</td> + <td>select</td> + <td>anotherText</td> + <td>label=Explicit Option</td> </tr> <tr> - <td>click</td> - <td>submitButton</td> - <td></td> + <td>click</td> + <td>submitButton</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=10000</td> - <td></td> + <td>clickAndWait</td> + <td>link=10000</td> + <td></td> </tr> <tr> - <td>type</td> - <td>longDescription</td> - <td>This is a long description - this is a big update</td> + <td>type</td> + <td>longDescription</td> + <td>This is a long description - this is a big update</td> </tr> <tr> - <td>clickAndWait</td> - <td>submitButton</td> - <td></td> + <td>clickAndWait</td> + <td>submitButton</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=Ajax Examples</td> - <td></td> + <td>clickAndWait</td> + <td>link=Ajax Examples</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=10000</td> - <td></td> + <td>clickAndWait</td> + <td>link=10000</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=Printer Friendly</td> - <td></td> + <td>clickAndWait</td> + <td>link=Printer Friendly</td> + <td></td> </tr> </tbody></table> Modified: ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/recorded/NewExample.html URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/recorded/NewExample.html?rev=924378&r1=924377&r2=924378&view=diff ============================================================================== --- ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/recorded/NewExample.html (original) +++ ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/recorded/NewExample.html Wed Mar 17 17:28:01 2010 @@ -30,134 +30,134 @@ <tr><td rowspan="1" colspan="3">NewExample</td></tr> </thead><tbody> <tr> - <td>open</td> - <td>/example/control/FindExample?portalPageId=Example</td> - <td></td> + <td>open</td> + <td>/example/control/FindExample?portalPageId=Example</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=Logout</td> - <td></td> + <td>clickAndWait</td> + <td>link=Logout</td> + <td></td> </tr> <tr> - <td>type</td> - <td>PASSWORD</td> - <td>ofbiz</td> + <td>type</td> + <td>PASSWORD</td> + <td>ofbiz</td> </tr> <tr> - <td>clickAndWait</td> - <td>//input[@value='Login']</td> - <td></td> + <td>clickAndWait</td> + <td>//input[@value='Login']</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=New Example</td> - <td></td> + <td>clickAndWait</td> + <td>link=New Example</td> + <td></td> </tr> <tr> - <td>select</td> - <td>statusId</td> - <td>label=Defined</td> + <td>select</td> + <td>statusId</td> + <td>label=Defined</td> </tr> <tr> - <td>type</td> - <td>exampleName</td> - <td>New Example 1</td> + <td>type</td> + <td>exampleName</td> + <td>New Example 1</td> </tr> <tr> - <td>type</td> - <td>description</td> - <td>This is a description</td> + <td>type</td> + <td>description</td> + <td>This is a description</td> </tr> <tr> - <td>type</td> - <td>longDescription</td> - <td>Long description goes here</td> + <td>type</td> + <td>longDescription</td> + <td>Long description goes here</td> </tr> <tr> - <td>type</td> - <td>comments</td> - <td>comments go here</td> + <td>type</td> + <td>comments</td> + <td>comments go here</td> </tr> <tr> - <td>type</td> - <td>exampleSize</td> - <td>10</td> + <td>type</td> + <td>exampleSize</td> + <td>10</td> </tr> <tr> - <td>click</td> - <td>//img[@alt='View Calendar']</td> - <td></td> + <td>click</td> + <td>//img[@alt='View Calendar']</td> + <td></td> </tr> <tr> - <td>click</td> - <td>//tr[2]/td[5]/div</td> - <td></td> + <td>click</td> + <td>//tr[2]/td[5]/div</td> + <td></td> </tr> <tr> - <td>click</td> - <td>//tr[2]/td[5]/div</td> - <td></td> + <td>click</td> + <td>//tr[2]/td[5]/div</td> + <td></td> </tr> <tr> - <td>click</td> - <td>//div[@id='_G152__body']/table/tbody/tr[9]/td[2]/a/img</td> - <td></td> + <td>click</td> + <td>//div[@id='_G152__body']/table/tbody/tr[9]/td[2]/a/img</td> + <td></td> </tr> <tr> - <td>click</td> - <td>//tr[3]/td[2]/div</td> - <td></td> + <td>click</td> + <td>//tr[3]/td[2]/div</td> + <td></td> </tr> <tr> - <td>click</td> - <td>//tr[3]/td[2]/div</td> - <td></td> + <td>click</td> + <td>//tr[3]/td[2]/div</td> + <td></td> </tr> <tr> - <td>click</td> - <td>link=OK</td> - <td></td> + <td>click</td> + <td>link=OK</td> + <td></td> </tr> <tr> - <td>select</td> - <td>anotherText</td> - <td>label=Good</td> + <td>select</td> + <td>anotherText</td> + <td>label=Good</td> </tr> <tr> - <td>clickAndWait</td> - <td>submitButton</td> - <td></td> + <td>clickAndWait</td> + <td>submitButton</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=Items</td> - <td></td> + <td>clickAndWait</td> + <td>link=Items</td> + <td></td> </tr> <tr> - <td>type</td> - <td>description</td> - <td>Item 1</td> + <td>type</td> + <td>description</td> + <td>Item 1</td> </tr> <tr> - <td>type</td> - <td>amount</td> - <td>100</td> + <td>type</td> + <td>amount</td> + <td>100</td> </tr> <tr> - <td>select</td> - <td>amountUomId</td> - <td>label=Weight: Stone (st)</td> + <td>select</td> + <td>amountUomId</td> + <td>label=Weight: Stone (st)</td> </tr> <tr> - <td>clickAndWait</td> - <td>submitButton</td> - <td></td> + <td>clickAndWait</td> + <td>submitButton</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=New Example</td> - <td></td> + <td>clickAndWait</td> + <td>link=New Example</td> + <td></td> </tr> </tbody></table> Modified: ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/recorded/NewFeature.html URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/recorded/NewFeature.html?rev=924378&r1=924377&r2=924378&view=diff ============================================================================== --- ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/recorded/NewFeature.html (original) +++ ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/recorded/NewFeature.html Wed Mar 17 17:28:01 2010 @@ -30,89 +30,89 @@ <tr><td rowspan="1" colspan="3">NewFeature</td></tr> </thead><tbody> <tr> - <td>open</td> - <td>/example/control/EditExample</td> - <td></td> + <td>open</td> + <td>/example/control/EditExample</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=Logout</td> - <td></td> + <td>clickAndWait</td> + <td>link=Logout</td> + <td></td> </tr> <tr> - <td>type</td> - <td>PASSWORD</td> - <td>ofbiz</td> + <td>type</td> + <td>PASSWORD</td> + <td>ofbiz</td> </tr> <tr> - <td>clickAndWait</td> - <td>//input[@value='Login']</td> - <td></td> + <td>clickAndWait</td> + <td>//input[@value='Login']</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=Feature</td> - <td></td> + <td>clickAndWait</td> + <td>link=Feature</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>searchButton</td> - <td></td> + <td>clickAndWait</td> + <td>searchButton</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=New Example Feature</td> - <td></td> + <td>clickAndWait</td> + <td>link=New Example Feature</td> + <td></td> </tr> <tr> - <td>type</td> - <td>description</td> - <td>New Feature 1000</td> + <td>type</td> + <td>description</td> + <td>New Feature 1000</td> </tr> <tr> - <td>clickAndWait</td> - <td>submitButton</td> - <td></td> + <td>clickAndWait</td> + <td>submitButton</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=Examples</td> - <td></td> + <td>clickAndWait</td> + <td>link=Examples</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>//a[contains(@href, '/example/control/EditExampleFeature?exampleFeatureId=10000')]</td> - <td></td> + <td>clickAndWait</td> + <td>//a[contains(@href, '/example/control/EditExampleFeature?exampleFeatureId=10000')]</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=Feature</td> - <td></td> + <td>clickAndWait</td> + <td>link=Feature</td> + <td></td> </tr> <tr> - <td>type</td> - <td>description</td> - <td>New Feature</td> + <td>type</td> + <td>description</td> + <td>New Feature</td> </tr> <tr> - <td>clickAndWait</td> - <td>searchButton</td> - <td></td> + <td>clickAndWait</td> + <td>searchButton</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=10000</td> - <td></td> + <td>clickAndWait</td> + <td>link=10000</td> + <td></td> </tr> <tr> - <td>type</td> - <td>description</td> - <td>New Feature 1000 - updated</td> + <td>type</td> + <td>description</td> + <td>New Feature 1000 - updated</td> </tr> <tr> - <td>clickAndWait</td> - <td>submitButton</td> - <td></td> + <td>clickAndWait</td> + <td>submitButton</td> + <td></td> </tr> </tbody></table> Modified: ofbiz/trunk/framework/webtools/data/helpdata/HELP_WEBTOOLS.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/data/helpdata/HELP_WEBTOOLS.xml?rev=924378&r1=924377&r2=924378&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/data/helpdata/HELP_WEBTOOLS.xml (original) +++ ofbiz/trunk/framework/webtools/data/helpdata/HELP_WEBTOOLS.xml Wed Mar 17 17:28:01 2010 @@ -14,10 +14,10 @@ the specific language governing permissi License. --> <section xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - version="5.0" xmlns:xl="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" - xsi:schemaLocation="http://docbook.org/ns/docbook ../../../content/dtd/docbook.xsd" - xmlns="http://docbook.org/ns/docbook"> - <title>The Webtools Introduction.</title> + version="5.0" xmlns:xl="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" + xsi:schemaLocation="http://docbook.org/ns/docbook ../../../content/dtd/docbook.xsd" + xmlns="http://docbook.org/ns/docbook"> + <title>The Webtools Introduction.</title> <xi:include href="HELP_WEBTOOLS_main.xml" /> <xi:include href="../../../testtools/data/helpdata/HELP_WEBTOOLS_selenium.xml" /> </section> \ No newline at end of file Modified: ofbiz/trunk/framework/webtools/webapp/webtools/entity/EditEntity.jsp URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/entity/EditEntity.jsp?rev=924378&r1=924377&r2=924378&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/entity/EditEntity.jsp (original) +++ ofbiz/trunk/framework/webtools/webapp/webtools/entity/EditEntity.jsp Wed Mar 17 17:28:01 2010 @@ -411,20 +411,20 @@ A.listtext:hover {color:red;} <!ELEMENT view-entity ( description?, member-entity+, alias+, view-link+, relation* )> <!ELEMENT member-entity EMPTY> <!ATTLIST member-entity - entity-alias CDATA #REQUIRED - entity-name CDATA #REQUIRED > + entity-alias CDATA #REQUIRED + entity-name CDATA #REQUIRED > <!ELEMENT alias EMPTY> <!ATTLIST alias - entity-alias CDATA #REQUIRED - name CDATA #REQUIRED - field CDATA #IMPLIED - prim-key CDATA #IMPLIED - group-by ( true | false ) "false" - function ( min | max | sum | avg | count | count-distinct | upper | lower ) #IMPLIED> + entity-alias CDATA #REQUIRED + name CDATA #REQUIRED + field CDATA #IMPLIED + prim-key CDATA #IMPLIED + group-by ( true | false ) "false" + function ( min | max | sum | avg | count | count-distinct | upper | lower ) #IMPLIED> <!ELEMENT view-link ( key-map+ )> <!ATTLIST view-link - entity-alias CDATA #REQUIRED - rel-entity-alias CDATA #REQUIRED > + entity-alias CDATA #REQUIRED + rel-entity-alias CDATA #REQUIRED > --%> <%}%> Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java?rev=924378&r1=924377&r2=924378&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java Wed Mar 17 17:28:01 2010 @@ -2075,11 +2075,11 @@ public class ModelFormField { return alsoHidden; } public String getType(){ - return this.type; + return this.type; } public String getImageLocation(){ - return this.imageLocation; + return this.imageLocation; } public String getDescription(Map<String, Object> context) { Modified: ofbiz/trunk/specialpurpose/build.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/build.xml?rev=924378&r1=924377&r2=924378&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/build.xml (original) +++ ofbiz/trunk/specialpurpose/build.xml Wed Mar 17 17:28:01 2010 @@ -29,7 +29,7 @@ oagis/build.xml, googlebase/build.xml, ebay/build.xml, - ebaystore/build.xml, + ebaystore/build.xml, projectmgr/build.xml, ldap/build.xml, crowd/build.xml, Modified: ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_AdvanceSearch.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_AdvanceSearch.xml?rev=924378&r1=924377&r2=924378&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_AdvanceSearch.xml (original) +++ ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_AdvanceSearch.xml Wed Mar 17 17:28:01 2010 @@ -25,10 +25,10 @@ This screen allows the user to find prod <title>How to search products?</title> <orderedlist> <listitem><para>select products store you want to export products example : OFBiz E-Commerce [9000]</para></listitem> - <listitem><para>select catalog 'eBay Catalog'</para></listitem> - <listitem><para>select category in example you can use 'Ebay E-Commerce ... [eBay_ECom_Category]'</para></listitem> - <listitem><para>select the other condition if you want</para></listitem> - <listitem><para>Press 'Find' button at the below of page to find products</para></listitem> + <listitem><para>select catalog 'eBay Catalog'</para></listitem> + <listitem><para>select category in example you can use 'Ebay E-Commerce ... [eBay_ECom_Category]'</para></listitem> + <listitem><para>select the other condition if you want</para></listitem> + <listitem><para>Press 'Find' button at the below of page to find products</para></listitem> </orderedlist> </section> </section> Modified: ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_EditEbayConfiguration.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_EditEbayConfiguration.xml?rev=924378&r1=924377&r2=924378&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_EditEbayConfiguration.xml (original) +++ ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_EditEbayConfiguration.xml Wed Mar 17 17:28:01 2010 @@ -29,17 +29,17 @@ This screen allows the user to create a Example product store is 'OFBiz E-Commerce Store [9000]') </para></listitem> <listitem><para>Enter 'Dev Id' (ex:f3586481-93c7-4aaf-ab87-d383d56b71b1)</para></listitem> - <listitem><para>Enter 'App Id' (ex:antwebc0f-9bf9-4829-998b-e5e8fb773ac)</para></listitem> - <listitem><para>Enter 'Cert Id' (ex:7f363bc0-11d6-489a-a54d-4a44de82f790)</para></listitem> - <listitem><para>Enter 'Token' (# token key generated from ebay account ex:AgAAAA**AQAAAA**aAAAAA**Ccn7Sg.....)</para></listitem> - <listitem><para>Enter 'Compatibility Level' (ex:635)</para></listitem> - <listitem><para>Enter 'Site Id' (ex:0=US ,15=AU)</para></listitem> - <listitem><para>Enter 'Xml Gateway Uri' (# sandbox + <listitem><para>Enter 'App Id' (ex:antwebc0f-9bf9-4829-998b-e5e8fb773ac)</para></listitem> + <listitem><para>Enter 'Cert Id' (ex:7f363bc0-11d6-489a-a54d-4a44de82f790)</para></listitem> + <listitem><para>Enter 'Token' (# token key generated from ebay account ex:AgAAAA**AQAAAA**aAAAAA**Ccn7Sg.....)</para></listitem> + <listitem><para>Enter 'Compatibility Level' (ex:635)</para></listitem> + <listitem><para>Enter 'Site Id' (ex:0=US ,15=AU)</para></listitem> + <listitem><para>Enter 'Xml Gateway Uri' (# sandbox -eBayExport.xmlGatewayUri=https://api.sandbox.ebay.com/ws/api.dll # production -eBayExport.xmlGatewayUri=https://api.ebay.com/ws/api.dll)</para></listitem> - <listitem><para>Enter 'Custom XML' </para></listitem> - <listitem><para>Enter 'Web Site' (ebay)</para></listitem> + <listitem><para>Enter 'Custom XML' </para></listitem> + <listitem><para>Enter 'Web Site' (ebay)</para></listitem> <listitem><para>Press the 'Update' button to create configurations.</para></listitem> </orderedlist> Modified: ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_Features.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_Features.xml?rev=924378&r1=924377&r2=924378&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_Features.xml (original) +++ ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_Features.xml Wed Mar 17 17:28:01 2010 @@ -17,25 +17,25 @@ License. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://docbook.org/ns/docbook ../../../../applications/content/dtd/docbook.xsd"> <title>Ebay Features</title> - <orderedlist> - <listitem> - <para>Ebay configurations for ofbiz intregrate with ebay.</para> - </listitem> - <listitem> - <para>Setup shipping methods.</para> - </listitem> - <listitem> - <para>Export products into ebay categories.</para> - </listitem> - <listitem> - <para>Export products into ebay categories.</para> - </listitem> - <listitem> - <para>Import transactions from ebay</para> - </listitem> + <orderedlist> + <listitem> + <para>Ebay configurations for ofbiz intregrate with ebay.</para> + </listitem> + <listitem> + <para>Setup shipping methods.</para> + </listitem> + <listitem> + <para>Export products into ebay categories.</para> + </listitem> + <listitem> + <para>Export products into ebay categories.</para> + </listitem> + <listitem> + <para>Import transactions from ebay</para> + </listitem> <listitem> - <para>Import orders from ebay</para> - </listitem> - </orderedlist> + <para>Import orders from ebay</para> + </listitem> + </orderedlist> </section> Modified: ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_FindConfigurations.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_FindConfigurations.xml?rev=924378&r1=924377&r2=924378&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_FindConfigurations.xml (original) +++ ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_FindConfigurations.xml Wed Mar 17 17:28:01 2010 @@ -21,34 +21,34 @@ <para> The default screen is for the Ebay Configurations tab is 'Find Ebay Configurations'. It is used to locate existing configurations that have been created automatically by the system or manually by the user. It can also be used to create a new configurations or edit to integration between OFBiz and eBay. </para> - <section> + <section> <title>How to find Ebay configurations?</title> <orderedlist> <listitem><para> - Select 'product store' you want to see configuration. - (Example product store is 'OFBiz E-Commerce Store [9000]') - </para></listitem> + Select 'product store' you want to see configuration. + (Example product store is 'OFBiz E-Commerce Store [9000]') + </para></listitem> <listitem><para> - Select 'web site' if known. - </para></listitem> - <listitem><para>Press the 'Search' button to view configurations.</para></listitem> - <listitem><para>Select 'Any' then Press the 'Search' button to view all configurations.</para></listitem> - </orderedlist> + Select 'web site' if known. + </para></listitem> + <listitem><para>Press the 'Search' button to view configurations.</para></listitem> + <listitem><para>Select 'Any' then Press the 'Search' button to view all configurations.</para></listitem> + </orderedlist> </section> <section> <title>Edit Ebay configurations.</title> <orderedlist> <listitem><para> - Press 'Edit' button at product store you want to edit configuration.System will show screen for edit configuration data. - </para></listitem> - </orderedlist> + Press 'Edit' button at product store you want to edit configuration.System will show screen for edit configuration data. + </para></listitem> + </orderedlist> </section> <section> <title>Delete Ebay configurations.</title> <orderedlist> <listitem><para> - Press 'Delete' button at product store you want to delete configuration. - </para></listitem> - </orderedlist> + Press 'Delete' button at product store you want to delete configuration. + </para></listitem> + </orderedlist> </section> </section> Modified: ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_ManageOrdersFromEbay.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_ManageOrdersFromEbay.xml?rev=924378&r1=924377&r2=924378&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_ManageOrdersFromEbay.xml (original) +++ ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_ManageOrdersFromEbay.xml Wed Mar 17 17:28:01 2010 @@ -25,9 +25,9 @@ This screen allows the user to find orde <title>Section 'Search Single Transactions From eBay'.(use for select conditions to search results)</title> <orderedlist> <listitem><para>select product store ex: use 'OFBiz E-Commerce Store' because example ebay catalog link with this store.</para></listitem> - <listitem><para>enter begin time in field 'From Date Time' </para></listitem> - <listitem><para>enter end time in field 'Thru Date Time' </para></listitem> - <listitem><para>Press 'Search Single Transactions From eBay' button then system will show results from ebay site. </para></listitem> + <listitem><para>enter begin time in field 'From Date Time' </para></listitem> + <listitem><para>enter end time in field 'Thru Date Time' </para></listitem> + <listitem><para>Press 'Search Single Transactions From eBay' button then system will show results from ebay site. </para></listitem> </orderedlist> </section> <section> @@ -40,8 +40,8 @@ This screen allows the user to find orde <title>How to import single transactions from eBay?</title> <orderedlist> <listitem><para></para></listitem> - <listitem><para>Click checkbox at rows you want to import transaction in the 'Import Orders From eBay' section</para></listitem> - <listitem><para>Press 'Import Single Transactions' button then system will return the message on the screen. </para></listitem> + <listitem><para>Click checkbox at rows you want to import transaction in the 'Import Orders From eBay' section</para></listitem> + <listitem><para>Press 'Import Single Transactions' button then system will return the message on the screen. </para></listitem> </orderedlist> </section> </section> Modified: ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_ProductsExportToEbay.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_ProductsExportToEbay.xml?rev=924378&r1=924377&r2=924378&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_ProductsExportToEbay.xml (original) +++ ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_ProductsExportToEbay.xml Wed Mar 17 17:28:01 2010 @@ -21,22 +21,22 @@ <para> This screen allows the user to setup properties of products for the start auction on ebay, And allows the user to export product to the ebay site. On the 'Export Products to eBay' section have many fields to use for start auction listing(products) on the ebay site. </para> - <section> - <title>Fields Description : </title> - <orderedlist> - <listitem><para>eBay Category : Ofbiz retrieve this field from ebay categories and threre are several levels. You may need to select several time to get your categories for example : Your product is in "Drawing" category but the category is lower level of "Art" and ".......". So you need to select "Art" first and .... and "Drawing" to get the category. </para></listitem> - <listitem><para>Country : use for select country you want to show the listing on the ebay site.</para></listitem> - <listitem><para>Location : for located item location. </para></listitem> - <listitem><para>Listing Duration is a duration for auction and show the listing on ebay. </para></listitem> - <listitem><para>Start Price is a price for start auction (note : if you product have a minimum price(* Purpose is 'eBay Auction') don't need to set this field, the system will auto use the minimum price for start auctions. )</para></listitem> - <listitem><para>Quantity : Quantity of product</para></listitem> - <listitem><para>Website : </para></listitem> - <listitem><para>Web Site Url :</para></listitem> - <listitem><para>Payment Methods Accepted : This is Type of payment you want to use on the ebay.</para></listitem> - <listitem><para>PayPal email : We need it when you select payment by paypal.</para></listitem> - <listitem><para>Custom XML : It was auto generate from ebay configurations, it use for ebay know about currency, shipping method and other informations for shipping with this listing.</para></listitem> - </orderedlist> - </section> + <section> + <title>Fields Description : </title> + <orderedlist> + <listitem><para>eBay Category : Ofbiz retrieve this field from ebay categories and threre are several levels. You may need to select several time to get your categories for example : Your product is in "Drawing" category but the category is lower level of "Art" and ".......". So you need to select "Art" first and .... and "Drawing" to get the category. </para></listitem> + <listitem><para>Country : use for select country you want to show the listing on the ebay site.</para></listitem> + <listitem><para>Location : for located item location. </para></listitem> + <listitem><para>Listing Duration is a duration for auction and show the listing on ebay. </para></listitem> + <listitem><para>Start Price is a price for start auction (note : if you product have a minimum price(* Purpose is 'eBay Auction') don't need to set this field, the system will auto use the minimum price for start auctions. )</para></listitem> + <listitem><para>Quantity : Quantity of product</para></listitem> + <listitem><para>Website : </para></listitem> + <listitem><para>Web Site Url :</para></listitem> + <listitem><para>Payment Methods Accepted : This is Type of payment you want to use on the ebay.</para></listitem> + <listitem><para>PayPal email : We need it when you select payment by paypal.</para></listitem> + <listitem><para>Custom XML : It was auto generate from ebay configurations, it use for ebay know about currency, shipping method and other informations for shipping with this listing.</para></listitem> + </orderedlist> + </section> <section> <title>How to set export products?</title> <orderedlist> Modified: ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_ShippingMethods.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_ShippingMethods.xml?rev=924378&r1=924377&r2=924378&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_ShippingMethods.xml (original) +++ ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_ShippingMethods.xml Wed Mar 17 17:28:01 2010 @@ -25,13 +25,13 @@ This screen allows the user to add shipp <title>How to add shipping methods?</title> <orderedlist> <listitem><para>Enter 'Shipment Method Name ' (ex:'LocalDelivery')</para></listitem> - <listitem><para>Select 'product store' (ex:'OFBiz E-Commerce Store [9000]')</para></listitem> - <listitem><para>Enter 'Amount' </para></listitem> - <listitem><para>Enter 'Additional Amount' (if you want )</para></listitem> - <listitem><para>Enter 'Additional Percent' (if you want )</para></listitem> - <listitem><para>Enter 'Method Type Enum Id' (ex:Flat Rate Shipping)</para></listitem> - <listitem><para>Enter 'Carrier Party Id' select from lookup (Default is UPS)</para></listitem> - <listitem><para>select 'Shipment Method Type Id' </para></listitem> + <listitem><para>Select 'product store' (ex:'OFBiz E-Commerce Store [9000]')</para></listitem> + <listitem><para>Enter 'Amount' </para></listitem> + <listitem><para>Enter 'Additional Amount' (if you want )</para></listitem> + <listitem><para>Enter 'Additional Percent' (if you want )</para></listitem> + <listitem><para>Enter 'Method Type Enum Id' (ex:Flat Rate Shipping)</para></listitem> + <listitem><para>Enter 'Carrier Party Id' select from lookup (Default is UPS)</para></listitem> + <listitem><para>select 'Shipment Method Type Id' </para></listitem> <listitem><para>Press the 'Add' button to add shipping method.</para></listitem> </orderedlist> Modified: ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_eBayOrders.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_eBayOrders.xml?rev=924378&r1=924377&r2=924378&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_eBayOrders.xml (original) +++ ofbiz/trunk/specialpurpose/ebay/data/helpdata/HELP_EBAY_eBayOrders.xml Wed Mar 17 17:28:01 2010 @@ -25,9 +25,9 @@ This screen allows the user to find and <title>Section 'Search Options'.</title> <orderedlist> <listitem><para>select product store ex: use 'OFBiz E-Commerce Store' because example ebay catalog link with this store.</para></listitem> - <listitem><para>enter begin time in field 'From Date Time' </para></listitem> - <listitem><para>enter end time in field 'Thru Date Time' </para></listitem> - <listitem><para>Press 'Find' button then system will show results from ebay site. </para></listitem> + <listitem><para>enter begin time in field 'From Date Time' </para></listitem> + <listitem><para>enter end time in field 'Thru Date Time' </para></listitem> + <listitem><para>Press 'Find' button then system will show results from ebay site. </para></listitem> </orderedlist> </section> <section> @@ -40,8 +40,8 @@ This screen allows the user to find and <title>How to import order from eBay?</title> <orderedlist> <listitem><para></para></listitem> - <listitem><para>Click checkbox at rows you want to import orders in the 'Search Result' section</para></listitem> - <listitem><para>Press 'Import Orders From ebay' button then system will return the message on the screen. and you can check orders list in the 'Order' module.</para></listitem> + <listitem><para>Click checkbox at rows you want to import orders in the 'Search Result' section</para></listitem> + <listitem><para>Press 'Import Orders From ebay' button then system will return the message on the screen. and you can check orders list in the 'Order' module.</para></listitem> </orderedlist> </section> </section> |
Free forum by Nabble | Edit this page |