def update_goal_association(self, assoc, environment_name, goal_name, subgoal_name, pathValues=[]): if (assoc.theGoal == assoc.theSubGoal): raise CairisHTTPError(status_code=http.client.BAD_REQUEST, status="Self-refinement error", message='Cannot self-refine ' + assoc.theGoal) old_assoc = self.get_goal_association(environment_name, goal_name, subgoal_name, False) assocId = old_assoc.theId assocParams = GoalAssociationParameters( envName=assoc.theEnvironmentName, goalName=assoc.theGoal, goalDimName=assoc.theGoalDimension, aType=assoc.theAssociationType, subGoalName=assoc.theSubGoal, subGoalDimName=assoc.theSubGoalDimension, alternativeId=assoc.theAlternativeId, rationale=assoc.theRationale) assocParams.setId(assocId) try: self.db_proxy.updateGoalAssociation(assocParams) except ARMException as ex: self.close() raise ARMHTTPError(ex)
def parameters(self): parameters = GoalAssociationParameters( self.theEnvironmentName, self.theGoal, self.theGoalDimension, self.theGoalAssociationType, self.theSubGoal, self.theSubGoalDimension, self.theAlternativeFlag, self.theRationale) parameters.setId(self.theGoalAssociationId) return parameters
def parameters(self): parameters = GoalAssociationParameters( self.theEnvironmentName, self.theGoal, self.theGoalDimension, self.theGoalAssociationType, self.theSubGoal, self.theSubGoalDimension, self.theAlternativeFlag, self.theRationale, ) parameters.setId(self.theGoalAssociationId) return parameters
def update_goal_association(self,assoc): old_assoc = self.get_goal_association(assoc.theEnvironmentName,assoc.theGoal,assoc.theSubGoal) id = old_assoc.theId assocParams = GoalAssociationParameters( envName=assoc.theEnvironmentName, goalName=assoc.theGoal, goalDimName=assoc.theGoalDimension, aType=assoc.theAssociationType, subGoalName=assoc.theSubGoal, subGoalDimName=assoc.theSubGoalDimension, alternativeId=assoc.theAlternativeId, rationale=assoc.theRationale) assocParams.setId(id) try: self.db_proxy.updateGoalAssociation(assocParams) except ARMException as ex: self.close() raise ARMHTTPError(ex)
def update_goal_association(self, assoc): old_assoc = self.get_goal_association(assoc.theEnvironmentName, assoc.theGoal, assoc.theSubGoal) id = old_assoc.theId assocParams = GoalAssociationParameters( envName=assoc.theEnvironmentName, goalName=assoc.theGoal, goalDimName=assoc.theGoalDimension, aType=assoc.theAssociationType, subGoalName=assoc.theSubGoal, subGoalDimName=assoc.theSubGoalDimension, alternativeId=assoc.theAlternativeId, rationale=assoc.theRationale) assocParams.setId(id) try: self.db_proxy.updateGoalAssociation(assocParams) except ARMException as ex: self.close() raise ARMHTTPError(ex)