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