def manage_afterAdd(self, item, container):
        DefaultConfiguration.install(self)

        factory = pipeline.getPipeline( self.pipeline_id )
        try:
            factory.finishPolicyConstruction( self )
        except:
            if not DefaultConfiguration.DEPLOYMENT_DEBUG:
                raise
            import traceback, sys, pdb
            traceback.print_exc()
            pdb.post_mortem(sys.exc_info()[-1])
    def clearState(self, RESPONSE=None):
        """
        clear all persistent state from the policy, not including
        configuration.
        """
        self.getDeploymentHistory().clear()
        self.getDeploymentURIs().clear()

        factory = pipeline.getPipeline( self.pipeline_id )
        factory.clearState( self )
        
        if RESPONSE is not None:
            RESPONSE.redirect('manage_workspace')
 def manage_beforeDelete(self, *args):
     factory = pipeline.getPipeline( self.pipeline_id )
     factory.beginPolicyRemoval( self )
 def getPipeline(self):
     factory = pipeline.getPipeline( self.pipeline_id )
     deployment_pipeline = factory()
     return deployment_pipeline
    def manage_afterAdd(self, item, container):
        DefaultConfiguration.install(self)

        factory = pipeline.getPipeline( self.pipeline_id )
        factory.finishPolicyConstruction( self )