|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bowstreet.webapp.util.WebAppUIHelper
com.bowstreet.builders.webapp.pageautomation.AutomationHelper
public class AutomationHelper
Helper class for any PageAutomation Builders and Coordinators
Nested Class Summary | |
---|---|
static class |
AutomationHelper.PropertySet
|
Nested classes/interfaces inherited from class com.bowstreet.webapp.util.WebAppUIHelper |
---|
com.bowstreet.webapp.util.WebAppUIHelper.AcceptAll, com.bowstreet.webapp.util.WebAppUIHelper.AcceptanceFilter, com.bowstreet.webapp.util.WebAppUIHelper.MethodSignatureComparator |
Field Summary | |
---|---|
static java.lang.String |
AUTOMATION_PROPERTY
|
Constructor Summary | |
---|---|
AutomationHelper(WebApp webApp)
|
Method Summary | |
---|---|
static boolean |
addTemplateInfoToElement(DataDefinitionElement element,
com.bowstreet.builders.webapp.pageautomation.content.HTMLTemplate htmlTemplate,
GenContext genContext)
Add the HTMLTemplate to the element and ensures that the element also has a WebAppPageGenerationAgent |
static boolean |
addTemplateInfoToElement(DataDefinitionElement element,
java.lang.String templateFile,
GenContext genContext)
Creates an HTMLTemplate and adds it to the element IMPORTANT! |
static void |
addTypeInfoToLeaf(Leaf leaf,
java.lang.String type,
boolean inferTypeValidationFromSchema)
Called by DataPageBuilder and other builders that create new Leaf nodes. |
static void |
assignNodes(Element element,
Page page,
java.lang.String name,
boolean labelOnly)
|
static java.lang.String |
buildSelector(Element element)
Builds an appropriate selector string, suitable for sticking into a new BuilderCall |
static java.lang.String |
checkIfElementHidden(Element element,
java.lang.String locator)
|
static java.lang.String |
checkReservedName(java.lang.String name,
BuilderCall builderCall)
Checks that name isn't one of the Java or HTML reserved names. |
Element |
findElement(java.lang.String locator)
Find a single element in the WebApp based on a locator string. |
java.util.Collection |
findElements(IXml locatorSet,
IXml typeSet,
java.util.Collection warnings)
Get a list of all the elements selected by the locatorSet and the typeSet. |
java.util.Collection |
findElementsFromStandardInputs(BuilderInputs builderInputs,
java.util.Collection warnings)
This is a utility method to be used by Builders that use the standard inputs of "FieldSelector, Fields, FieldTypes" |
static IXml |
findNamedElementInIXml(IXml ixml,
java.lang.String elementName,
java.util.Set blockedNames)
Find an element within this IXml with the "name" or "id" attribute equal to elementName |
static IXml |
findNamedElementOnPage(Page page,
java.lang.String elementName)
Find an element on this Page with the name attribute equal to elementName |
java.util.List |
getAllFields(boolean containersOnly)
Get all the Field Selector Strings. |
java.lang.String |
getPageName(java.lang.String locator)
Parses the page name from the provided locator string |
static PageReference |
getPageReference(Page page)
If there is already a PageReference for this page, returns it, or creates one as needed |
PageReference |
getPageReference(java.lang.String pageName)
get a PageReference associated with a page of this name in the webApp |
java.util.Collection |
getPageReferenceNames()
|
java.util.Collection |
getPageReferences()
|
java.util.Collection |
getTypeNames()
Get a list of all type names used in this model. |
java.util.Collection |
getTypeNames(boolean containersOnly)
Get a list of all type names used in this model. |
WebApp |
getWebApp()
|
static boolean |
hasPageReference(Page page)
Checks to see if there is already a pageReference for this page |
static boolean |
leafIsInTable(Leaf leaf)
|
static void |
matchElementsToPage(Element root)
|
static void |
matchElementsToPage(Element root,
AutomationHelper.PropertySet pSet)
|
static void |
matchElementsToPage(Element root,
AutomationHelper.PropertySet pSet,
boolean bFixup)
|
static void |
matchElementsToPage(Element root,
boolean bFixup)
|
static com.bowstreet.builders.webapp.pageautomation.content.HTMLTemplate |
openTemplateFile(java.lang.String templateFile,
GenContext genContext)
Opens an HTMLTemplate file, creating an instance of HTMLTemplate. |
void |
releasePageReferences()
release the memory associated with the PageAutomation tools |
BuilderCall |
setActiveBuilderCall(BuilderCall builderCall)
|
java.lang.String |
setActiveBuilderCall(java.lang.String builderCallID)
Set the current builderCallID in the WebApp, so that the GenElement references to any created objects will point to the correct builderCall. |
static void |
setDefaultLabel(Element element,
java.lang.String name)
|
Methods inherited from class com.bowstreet.webapp.util.WebAppUIHelper |
---|
addVariableReferences, checkVarRefExists, getActions, getActions, getActionsForActionList, getCategorizedActions, getClassInfoMemberSignatures, getClassInfoMethodSignatures, getInputReferences, getLinkedModelPublicMethods, getLinkedModelPublicPages, getLinkedObjectMethods, getLinkedObjectMethodSignatures, getMethodReferences, getMethods, getNamedElementsOnPage, getPages, getPages, getReferences, getReferences, getSchemaTypes, getVariables, getVariableTypes, setAcceptanceFilter |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String AUTOMATION_PROPERTY
Constructor Detail |
---|
public AutomationHelper(WebApp webApp)
Method Detail |
---|
public static boolean addTemplateInfoToElement(DataDefinitionElement element, com.bowstreet.builders.webapp.pageautomation.content.HTMLTemplate htmlTemplate, GenContext genContext)
element
- The element, null toleratedhtmlTemplate
- The HTMLTemplate, null toleratedgenContext
- The current GenContext, must be non-null
public static boolean addTemplateInfoToElement(DataDefinitionElement element, java.lang.String templateFile, GenContext genContext)
element
- The element, null toleratedtemplateFile
- name of an HTML Template file, null is toleratedgenContext
- The current GenContext, must be non-null
public static void addTypeInfoToLeaf(Leaf leaf, java.lang.String type, boolean inferTypeValidationFromSchema)
leaf
- new Leaf nodetype
- String the schema typeinferTypeValidationFromSchema
- true if we should infer Type Validation mathodspublic static void assignNodes(Element element, Page page, java.lang.String name, boolean labelOnly)
public static java.lang.String buildSelector(Element element)
element
- The PageAutomation Element you want to select
public static java.lang.String checkIfElementHidden(Element element, java.lang.String locator)
public static java.lang.String checkReservedName(java.lang.String name, BuilderCall builderCall)
name
- the name to check.builderCall
- If non-null, a warning will be added.
public Element findElement(java.lang.String locator)
locator
- String that would have been generated by a PageAutomationFieldChooserWidget
public java.util.Collection findElements(IXml locatorSet, IXml typeSet, java.util.Collection warnings)
locatorSet
- IXml of the type returned by standard BuilderInput FieldstypeSet
- IXml of the type returned by standard BuilderInput FieldTypeswarnings
- Any warnings will be put here, if this is non-null
public java.util.Collection findElementsFromStandardInputs(BuilderInputs builderInputs, java.util.Collection warnings)
builderInputs
- BuilderInputs passed into doBuilderCallwarnings
- Any warnings will be put here, if this is non-null
public static IXml findNamedElementInIXml(IXml ixml, java.lang.String elementName, java.util.Set blockedNames)
ixml
- IXml within which to searchelementName
- name to matchblockedNames
- TODO
public static IXml findNamedElementOnPage(Page page, java.lang.String elementName)
page
- WebApp PageelementName
- name to match
public java.util.List getAllFields(boolean containersOnly)
containersOnly
- if true, only selectors for containers will be added to list
public java.lang.String getPageName(java.lang.String locator)
locator
- String that would have been generated by a PageAutomationFieldChooserWidget
public static PageReference getPageReference(Page page)
page
- a WebApp page
public PageReference getPageReference(java.lang.String pageName)
pageName
-
public java.util.Collection getPageReferenceNames()
public java.util.Collection getPageReferences()
public java.util.Collection getTypeNames()
public java.util.Collection getTypeNames(boolean containersOnly)
public WebApp getWebApp()
public static boolean hasPageReference(Page page)
page
- a WebApp page
public static boolean leafIsInTable(Leaf leaf)
public static void matchElementsToPage(Element root)
public static void matchElementsToPage(Element root, AutomationHelper.PropertySet pSet)
public static void matchElementsToPage(Element root, AutomationHelper.PropertySet pSet, boolean bFixup)
public static void matchElementsToPage(Element root, boolean bFixup)
public static com.bowstreet.builders.webapp.pageautomation.content.HTMLTemplate openTemplateFile(java.lang.String templateFile, GenContext genContext)
templateFile
- name of an HTML Template file, null is toleratedgenContext
- the current GenContext, must be non-null
public void releasePageReferences()
public BuilderCall setActiveBuilderCall(BuilderCall builderCall)
public java.lang.String setActiveBuilderCall(java.lang.String builderCallID)
builderCallID
-
public static void setDefaultLabel(Element element, java.lang.String name)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |