1 package org.tigris.scarab.om; 2 3 48 49 import java.io.Serializable ; 50 import java.util.List ; 51 import java.util.Locale ; 52 53 import org.apache.regexp.REProgram; 54 55 import org.tigris.scarab.om.Attribute; 56 import org.tigris.scarab.om.RModuleAttribute; 57 import org.tigris.scarab.om.Issue; 58 import org.tigris.scarab.om.IssueType; 59 import org.tigris.scarab.om.MITList; 60 import org.tigris.scarab.om.ScarabUser; 61 import org.tigris.scarab.om.RModuleIssueType; 62 import org.tigris.scarab.om.RModuleOption; 63 import org.tigris.scarab.om.AttributeOption; 64 import org.tigris.scarab.om.AttributeGroup; 65 import org.tigris.scarab.util.ScarabPaginatedList; 66 67 import org.apache.torque.TorqueException; 68 import org.apache.torque.om.ObjectKey; 69 import org.apache.torque.util.Criteria; 70 71 77 public interface Module 78 extends Serializable 79 { 80 85 String NAME_DELIMINATOR = " > "; 86 87 Integer ROOT_ID = new Integer (0); 88 89 String USER = "user"; 90 String NON_USER = "non-user"; 91 92 99 ScarabUser[] getUsers(String permission) throws Exception ; 100 101 108 ScarabUser[] getUsers(List permissions) throws Exception ; 109 110 111 119 List getUsers(String firstName, String lastName, String username, 120 String email, IssueType issueType) 121 throws Exception ; 122 123 132 ScarabPaginatedList getUsers(String name, String username, 133 MITList mitList, 134 int offset, int resultSize, 135 String sortColumn, String sortPolarity, 136 boolean includeCommitters) 137 throws Exception ; 138 139 148 String getName(); 149 void setName(String name); 150 151 160 String getRealName(); 161 void setRealName(String name); 162 163 String getCode(); 164 void setCode(String code); 165 166 167 String getHttpDomain(); 168 void setHttpDomain(String domain); 169 170 173 String getScarabInstanceId(); 174 void setScarabInstanceId(String domain); 175 176 177 String getPort() throws Exception ; 178 void setPort(String port) throws Exception ; 179 180 181 String getScheme() throws Exception ; 182 void setScheme(String scheme) throws Exception ; 183 184 185 String getScriptName() throws Exception ; 186 void setScriptName(String scriptName) throws Exception ; 187 188 String getDescription(); 189 void setDescription(String description); 190 191 String getUrl(); 192 void setUrl(String url); 193 194 ObjectKey getPrimaryKey(); 195 void setPrimaryKey(ObjectKey key) throws Exception ; 196 Integer getModuleId(); 197 void setModuleId(Integer v) throws TorqueException; 198 199 200 Integer getQaContactId(); 201 202 void setQaContactId(Integer v) throws Exception ; 203 204 Integer getOwnerId(); 205 void setOwnerId(Integer v) throws Exception ; 206 207 void save() throws Exception ; 208 209 212 List getAttributes(Criteria criteria) 213 throws Exception ; 214 215 219 List getAttributes(IssueType issueType) 220 throws Exception ; 221 222 225 List getAllAttributes() 226 throws Exception ; 227 228 231 AttributeGroup createNewGroup (IssueType issueType) 232 throws Exception ; 233 234 239 List getDedupeGroupsWithAttributes(IssueType issueType) 240 throws Exception ; 241 242 245 List getDedupeAttributeGroups(IssueType issueType) 246 throws Exception ; 247 248 251 List getDedupeAttributeGroups(IssueType issueType, 252 boolean activeOnly) 253 throws Exception ; 254 255 258 int getDedupeSequence(IssueType issueType) 259 throws Exception ; 260 261 List getRModuleAttributes(IssueType issueType, boolean activeOnly, 262 String attributeType) 263 throws Exception ; 264 265 List getRModuleAttributes(IssueType issueType, boolean activeOnly) 266 throws Exception ; 267 268 List getRModuleAttributes(IssueType issueType) 269 throws Exception ; 270 271 List getRModuleAttributes(Criteria criteria) 272 throws Exception ; 273 274 277 List getDefaultRModuleUserAttributes(IssueType issueType) 278 throws Exception ; 279 280 RModuleAttribute getRModuleAttribute(Attribute attribute, 281 IssueType issueType) 282 throws Exception ; 283 int getLastAttribute(IssueType issueType, String attributeType) 284 throws Exception ; 285 286 int getLastAttributeOption(Attribute attribute, 287 IssueType issueType) 288 throws Exception ; 289 290 String getQueryKey(); 291 292 boolean getDeleted(); 293 void setDeleted(boolean b); 294 295 Integer getParentId() throws TorqueException; 296 void setParentId(Integer v) throws TorqueException; 297 298 void setParent(Module module) 299 throws Exception ; 300 301 304 Module getParent() throws Exception ; 305 306 310 List getAncestors() throws Exception ; 311 312 315 boolean isEndlessLoop(Module parent) 316 throws Exception ; 317 318 Issue getNewIssue(IssueType issueType) 319 throws Exception ; 320 321 List getRModuleIssueTypes() 322 throws TorqueException; 323 324 List getRModuleOptions(Attribute attribute, IssueType issueType) 325 throws Exception ; 326 327 List getRModuleOptions(Attribute attribute, IssueType issueType, 328 boolean activeOnly) 329 throws Exception ; 330 331 List getRModuleOptions(Criteria crit) 332 throws Exception ; 333 334 List getLeafRModuleOptions(Attribute attribute, IssueType issueType) 335 throws Exception ; 336 337 List getLeafRModuleOptions(Attribute attribute, IssueType issueType, 338 boolean activeOnly) 339 throws Exception ; 340 341 RModuleOption getRModuleOption(AttributeOption option, 342 IssueType issueType) 343 throws Exception ; 344 345 ScarabUser[] getEligibleUsers(Attribute attribute) 346 throws Exception ; 347 348 ScarabUser[] getEligibleIssueReporters() 349 throws Exception ; 350 351 357 List getSavedReports(ScarabUser user) 358 throws Exception ; 359 360 List getUserAttributes(IssueType issueType, boolean activeOnly) 361 throws Exception ; 362 363 List getUserAttributes(IssueType issueType) 364 throws Exception ; 365 366 List getUserPermissions(IssueType issueType) 367 throws Exception ; 368 369 RModuleIssueType getRModuleIssueType(IssueType issueType) 370 throws Exception ; 371 372 void addIssueType(IssueType issueType) 373 throws Exception ; 374 375 void addAttributeOption(IssueType issueType, AttributeOption option) 376 throws Exception ; 377 378 381 RModuleAttribute addRModuleAttribute(IssueType issueType, 382 Attribute attribute) 383 throws Exception ; 384 385 388 RModuleOption addRModuleOption(IssueType issueType, 389 AttributeOption option) 390 throws Exception ; 391 392 List getIssueTypes() 393 throws Exception ; 394 395 List getIssueTypes(boolean activeOnly) 396 throws Exception ; 397 398 List getTemplateTypes() 399 throws Exception ; 400 401 List getNavIssueTypes() 402 throws Exception ; 403 404 411 boolean allowsMultipleVoting(); 412 413 418 int getUnusedVoteCount(ScarabUser user); 419 420 423 List getUnapprovedQueries() throws Exception ; 424 425 428 List getUnapprovedTemplates() throws Exception ; 429 430 438 List getOptionTree(Attribute attribute, IssueType issueType) 439 throws Exception ; 440 441 450 List getOptionTree(Attribute attribute, IssueType issueType, 451 boolean activeOnly) 452 throws Exception ; 453 454 458 String getArchiveEmail(); 459 460 470 String [] getSystemEmail(); 471 472 475 boolean allowsNewIssues(); 476 477 480 boolean allowsIssues(); 481 482 486 boolean isInitializing() 487 throws Exception ; 488 489 494 boolean isGlobalModule(); 495 496 500 REProgram getIssueRegex() 501 throws TorqueException; 502 503 516 Issue getIssueById(String id) 517 throws Exception ; 518 519 String toString(); 520 521 List getRoles() throws Exception ; 522 523 531 Locale getLocale(); 532 } 533 534 | Popular Tags |