Toggle navigation
Toggle navigation
This project
Loading...
Sign in
grogv3
/
grog-cubi
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Jean-Francois Leveque
2017-02-16 16:45:14 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
98b1f8d158d3c38e73de2139d5511174b696bae0
98b1f8d1
1 parent
fe8b74b5
Comments in English
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
15 deletions
src/main/java/org/legrog/web/xyz/SharedService.java
src/main/java/org/legrog/web/xyz/SharedServiceDefault.java
src/main/java/org/legrog/web/xyz/SharedService.java
View file @
98b1f8d
...
...
@@ -5,51 +5,50 @@ import org.legrog.entities.*;
import
java.util.List
;
/**
* S
ervice partagé pour les données non associées à un package spécifique.
* S
hared service for data not part of a specific package
*/
public
interface
SharedService
{
/**
* A
joute un pays.
* A
dds a Country
*
* @param country
* @return Country
ajouté
* @param country
Country to add
* @return Country
*/
Country
addCountry
(
Country
country
);
/**
*
Fournit la liste des pays.
*
Provides the List of Country
*
* @return List<Country>
*/
List
<
Country
>
getAllCountries
();
/**
*
Fournit la liste des
DisplayNameMask
*
Provides the List of
DisplayNameMask
*
* @return List<DisplayNameMask>
*/
List
<
DisplayNameMask
>
getAllDisplayNameMasks
();
/**
*
Fournit la liste des
AccountRole
*
Provides the List of
AccountRole
*
* @return List<AccountRole>
*/
List
<
AccountRole
>
getAvailableUserRoles
();
/**
*
Fournit la liste des
AccountProperty
*
Provides the List of
AccountProperty
*
* @return List<AccountProperty>
*/
List
<
AccountProperty
>
getAvailableUserProperties
();
/**
*
Fournit le compte correspondant à l'utilisateur courant.
*
Provides the Account of the current user
* @return Account
*
* TODO : implémenter une méthode qui le fait vraiment
*/
Account
getCurrentUser
();
}
\ No newline at end of file
...
...
src/main/java/org/legrog/web/xyz/SharedServiceDefault.java
View file @
98b1f8d
...
...
@@ -25,10 +25,10 @@ public class SharedServiceDefault implements SharedService {
/**
* Uses shared repositories for country and related to account and also AccountService
*
* @param countryRepository
* @param accountRoleRepository
* @param accountPropertyRepository
* @param accountService
* @param countryRepository
injected CountryRepository
* @param accountRoleRepository
injected accountRoleRepository
* @param accountPropertyRepository
injected AccountPropertyRepository
* @param accountService
injected AccountService
*/
@Inject
public
SharedServiceDefault
(
CountryRepository
countryRepository
,
AccountRoleRepository
accountRoleRepository
,
...
...
@@ -74,7 +74,7 @@ public class SharedServiceDefault implements SharedService {
@Override
public
Account
getCurrentUser
()
{
// TODO
Remplacer l'astuce par une vraie récupération de l'utilisateur
// TODO
Implement instead of randomly choosing one
List
<
Account
>
accounts
=
accountService
.
getAllUsers
();
Random
random
=
new
Random
();
...
...
Please
register
or
login
to post a comment