Subversion Repository Public Repository

litesoft

Diff Revisions 949 vs 950 for /trunk/Java/GWT/Server/src/org/litesoft/testplan/AbstractTestPlanParserActionFactoryFormInput.java

Diff revisions: vs.
  @@ -1,27 +1,27 @@
1 - // This Source Code is in the Public Domain per: http://unlicense.org
2 - package org.litesoft.testplan;
3 -
4 - import org.litesoft.commonfoundation.typeutils.*;
5 - import org.litesoft.xml.*;
6 -
7 - public abstract class AbstractTestPlanParserActionFactoryFormInput implements TestPlanActionFactory {
8 - private String mTagName;
9 -
10 - public AbstractTestPlanParserActionFactoryFormInput( String pTagName ) {
11 - mTagName = pTagName;
12 - }
13 -
14 - @Override
15 - public TestPlanAction parse( PullParserProxy pParser ) {
16 - pParser.validateIsStartTag( mTagName );
17 - String zLabel = Strings.noEmpty( pParser.getAttributeValue( "label" ) );
18 - String zTooltip = Strings.noEmpty( pParser.getAttributeValue( "tooltip" ) );
19 - String zStrNth = Strings.noEmpty( pParser.getAttributeValue( "nth" ) );
20 - String zValue = Strings.noEmpty( pParser.getAttributeValue( "value" ) );
21 - pParser.validateNextIsEndTag( mTagName );
22 - Integer zNth = (zStrNth != null) ? new Integer( zStrNth ) : null;
23 - return createAction( zLabel, zTooltip, zNth, zValue );
24 - }
25 -
26 - abstract protected TestPlanAction createAction( String pLabel, String pTooltip, Integer pNth, String pInputText );
27 - }
1 + // This Source Code is in the Public Domain per: http://unlicense.org
2 + package org.litesoft.testplan;
3 +
4 + import org.litesoft.commonfoundation.base.*;
5 + import org.litesoft.xml.*;
6 +
7 + public abstract class AbstractTestPlanParserActionFactoryFormInput implements TestPlanActionFactory {
8 + private String mTagName;
9 +
10 + public AbstractTestPlanParserActionFactoryFormInput( String pTagName ) {
11 + mTagName = pTagName;
12 + }
13 +
14 + @Override
15 + public TestPlanAction parse( PullParserProxy pParser ) {
16 + pParser.validateIsStartTag( mTagName );
17 + String zLabel = ConstrainTo.significantOrNull( pParser.getAttributeValue( "label" ) );
18 + String zTooltip = ConstrainTo.significantOrNull( pParser.getAttributeValue( "tooltip" ) );
19 + String zStrNth = ConstrainTo.significantOrNull( pParser.getAttributeValue( "nth" ) );
20 + String zValue = ConstrainTo.significantOrNull( pParser.getAttributeValue( "value" ) );
21 + pParser.validateNextIsEndTag( mTagName );
22 + Integer zNth = (zStrNth != null) ? new Integer( zStrNth ) : null;
23 + return createAction( zLabel, zTooltip, zNth, zValue );
24 + }
25 +
26 + abstract protected TestPlanAction createAction( String pLabel, String pTooltip, Integer pNth, String pInputText );
27 + }