--- /dev/null
+/*****************************************************************************\r
+ * Copyright Igor Barma, Eric Brun, Alexandre Desoubeaux, Christian Martel,\r
+ * (2 décembre 2008)\r
+ * \r
+ * Ce logiciel est un programme informatique servant à l'évaluation des\r
+ * compétences.\r
+ * \r
+ * Ce logiciel est régi par la licence CeCILL soumise au droit français et\r
+ * respectant les principes de diffusion des logiciels libres. Vous pouvez\r
+ * utiliser, modifier et/ou redistribuer ce programme sous les conditions\r
+ * de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA\r
+ * sur le site "http://www.cecill.info".\r
+ * \r
+ * En contrepartie de l'accessibilité au code source et des droits de copie,\r
+ * de modification et de redistribution accordés par cette licence, il n'est\r
+ * offert aux utilisateurs qu'une garantie limitée. Pour les mêmes raisons,\r
+ * seule une responsabilité restreinte pèse sur l'auteur du programme, le\r
+ * titulaire des droits patrimoniaux et les concédants successifs.\r
+ * \r
+ * A cet égard l'attention de l'utilisateur est attirée sur les risques\r
+ * associés au chargement, à l'utilisation, à la modification et/ou au\r
+ * développement et à la reproduction du logiciel par l'utilisateur étant\r
+ * donné sa spécificité de logiciel libre, qui peut le rendre complexe à\r
+ * manipuler et qui le réserve donc à des développeurs et des professionnels\r
+ * avertis possédant des connaissances informatiques approfondies. Les\r
+ * utilisateurs sont donc invités à charger et tester l'adéquation du\r
+ * logiciel à leurs besoins dans des conditions permettant d'assurer la\r
+ * sécurité de leurs systèmes et ou de leurs données et, plus généralement,\r
+ * à l'utiliser et l'exploiter dans les mêmes conditions de sécurité.\r
+ * \r
+ * Le fait que vous puissiez accéder à cet en-tête signifie que vous avez\r
+ * pris connaissance de la licence CeCILL, et que vous en avez accepté les\r
+ * termes.\r
+ *******************************************************************************/\r
+package com.pentila.evalcomp.manager.interfacedef;\r
+\r
+import java.util.List;\r
+import java.util.Map;\r
+import java.util.Set;\r
+\r
+import org.springframework.transaction.annotation.Propagation;\r
+import org.springframework.transaction.annotation.Transactional;\r
+\r
+import com.pentila.evalcomp.domain.Entity;\r
+import com.pentila.evalcomp.domain.User;\r
+import com.pentila.evalcomp.domain.certification.MethodCertInstance;\r
+import com.pentila.evalcomp.domain.certification.ScenarioDefCert;\r
+import com.pentila.evalcomp.domain.definition.EvaluationObject;\r
+import com.pentila.evalcomp.domain.definition.MethodEval;\r
+import com.pentila.evalcomp.domain.definition.MethodValidation;\r
+import com.pentila.evalcomp.domain.definition.MethodValidationInstance;\r
+import com.pentila.evalcomp.domain.definition.ScenarioDefinitionValidation;\r
+import com.pentila.evalcomp.domain.plan.Plan;\r
+import com.pentila.evalcomp.domain.plan.PlanComponent;\r
+import com.pentila.evalcomp.domain.plan.PlanRef;\r
+import com.pentila.evalcomp.domain.plan.ScenarioDefinitionPlan;\r
+import com.pentila.evalcomp.domain.transit.TCompositeDataMap;\r
+\r
+// TODO: Auto-generated Javadoc\r
+/**\r
+ * The Interface IPlanBase.\r
+ */\r
+@Transactional(readOnly = true, propagation = Propagation.REQUIRED)\r
+public interface IPlanBase {\r
+\r
+ /**\r
+ * Adds the entities to plan component.\r
+ * \r
+ * @param planComponentId\r
+ * the plan component id\r
+ * @param entities\r
+ * the entities\r
+ * @param role\r
+ * the role\r
+ * \r
+ * @return the set< entity>\r
+ */\r
+ @Transactional(readOnly = false)\r
+ Set<Entity> addEntitiesToPlanComponent(Long planComponentId,\r
+ Set<Entity> entities, String role);\r
+\r
+ /**\r
+ * Adds the method evals to plan.\r
+ * \r
+ * @param planId\r
+ * the plan id\r
+ * @param sme\r
+ * the sme\r
+ * \r
+ * @return the set< method eval>\r
+ */\r
+ @Transactional(readOnly = false)\r
+ Set<MethodEval> addMethodEvalsToPlan(Long planId, Set<MethodEval> sme);\r
+\r
+ /**\r
+ * Adds the plan.\r
+ * \r
+ * @param plan\r
+ * the plan\r
+ * \r
+ * @return the plan\r
+ */\r
+ @Transactional(readOnly = false)\r
+ Plan addPlan(Plan plan);\r
+\r
+ /**\r
+ * Adds the plan ref to plan.\r
+ * \r
+ * @param planId\r
+ * the plan id\r
+ * @param pr\r
+ * the pr\r
+ * \r
+ * @return the plan ref\r
+ */\r
+ @Transactional(readOnly = false)\r
+ PlanRef addPlanRefToPlan(Long planId, PlanRef pr);\r
+\r
+ /**\r
+ * Adds the scenario definition plans to plan.\r
+ * \r
+ * @param planId\r
+ * the plan id\r
+ * @param ssdp\r
+ * the ssdp\r
+ * \r
+ * @return the set< scenario definition plan>\r
+ */\r
+ @Transactional(readOnly = false)\r
+ Set<ScenarioDefinitionPlan> addScenarioDefinitionPlansToPlan(Long planId,\r
+ Set<ScenarioDefinitionPlan> ssdp);\r
+\r
+ /**\r
+ * Delete plans.\r
+ * \r
+ * @param planId\r
+ * the plan id\r
+ * \r
+ * @return the set< long>\r
+ */\r
+ @Transactional(readOnly = false)\r
+ Set<Long> deletePlans(Set<Long> planId);\r
+\r
+ /**\r
+ * Edits the entity eo table.\r
+ * \r
+ * @param planComponentId\r
+ * the plan component id\r
+ * @param role\r
+ * the role\r
+ * @param table\r
+ * the table\r
+ * \r
+ * @return the set< entity>\r
+ */\r
+ @Transactional(readOnly = false)\r
+ Set<Entity> editEntityEOTable(Long planComponentId, String role,\r
+ Map<Long, Map<Long, Boolean>> table);\r
+\r
+ /**\r
+ * Edits the plan.\r
+ * \r
+ * @param plan\r
+ * the plan\r
+ * \r
+ * @return the plan\r
+ */\r
+ @Transactional(readOnly = false)\r
+ Plan editPlan(Plan plan);\r
+\r
+ /**\r
+ * Edits the plan ref.\r
+ * \r
+ * @param planref\r
+ * the planref\r
+ * \r
+ * @return the plan ref\r
+ */\r
+ @Transactional(readOnly = false)\r
+ PlanRef editPlanRef(PlanRef planref);\r
+\r
+ /**\r
+ * Gets the all plans.\r
+ * \r
+ * @return the all plans\r
+ */\r
+ Set<Plan> getAllPlans();\r
+\r
+ /**\r
+ * Gets the plan.\r
+ * \r
+ * @param planId\r
+ * the plan id\r
+ * \r
+ * @return the plan\r
+ */\r
+ Plan getPlan(Long planId);\r
+\r
+ /**\r
+ * Gets the user plans.\r
+ * \r
+ * @param login\r
+ * the login\r
+ * @param role\r
+ * the role\r
+ * \r
+ * @return the user plans\r
+ */\r
+ Set<Plan> getUserPlans(String login, String role);\r
+\r
+ /**\r
+ * Removes the entities from plan component.\r
+ * \r
+ * @param planComponentId\r
+ * the plan component id\r
+ * @param entities\r
+ * the entities\r
+ * @param role\r
+ * the role\r
+ * \r
+ * @return the set< long>\r
+ */\r
+ @Transactional(readOnly = false)\r
+ Set<Long> removeEntitiesFromPlanComponent(Long planComponentId,\r
+ Set<Entity> entities, String role);\r
+\r
+ /**\r
+ * Removes the eo from entity.\r
+ * \r
+ * @param planComponentId\r
+ * the plan component id\r
+ * @param entity\r
+ * the entity\r
+ * @param eo\r
+ * the eo\r
+ * @param role\r
+ * the role\r
+ * \r
+ * @return the entity\r
+ */\r
+ @Transactional(readOnly = false)\r
+ Entity removeEOFromEntity(Long planComponentId, Entity entity,\r
+ EvaluationObject eo, String role);\r
+\r
+ /**\r
+ * Removes the method evals from plan.\r
+ * \r
+ * @param planId\r
+ * the plan id\r
+ * @param sme\r
+ * the sme\r
+ * \r
+ * @return the set< long>\r
+ */\r
+ @Transactional(readOnly = false)\r
+ Set<Long> removeMethodEvalsFromPlan(Long planId, Set<MethodEval> sme);\r
+\r
+ /**\r
+ * Removes the plan ref.\r
+ * \r
+ * @param planRefId\r
+ * the plan ref id\r
+ * \r
+ * @return the long\r
+ */\r
+ @Transactional(readOnly = false)\r
+ Long removePlanRef(Long planRefId);\r
+\r
+ /**\r
+ * Removes the scenario definition plans.\r
+ * \r
+ * @param sspd\r
+ * the sspd\r
+ * \r
+ * @return the set< long>\r
+ */\r
+ @Transactional(readOnly = false)\r
+ Set<Long> removeScenarioDefinitionPlans(Set<ScenarioDefinitionPlan> sspd);\r
+\r
+ /**\r
+ * Sets the eo to entity.\r
+ * \r
+ * @param planComponentId\r
+ * the plan component id\r
+ * @param entity\r
+ * the entity\r
+ * @param eo\r
+ * the eo\r
+ * @param role\r
+ * the role\r
+ * \r
+ * @return the entity\r
+ */\r
+ @Transactional(readOnly = false)\r
+ Entity setEOToEntity(Long planComponentId, Entity entity,\r
+ EvaluationObject eo, String role);\r
+\r
+ /**\r
+ * Gets the plan component.\r
+ * \r
+ * @param planComponentId\r
+ * the plan component id\r
+ * \r
+ * @return the plan component\r
+ */\r
+ PlanComponent getPlanComponent(Long planComponentId);\r
+\r
+ /**\r
+ * Adds the method validation to plan component.\r
+ * \r
+ * @param planComponentId\r
+ * the plan component id\r
+ * @param mvid\r
+ * the mvid\r
+ * \r
+ * @return the method validation instance\r
+ */\r
+ @Transactional(readOnly = false)\r
+ MethodValidationInstance addMethodValidationToPlanComponent(\r
+ Long planComponentId, Long mvid);\r
+\r
+ /**\r
+ * Adds the scenario validation to plan component.\r
+ * \r
+ * @param planComponentId\r
+ * the plan component id\r
+ * @param sdv\r
+ * the sdv\r
+ * \r
+ * @return the scenario definition validation\r
+ */\r
+ @Transactional(readOnly = false)\r
+ ScenarioDefinitionValidation addScenarioValidationToPlanComponent(\r
+ Long planComponentId, ScenarioDefinitionValidation sdv);\r
+\r
+ /**\r
+ * Edits the method validation plan.\r
+ * \r
+ * @param mvi\r
+ * the mvi\r
+ * \r
+ * @return the method validation instance\r
+ */\r
+ @Transactional(readOnly = false)\r
+ MethodValidationInstance editMethodValidationPlan(\r
+ MethodValidationInstance mvi);\r
+\r
+ /**\r
+ * Removes the method validation from plan component.\r
+ * \r
+ * @param planComponentId\r
+ * the plan component id\r
+ * @param mvid\r
+ * the mvid\r
+ */\r
+ @Transactional(readOnly = false)\r
+ void removeMethodValidationFromPlanComponent(Long planComponentId, Long mvid);\r
+\r
+ /**\r
+ * Removes the scenario validation from plan component.\r
+ * \r
+ * @param planComponentId\r
+ * the plan component id\r
+ * @param svid\r
+ * the svid\r
+ */\r
+ @Transactional(readOnly = false)\r
+ void removeScenarioValidationFromPlanComponent(Long planComponentId,\r
+ Long svid);\r
+\r
+ /**\r
+ * Gets the method validations.\r
+ * \r
+ * @return the method validations\r
+ */\r
+ Set<MethodValidation> getMethodValidations();\r
+\r
+ /**\r
+ * Gets the plan asso eval table.\r
+ *\r
+ * @param planRefId the plan ref id\r
+ * @return the plan asso eval table\r
+ */\r
+ TCompositeDataMap getPlanAssoEvalTable(Long planRefId);\r
+\r
+\r
+\r
+ /**\r
+ * Gets the related users.\r
+ *\r
+ * @param planComponentId the plan component id\r
+ * @param filter the filter\r
+ * @return the related users\r
+ */\r
+ List<User> getRelatedUsers(Long planComponentId, String filter);\r
+\r
+ /**\r
+ * Adds the scenario cert to plan component.\r
+ *\r
+ * @param planComponentId the plan component id\r
+ * @param sdc the sdc\r
+ * @return the scenario def cert\r
+ */\r
+ @Transactional(readOnly = false)\r
+ ScenarioDefCert addScenarioCertToPlanComponent(Long planComponentId,\r
+ ScenarioDefCert sdc);\r
+\r
+ /**\r
+ * Edits the method cert plan.\r
+ *\r
+ * @param mci the mci\r
+ * @return the method cert instance\r
+ */\r
+ @Transactional(readOnly = false)\r
+ MethodCertInstance editMethodCertPlan(MethodCertInstance mci);\r
+\r
+ /**\r
+ * Adds the method cert to plan component.\r
+ *\r
+ * @param planRefId the plan ref id\r
+ * @param methodCertId the method cert id\r
+ * @return the method cert instance\r
+ */\r
+ @Transactional(readOnly = false)\r
+ MethodCertInstance addMethodCertToPlanComponent(Long planRefId,\r
+ Long methodCertId);\r
+\r
+}\r