001: /*
002: * SalomeTMF is a Test Management Framework
003: * Copyright (C) 2005 France Telecom R&D
004: *
005: * This library is free software; you can redistribute it and/or
006: * modify it under the terms of the GNU Lesser General Public
007: * License as published by the Free Software Foundation; either
008: * version 2 of the License, or (at your option) any later version.
009: *
010: * This library is distributed in the hope that it will be useful,
011: * but WITHOUT ANY WARRANTY; without even the implied warranty of
012: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
013: * Lesser General Public License for more details.
014: *
015: * You should have received a copy of the GNU Lesser General Public
016: * License along with this library; if not, write to the Free Software
017: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
018: *
019: * @author Marche Mikael
020: *
021: * Contact: mikael.marche@rd.francetelecom.com
022: */
023:
024: package org.objectweb.salome_tmf.api.sql;
025:
026: import java.rmi.Remote;
027:
028: import org.objectweb.salome_tmf.api.data.AttachementWrapper;
029: import org.objectweb.salome_tmf.api.data.FileAttachementWrapper;
030: import org.objectweb.salome_tmf.api.data.SalomeFileWrapper;
031: import org.objectweb.salome_tmf.api.data.UrlAttachementWrapper;
032:
033: public interface ISQLExecutionTestResult extends Remote {
034:
035: /**
036: * Insert an execution test result (table EXEC_CAS) for the execution result idExecRes and test idTest
037: * @param idExecRes
038: * @param idTest
039: * @param result ('PASSED', 'FAILED', 'INCONCLUSIF' @see ApiConstants)
040: * @return the id of the execution test result in the table EXEC_CAS
041: * @throws Exception
042: * need permission canExecutCamp
043: */
044: public int insert(int idExecRes, int idTest, String result)
045: throws Exception;
046:
047: /**
048: * Attach an url to the execution test result identified by idExecRes and idTest(table EXEC_CAS_ATTACH)
049: * @param idExecRes
050: * @param idTest
051: * @param url
052: * @param description
053: * @return the Id of the attachment in the table ATTACHEMENT
054: * @throws Exception
055: * @see ISQLUrlAttachment.insert(String, String)
056: * no permission needed
057: */
058: public int addAttachUrl(int idExecRes, int idTest, String url,
059: String description) throws Exception;
060:
061: /**
062: * Attach an url to the execution test result identified by idRestestExec (table EXEC_CAS_ATTACH)
063: * @param idRestestExec
064: * @param url
065: * @param description
066: * @return the Id of the attachment in the table ATTACHEMENT
067: * @throws Exception
068: * @see ISQLUrlAttachment.insert(String, String)
069: * no permission needed
070: */
071: public int addAttachUrl(int idRestestExec, String url,
072: String description) throws Exception;
073:
074: /**
075: * Attach a file to the execution test result identified by idExecRes and idTest (table EXEC_CAS_ATTACH)
076: * @param idExecRes
077: * @param idTest
078: * @param file
079: * @param description
080: * @return the Id of the attachment in the table ATTACHEMENT
081: * @throws Exception
082: * @see ISQLFileAttachment.insert(File, String)
083: * no permission needed
084: */
085: public int addAttachFile(int idExecRes, int idTest,
086: SalomeFileWrapper file, String description)
087: throws Exception;
088:
089: /**
090: * Attach a file to the execution test result identified by idRestestExec (table EXEC_CAS_ATTACH)
091: * @param idRestestExec
092: * @param file
093: * @param description
094: * @return the Id of the attachment in the table ATTACHEMENT
095: * @throws Exception
096: * @see ISQLFileAttachment.insert(File, String)
097: * no permission needed
098: */
099: public int addAttachFile(int idRestestExec, SalomeFileWrapper file,
100: String description) throws Exception;
101:
102: /**
103: * Update the result of an execution test result identified by idExecRes and idTest
104: * @param idExecRes
105: * @param idTest
106: * @param result
107: * @throws Exception
108: * need permission canExecutCamp
109: */
110: public void update(int idExecRes, int idTest, String result)
111: throws Exception;
112:
113: /**
114: * Update the result of an execution test result identified by idRestestExec
115: * @param idRestestExec
116: * @param result
117: * @throws Exception
118: * need permission canExecutCamp
119: */
120: public void update(int idRestestExec, String result)
121: throws Exception;
122:
123: /**
124: * Delete the referenced execution test result identified by idExecRes and idTest
125: * @param idResExec
126: * @param idTest
127: * @throws Exception
128: * @see delete(int)
129: * need permission canExecutCamp
130: */
131: public void delete(int idResExec, int idTest) throws Exception;
132:
133: /**
134: * Delete all referenced execution test result for the execution result idExecRes
135: * @param idExecRes
136: * @throws Exception
137: * @see delete(int)
138: * need permission canExecutCamp
139: */
140: public void deleteAllFrom(int idExecRes) throws Exception;
141:
142: /**
143: * Delete the execution test result identified by idRestestExec
144: * Then delete all the attachements and Action results.
145: * @param idRestestExec
146: * @throws Exception
147: * @see ISQLExecutionActionResult.deleteAll(int)
148: * need permission canExecutCamp
149: */
150: public void delete(int idRestestExec) throws Exception;
151:
152: /**
153: * Delete all attchements of the execution test result identified by idRestestExec
154: * @param idRestestExec
155: * @throws Exception
156: * no permission needed
157: */
158: public void deleteAllAttach(int idRestestExec) throws Exception;
159:
160: /**
161: * Delete an attchement idAttach of the execution test result identified by idResExec and idTest
162: * @param idResExec
163: * @param idTest
164: * @param idAttach
165: * @throws Exception
166: */
167: public void deleteAttach(int idResExec, int idTest, int idAttach)
168: throws Exception;
169:
170: /**
171: * Delete an attchement idAttach of the execution test result identified by idRestestExec
172: * @param idRestestExec
173: * @param idAttach
174: * @throws Exception
175: */
176: public void deleteAttach(int idRestestExec, int idAttach)
177: throws Exception;
178:
179: /**
180: * Get an Array of FileAttachementWrapper representing the files attachment
181: * execution test result identified by idResExec and idTest
182: * @param idResExec
183: * @param idTest
184: * @return
185: * @throws Exception
186: */
187: public FileAttachementWrapper[] getAttachFiles(int idResExec,
188: int idTest) throws Exception;
189:
190: /**
191: * Get an Array of FileAttachementWrapper representing the files attachment
192: * of the execution test result identified by idRestestExec
193: * @param idRestestExec
194: * @return
195: * @throws Exception
196: */
197: public FileAttachementWrapper[] getAttachFiles(int idRestestExec)
198: throws Exception;
199:
200: /**
201: * Get an Array of UrlAttachementWrapper representing the Urls attachment
202: * of the execution test result identified by idResExec and idTest
203: * @param idResExec
204: * @param idTest
205: * @return
206: * @throws Exception
207: */
208: public UrlAttachementWrapper[] getAttachUrls(int idResExec,
209: int idTest) throws Exception;
210:
211: /**
212: * Get an Array of UrlAttachementWrapper representing the Urls attachment
213: * of the execution test result identified by idRestestExec
214: * @param idRestestExec
215: * @return
216: * @throws Exception
217: */
218: public UrlAttachementWrapper[] getAttachUrls(int idRestestExec)
219: throws Exception;
220:
221: /**
222: * Get an Array of all attachments (AttachementWrapper, File or Url)
223: * of the execution test result identified by idResExec and idTest
224: * @param idResExec
225: * @param idTest
226: * @return
227: * @throws Exception
228: */
229: public AttachementWrapper[] getAttachs(int idResExec, int idTest)
230: throws Exception;
231:
232: /**
233: * Get an Array of all attachments (AttachementWrapper, File or Url)
234: * of the execution test result identified by idRestestExec
235: * @param idRestestExec
236: * @return
237: * @throws Exception
238: */
239: public AttachementWrapper[] getAttachs(int idRestestExec)
240: throws Exception;
241:
242: /**
243: * Get the id * of the execution test result identified by idResExec and idTest
244: * @param idResExec
245: * @param idTest
246: * @return
247: * @throws Exception
248: */
249: public int getID(int idResExec, int idTest) throws Exception;
250: }
|