KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > cowsultants > itracker > ejb > beans > webservice > ProjectService


1 /*
2  * This software was designed and created by Jason Carroll.
3  * Copyright (c) 2002, 2003, 2004 Jason Carroll.
4  * The author can be reached at jcarroll@cowsultants.com
5  * ITracker website: http://www.cowsultants.com
6  * ITracker forums: http://www.cowsultants.com/phpBB/index.php
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it only under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  */

18
19 package cowsultants.itracker.ejb.beans.webservice;
20
21 import java.util.*;
22 import java.rmi.RemoteException JavaDoc;
23 import javax.ejb.EJBObject JavaDoc;
24
25 import cowsultants.itracker.ejb.client.exceptions.*;
26 import cowsultants.itracker.ejb.client.models.*;
27
28
29 /**
30   * Provides client access to project services.
31   */

32 public interface ProjectService extends EJBObject JavaDoc {
33     public static final String JavaDoc JNDI_NAME = "ejb/webservice/ProjectService";
34
35     /**
36       * Returns a list of all available projects the user has permission to access.
37       * @param login the userid requesting the project list
38       * @param authentication the user's authentication information, if known
39       * @param authType the type of authentication information being provided
40       * @return an array of ProjectModels
41       */

42     public ProjectModel[] getAllProjects(String JavaDoc login, String JavaDoc authentication, int authType) throws RemoteException JavaDoc, ProjectException;
43
44     /**
45       * Returns the requested project. The project is only returned if it exists and the user has
46       * permission to access it.
47       * @param projectId the requested project
48       * @param login the userid requesting the project list
49       * @param authentication the user's authentication information, if known
50       * @param authType the type of authentication information being provided
51       * @return a ProjectModel or null if the project isn't available
52       */

53     public ProjectModel getProject(Integer JavaDoc projectId, String JavaDoc login, String JavaDoc authentication, int authType) throws RemoteException JavaDoc, ProjectException;
54
55     /**
56       * Returns a list of all active projects the user has permission to create issues in.
57       * @param login the userid requesting the project list
58       * @param authentication the user's authentication information, if known
59       * @param authType the type of authentication information being provided
60       * @return an array of ProjectModels
61       */

62     public ProjectModel[] getProjectsAvailableForCreate(String JavaDoc login, String JavaDoc authentication, int authType) throws RemoteException JavaDoc, ProjectException;
63
64     /**
65       * Returns a list of UserModels that define the list of possible owners for this project.
66       * If the user only has ASSIGN_SELF permission then only the user will be in the array,
67       * if the user does not have permission to assign issues at all, the array will be empty.
68       * @param projectId the requested project
69       * @param login the userid requesting the project list
70       * @param authentication the user's authentication information, if known
71       * @param authType the type of authentication information being provided
72       * @return an array of UserModels
73       */

74     public UserModel[] getProjectPossibleOwners(Integer JavaDoc projectId, String JavaDoc login, String JavaDoc authentication, int authType) throws RemoteException JavaDoc, ProjectException;
75
76     /**
77       * Returns an array of all CustomFields defined in the current application. If a valid locale is
78       * supplied, the custom fields will also be populated with the labels and options for that locale,
79       * otherwise they will contain the default (en_US) labels. Only custom fields that the user would
80       * have access to through one of their allowed projects will be returned.
81       * @param login the userid requesting the project list
82       * @param authentication the user's authentication information, if known
83       * @param authType the type of authentication information being provided
84       * @param local a string representing an ISO Locale
85       * @return an array of CustomField objects
86       */

87     public CustomFieldModel[] getCustomFields(String JavaDoc login, String JavaDoc authentication, int authType, String JavaDoc locale) throws RemoteException JavaDoc, ProjectException;
88
89     /**
90       * Returns a SystemConfigurationModel defining the settings of the system as currently defined.
91       * If a valid locale is supplied, the custom fields will also be populated with the labels and
92       * options for that locale, otherwise they will contain the default (en_US) labels. Only custom
93       * fields that the user would have access to through one of their allowed projects will be returned.
94       * @param login the userid requesting the project list
95       * @param authentication the user's authentication information, if known
96       * @param authType the type of authentication information being provided
97       * @param local a string representing an ISO Locale
98       * @return a SystemConfigurationModel
99       */

100     public SystemConfigurationModel getSystemConfiguration(String JavaDoc login, String JavaDoc authentication, int authType, String JavaDoc locale) throws RemoteException JavaDoc, ProjectException;
101
102 }
103
Popular Tags