001: package salomeTMF_plug.requirements.sqlWrapper;
002:
003: import java.rmi.Remote;
004:
005: import org.objectweb.salome_tmf.api.data.AttachementWrapper;
006: import org.objectweb.salome_tmf.api.data.FileAttachementWrapper;
007: import org.objectweb.salome_tmf.api.data.SalomeFileWrapper;
008: import org.objectweb.salome_tmf.api.data.TestWrapper;
009: import org.objectweb.salome_tmf.api.data.UrlAttachementWrapper;
010:
011: public interface ISQLRequirement extends Remote {
012:
013: /******************* CODE HYSTORY ****************/
014: public final int HIST_CREATE_REQ = 11;
015: public final int HIST_ADD_REQLEAF = 12;
016: public final int HIST_ADD_REQFAM = 13;
017: public final int HIST_ADD_ATTACH = 14;
018: public final int HIST_ADD_COVER = 15;
019: public final int HIST_ADD_LINK = 16;
020:
021: public final int HIST_DEL_REQ = 101;
022: public final int HIST_DEL_ATTACH = 102;
023: public final int HIST_DEL_COVER = 103;
024: public final int HIST_DEL_LINK = 104;
025:
026: public final int HIST_UPDATE_NAME = 1001;
027: public final int HIST_UPDATE_DESCRIPTION = 1002;
028: public final int HIST_UPDATE_VERSION = 1003;
029: public final int HIST_UPDATE_REFERENCE = 1004;
030: public final int HIST_UPDATE_INFO = 1005;
031: public final int HIST_UPDATE_PRIORITY = 1006;
032: public final int HIST_UPDATE_CATEGORY = 1007;
033: public final int HIST_UPDATE_COMPLEXITY = 1008;
034: public final int HIST_UPDATE_ORIGINE = 1009;
035: public final int HIST_UPDATE_SATE = 1010;
036: public final int HIST_UPDATE_VERIFWAY = 1011;
037: public final int HIST_UPDATE_PARENT = 1012;
038:
039: /**
040: * Insert a requirments in database
041: * @param name
042: * @param description
043: * @param req_type : 1 for requirement or 0 for requirement set
044: * @param id_parent
045: * @param id_project
046: * @return the id of the requirment
047: * @throws Exception
048: */
049: public int add(String name, String description, int req_type,
050: int id_parent, int id_project, int priority)
051: throws Exception;
052:
053: /**
054: * Attach a file attach to a test in table ATTACHEMENT and reference in table REQ_ATTACHEMENT
055: * @param idReq : id of the requirement
056: * @param f : the file
057: * @param description of the file
058: * @return the id of the attachment in the table ATTACHEMENT
059: * @throws Exception
060: * @See ISQLFileAttachment.insert(File, String);
061: * no permission needed
062: */
063: public int addAttachFile(int idReq, SalomeFileWrapper f,
064: String description) throws Exception;
065:
066: /**
067: * Attach a url to a test in table ATTACHEMENT and reference in table REQ_ATTACHEMENT
068: * @param idReq : id of the requirement
069: * @param url
070: * @param description of the url
071: * @return the id of the attachment in the table ATTACHEMENT
072: * @see ISQLUrlAttachment.insert(String, String);
073: * @throws Exception
074: */
075: public int addAttachUrl(int idReq, String url, String description)
076: throws Exception;
077:
078: public void addReqConvert(int idReq, int idTest) throws Exception;
079:
080: public void updateName(int idReq, String newName, int id_parent,
081: int idProjet) throws Exception;
082:
083: public void updateDescription(int idReq, String newdescription)
084: throws Exception;
085:
086: public void updateVersion(int idReq, String version)
087: throws Exception;
088:
089: public void updateReference(int idReq, String reference)
090: throws Exception;
091:
092: public void updateInfo(int idReq, String _version, String _origine,
093: String _verif, String _reference) throws Exception;
094:
095: public void updatePriority(int idReq, int priority)
096: throws Exception;
097:
098: /**
099: *
100: * @param idReq
101: * @param cat 0 to 7
102: * @throws Exception
103: */
104: public void updateCat(int idReq, int cat) throws Exception;
105:
106: public void updateComplexe(int idReq, int comp) throws Exception;
107:
108: public void updateOrigine(int idReq, String org) throws Exception;
109:
110: public void updateState(int idReq, int state) throws Exception;
111:
112: public void updateVerif(int idReq, String verif) throws Exception;
113:
114: public void updateParent(int idReq, int idParent) throws Exception;
115:
116: public void deleteReq(int idReq) throws Exception;
117:
118: public void deleteAllTestCover(int idTest) throws Exception;
119:
120: public void deleteAllReqCover(int idReq) throws Exception;
121:
122: public void deleteCover(int idReq, int idTest) throws Exception;
123:
124: /**
125: * Delete all attachment in table (REQ_ATTACHEMENT and ATTACHEMENT) for the test
126: * @param idReq : id of the requirement
127: * @throws Exception
128: * @see deleteAttach(int, int)
129: * no permission needed
130: */
131: public void deleteAllAttach(int idReq) throws Exception;
132:
133: /**
134: * Delete attachement for the test and the attachement (tables REQ_ATTACHEMENT, ATTACHEMENT)
135: * @param idReq : id of the requirement
136: * @param attachId : id of the attachment
137: * @throws Exception
138: * @see ISQLAttachment.delete(int)
139: * no permission needed
140: */
141: public void deleteAttach(int idReq, int attachId) throws Exception;
142:
143: public ReqWrapper getReq(String name, int id_parent, int id_project)
144: throws Exception;
145:
146: public ReqWrapper getReqById(int idReq) throws Exception;
147:
148: public ReqWrapper[] getProjectRequirements(int idProject)
149: throws Exception;
150:
151: public ReqWrapper[] getProjectRequirementByType(int idProject,
152: int type) throws Exception;
153:
154: public ReqWrapper[] getFistChildInReqFamily(int idReq)
155: throws Exception;
156:
157: public ReqWrapper[] getReqWrapperCoveredByCamp(int idCamp)
158: throws Exception;
159:
160: public boolean isReqReqCoveredByTest(int idReq, int idTest)
161: throws Exception;
162:
163: public ReqWrapper[] getReqCoveredByTest(int idTest)
164: throws Exception;
165:
166: public ReqWrapper[] getCoveredReq(int idProject) throws Exception;
167:
168: public ReqWrapper[] getReqCoveredByResExecAndStatus(int idExec,
169: String satus) throws Exception;
170:
171: public TestWrapper[] getTestCoveredForReq(int idReq)
172: throws Exception;
173:
174: /**
175: * Get a Vector of AttachementWrapper (FileAttachementWrapper, UrlAttachementWrapper)
176: * for the requirement identified by idReq
177: * @param idReq : id of the requirement
178: * @return
179: * @throws Exception
180: */
181: public AttachementWrapper[] getAllAttachemnt(int idReq)
182: throws Exception;
183:
184: /**
185: * Get a Vector of FileAttachementWrapper for the requirement identified by idreq
186: * @param idReq : id of the requirement
187: * @return
188: * @throws Exception
189: */
190: public FileAttachementWrapper[] getAllAttachFiles(int idReq)
191: throws Exception;
192:
193: /**
194: * Get a Vector of UrlAttachementWrapper for the requirement identified by idReq
195: * @param idReq : id of the requirement
196: * @return
197: * @throws Exception
198: */
199: public UrlAttachementWrapper[] getAllAttachUrls(int idReq)
200: throws Exception;
201:
202: public void deleteProjectReq(int idProject) throws Exception;
203:
204: public HistoryWrapper[] getHistory(int idReq) throws Exception;
205:
206: }
|