001: package org.objectweb.salome_tmf.api.sql;
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.SuiteWrapper;
009: import org.objectweb.salome_tmf.api.data.TestWrapper;
010: import org.objectweb.salome_tmf.api.data.UrlAttachementWrapper;
011:
012: public interface ISQLTestList extends Remote {
013:
014: /**
015: * Insert a TestList for the family idFamily
016: * @param idFamily
017: * @param name of the TestList
018: * @param description of the TestList
019: * @return the id of the new TestList
020: * @throws Exception
021: * need permission canCreateTest
022: */
023: public int insert(int idFamily, String name, String description)
024: throws Exception;
025:
026: /**
027: * Attach a file to the TestList identified by idSuite (Table SUITE_ATTACHEMENT)
028: * @param idSuite
029: * @param f the file
030: * @param description of the file
031: * @return the Id of the attachment in the table ATTACHEMENT
032: * @throws Exception
033: * @see ISQLFileAttachment.insert(File, String)
034: * no permission needed
035: */
036: public int addAttachFile(int idSuite, SalomeFileWrapper f,
037: String description) throws Exception;
038:
039: /**
040: * Attach an Url to the TestList identified by idSuite (Table SUITE_ATTACHEMENT)
041: * @param idSuite
042: * @param url
043: * @param description of the url
044: * @return the Id of the attachment in the table ATTACHEMENT
045: * @throws Exception
046: * @see ISQLUrlAttachment.insert(String, String)
047: * no permission needed
048: */
049: public int addAttachUrl(int idSuite, String url, String description)
050: throws Exception;
051:
052: /**
053: * Update the name and the description of the TestList identified by idSuite
054: * @param idSuite
055: * @param name
056: * @param description
057: * @throws Exception
058: * need permission canUpdateTest
059: */
060: public void update(int idSuite, String name, String description)
061: throws Exception;
062:
063: /**
064: * Increment or decrement the order of the TestList identified by idSuite in the Family
065: * Then, reorder other estList to preserve a correct order
066: * @param idSuite
067: * @param increment true (+1) or false (-1)
068: * @return the new order
069: * @throws Exception
070: * no permission needed
071: */
072: public int updateOrder(int idSuite, boolean increment)
073: throws Exception;
074:
075: /**
076: * Delete the TestList identified by idSuite in the database
077: * then all attachments and all tests in the testlist, and reoder the other testlist in the family
078: * @param idSuite
079: * @throws Exception
080: * @see ISQLTest.delete(int)
081: * need permission canDeleteTest (do a special allow)
082: */
083: public void delete(int idSuite) throws Exception;
084:
085: /**
086: * Delete the TestList identified by idSuite in the database
087: * then all attachments and all tests in the testlist, and reoder the other testlist in the family if reorder = true
088: * @param idSuite
089: * @param reorder re-order testlist in the family
090: * @throws Exception
091: * @see ISQLTest.delete(int)
092: * need permission canDeleteTest (do a special allow)
093: * @TDOD SOAP
094: */
095: public void delete(int idSuite, boolean reorder) throws Exception;
096:
097: /**
098: * Delete all attchements of the TestList identified by idSuite
099: * @param idSuite
100: * @throws Exception
101: * no permission needed
102: */
103: public void deleteAllAttach(int idSuite) throws Exception;
104:
105: /**
106: * Delete an attchement idAttach of the TestList identified by idSuite
107: * @param idSuite
108: * @param idAttach
109: * @throws Exception
110: * @see ISQLAttachment.delete(int)
111: * no permission needed
112: */
113: public void deleteAttach(int idSuite, int idAttach)
114: throws Exception;
115:
116: /**
117: * Get an Array of AttachementWrapper (FileAttachementWrapper, UrlAttachementWrapper)
118: * for the testlist identified by idSuite
119: * @param testId : id of the test
120: * @return
121: * @throws Exception
122: */
123: public AttachementWrapper[] getAllAttachemnt(int idSuite)
124: throws Exception;
125:
126: /**
127: * Get an Array of FileAttachementWrapper for the testlist identified by idSuite
128: * @param idSuite : id of the testlist
129: * @return
130: * @throws Exception
131: */
132: public FileAttachementWrapper[] getAllAttachFiles(int idSuite)
133: throws Exception;
134:
135: /**
136: * Get an Array of UrlAttachementWrapper for the testlist identified by idSuite
137: * @param idSuite : id of the testlist
138: * @return
139: * @throws Exception
140: */
141: public UrlAttachementWrapper[] getAllAttachUrls(int idSuite)
142: throws Exception;
143:
144: /**
145: * Get the id of the TestList name in the family idFamily
146: * @param idFamily
147: * @param name
148: * @return
149: * @throws Exception
150: */
151: public int getID(int idFamily, String name) throws Exception;
152:
153: /**
154: * Get the number of test in the TestList identified by idSuite
155: * @param idSuite
156: * @return
157: * @throws Exception
158: */
159: public int getNumberOfTest(int idSuite) throws Exception;
160:
161: /**
162: * Get TestWrapper representing the test at order in the TestList identified by idSuite
163: * @param idSuite
164: * @param order
165: * @return
166: * @throws Exception
167: */
168: public TestWrapper getTestByOrder(int idSuite, int order)
169: throws Exception;
170:
171: /**
172: * Get SuiteWrapper representing the TestList identified by idSuite
173: * @param idSuite
174: * @return
175: * @throws Exception
176: */
177: public SuiteWrapper getTestList(int idSuite) throws Exception;
178:
179: /**
180: * Get an Array of TestWrapper (ManualTestWrapper or AutomaticTestWrapper)
181: * representing all tests in the suite identified by idSuite
182: * @param idSuite
183: * @return
184: * @throws Exception
185: */
186: public TestWrapper[] getTestsWrapper(int idSuite) throws Exception;
187: }
|