class ToolsStatusVersionListRow(ItemListItem):
    def __init__(self, owner, locatordict={},row_number=0):

        super(ToolsStatusVersionListRow,self)\
            .__init__(owner,locatordict,row_number)

        # load hub's classes
        ToolsStatusVersionListRow_Locators = \
            self.load_class('ToolsStatusVersionListRow_Locators')

        # update this object's locator
        self.locators.update(ToolsStatusVersionListRow_Locators.locators)

        # update the locators with those from the owner
        self.update_locators_from_owner()

        # setup page object's components
        self.version      = TextReadOnly(self,{'base':'version'})
        self.released     = TextReadOnly(self,{'base':'released'})
        self.subversion   = TextReadOnly(self,{'base':'subversion'})
        self.published    = TextReadOnly(self,{'base':'published'})
        self.edit         = Link(self,{'base':'edit'})

        # update the component's locators with this objects overrides
        self._updateLocators()


    def value(self):
        """return a dictionary of properties for this row"""

        published_classes = self.published.get_attribute('class')

        published = None
        if 'toolunpublished' in published_classes:
            published = False
        elif 'toolpublished' in published_classes:
            published = True

        properties = {
            'version'    : self.version.value,
            'released'   : self.released.value,
            'subversion' : self.subversion.value,
            'published'  : published,
        }

        return properties


    def goto_edit(self):

        self.edit.click()