com.atlassian.jira.webtest.framework.core.locator.mapper
Interface LocatorMapping

All Known Implementing Classes:
AbstractMapping

public interface LocatorMapping

Represents single type-based mapping between two locators. It defines parent and child locator types, and a method to combine them into a new locator.

Since:
v4.3

Method Summary
 LocatorType childType()
          Child locator type of this mapping.
 LocatorData combine(LocatorData parent, LocatorData child)
          Apply this mapping to a given locator data pair.
 LocatorType parentType()
          Parent locator type of this mapping
 boolean supportsChild(LocatorData child)
          Checks if this mapping supports locator represented child.
 boolean supportsParent(LocatorData parent)
          Checks if this mapping supports locator represented parent.
 

Method Detail

parentType

LocatorType parentType()
Parent locator type of this mapping

Returns:
parent locator type

childType

LocatorType childType()
Child locator type of this mapping.

Returns:
child locator type

supportsParent

boolean supportsParent(LocatorData parent)
Checks if this mapping supports locator represented parent.

Parameters:
parent - parent data to check
Returns:
true, if parent is supported, false otherwise

supportsChild

boolean supportsChild(LocatorData child)
Checks if this mapping supports locator represented child.

Parameters:
child - child data to check
Returns:
true, if child is supported, false otherwise

combine

LocatorData combine(LocatorData parent,
                    LocatorData child)
Apply this mapping to a given locator data pair.

Parameters:
parent - parent locator data
child - child locator data
Returns:
resulting locator data
Throws:
IllegalArgumentException - if parent, or child is not supported by this mapping
See Also:
supportsParent(com.atlassian.jira.webtest.framework.core.locator.LocatorData), supportsChild(com.atlassian.jira.webtest.framework.core.locator.LocatorData)


Copyright © 2002-2013 Atlassian. All Rights Reserved.