Esempio n. 1
0
    def execute(my):
        from pyasm.flash.widget import FlashLayerCheckboxWdg    
        web = WebContainer.get_web()
        cam_search_key = web.get_form_value( FlashRenderTableElementWdg.RENDER_CAM)
        # FIXME: why is this called "context"
        context_name = web.get_form_value( FlashRenderTableElementWdg.CONTEXT_NAME)

        # submit all the selected sobjects
        context = "publish"
        for search_key in my.search_keys:
            sobject = Search.get_by_search_key(search_key)

            snapshot = Snapshot.get_latest_by_sobject(sobject, context)
            if not snapshot:
                raise TacticException("No checkins of context '%s' for '%s' exists" % (context, sobject.get_code() ) )
            render = FlashGenerateExecuteXml(sobject.get_code())
            render.set_snapshot_code(snapshot.get_code())
            
            #render.execute()
           
            # store this in the appropriate queue
            dispatch = TacticDispatcher()
            dispatch.set_description("Flash Render: %s" % sobject.get_code())
            dispatch.execute_slave(render)
            
        my.description = "Submitted: %s" % ", ".join(my.search_keys)
Esempio n. 2
0
    def execute(my):
        from pyasm.flash.widget import FlashLayerCheckboxWdg

        web = WebContainer.get_web()
        cam_search_key = web.get_form_value(FlashRenderTableElementWdg.RENDER_CAM)
        # FIXME: why is this called "context"
        context_name = web.get_form_value(FlashRenderTableElementWdg.CONTEXT_NAME)

        # submit all the selected sobjects
        context = "publish"
        for search_key in my.search_keys:
            sobject = Search.get_by_search_key(search_key)

            snapshot = Snapshot.get_latest_by_sobject(sobject, context)
            if not snapshot:
                raise TacticException("No checkins of context '%s' for '%s' exists" % (context, sobject.get_code()))
            render = FlashGenerateExecuteXml(sobject.get_code())
            render.set_snapshot_code(snapshot.get_code())

            # render.execute()

            # store this in the appropriate queue
            dispatch = TacticDispatcher()
            dispatch.set_description("Flash Render: %s" % sobject.get_code())
            dispatch.execute_slave(render)

        my.description = "Submitted: %s" % ", ".join(my.search_keys)
Esempio n. 3
0
    def execute(my):
        from pyasm.flash.widget import FlashLayerCheckboxWdg    
        web = WebContainer.get_web()
        cam_search_key = web.get_form_value( FlashRenderTableElementWdg.RENDER_CAM)
        context_name = web.get_form_value( FlashRenderTableElementWdg.CONTEXT_NAME)
        
        sobject = Search.get_by_search_key(my.search_keys[0])
        
        render = FlashLayerRenderCmd()
        render.set_search_keys(my.search_keys)
        render.set_cam_search_key(cam_search_key)
        render.set_context_name(context_name)
        render.set_project( SearchType.get_project() )
        
        #render.execute()
        
        dispatch = TacticDispatcher()
        dispatch.set_description("Flash Render: %s" % sobject.get_code())
        dispatch.execute_slave(render)
        
	my.description = "Submitted: %s" % ", ".join(my.search_keys)
Esempio n. 4
0
    def execute(my):
        from pyasm.flash.widget import FlashLayerCheckboxWdg

        web = WebContainer.get_web()
        cam_search_key = web.get_form_value(FlashRenderTableElementWdg.RENDER_CAM)
        context_name = web.get_form_value(FlashRenderTableElementWdg.CONTEXT_NAME)

        sobject = Search.get_by_search_key(my.search_keys[0])

        render = FlashLayerRenderCmd()
        render.set_search_keys(my.search_keys)
        render.set_cam_search_key(cam_search_key)
        render.set_context_name(context_name)
        render.set_project(SearchType.get_project())

        # render.execute()

        dispatch = TacticDispatcher()
        dispatch.set_description("Flash Render: %s" % sobject.get_code())
        dispatch.execute_slave(render)

        my.description = "Submitted: %s" % ", ".join(my.search_keys)