public interface DOIDbDataAccessService
Modifier and Type | Method and Description |
---|---|
void |
addDOIProject(int suffix,
String projectname)
Add a DOI project
|
void |
addDOIProjectToUser(String username,
int suffix)
Assign a DOI project to a user
|
void |
addDOIUser(String username,
Boolean admin)
Add a DOI user
|
void |
addDOIUser(String username,
Boolean admin,
String email)
Add a DOI user
|
void |
addToken(String token)
Add token
|
void |
close()
Close and release all the Data access connections.
|
void |
deleteToken(String token)
Delete token
|
List<DOIProject> |
getAllDOIProjects()
Get all DOI projects from data base
|
List<DOIProject> |
getAllDOIProjectsForUser(String username)
Get Projects related to a given username
|
List<DOIUser> |
getAllDOIusers()
Get all DOI users from data base
|
List<DOIUser> |
getAllDOIUsersForProject(int suffix)
Get Users from a given project.
|
String |
getDOIProjectName(int suffix)
Get Project name from its suffix.
|
List<String> |
getTokens()
Get tokens
|
boolean |
isAdmin(String username)
Check if user is an admin user
|
boolean |
isUserExist(String username)
Check if user exists in the database
|
void |
removeDOIProject(int suffix)
Remove a DOI project
|
void |
removeDOIProjectFromUser(String username,
int suffix)
Remove a DOI project from a user
|
void |
removeDOIUser(String username)
Remove a DOI user
|
void |
renameDOIProject(int suffix,
String newprojectname)
Rename DOI project from its suffix.
|
void |
setAdmin(String username)
Add admin right to a user
|
void |
unsetAdmin(String username)
Remove admin right from a user
|
List<DOIUser> getAllDOIusers() throws DOIDbException
DOIDbException
- When an Database exception happensList<DOIProject> getAllDOIProjects() throws DOIDbException
DOIDbException
- When an Database exception happensList<DOIProject> getAllDOIProjectsForUser(String username) throws DOIDbException
username
- usernameDOIDbException
- When an Database exception happensList<DOIUser> getAllDOIUsersForProject(int suffix) throws DOIDbException
suffix
- suffixDOIDbException
- When an Database exception happensvoid addDOIUser(String username, Boolean admin) throws DOIDbException
username
- usernameadmin
- True when the user is admin otherwise FalseDOIDbException
- When an Database exception happensvoid addDOIUser(String username, Boolean admin, String email) throws DOIDbException
username
- usernameadmin
- True when the user is admin otherwise Falseemail
- emailDOIDbException
- When an Database exception happensvoid removeDOIUser(String username) throws DOIDbException
username
- usernameDOIDbException
- When an Database exception happensvoid removeDOIProject(int suffix) throws DOIDbException
suffix
- suffixDOIDbException
- When an Database exception happensvoid addDOIProject(int suffix, String projectname) throws DOIDbException
suffix
- suffixprojectname
- project nameDOIDbException
- When an Database exception happensvoid addDOIProjectToUser(String username, int suffix) throws DOIDbException
username
- user namesuffix
- suffix related to a projectDOIDbException
- When an Database exception happensvoid removeDOIProjectFromUser(String username, int suffix) throws DOIDbException
username
- user namesuffix
- suffix related to a projectDOIDbException
- When an Database exception happensvoid setAdmin(String username) throws DOIDbException
username
- user nameDOIDbException
- When an Database exception happensvoid unsetAdmin(String username) throws DOIDbException
username
- user nameDOIDbException
- When an Database exception happensboolean isAdmin(String username) throws DOIDbException
username
- user nameDOIDbException
- When an Database exception happensboolean isUserExist(String username) throws DOIDbException
username
- user nameDOIDbException
- When an Database exception happensvoid renameDOIProject(int suffix, String newprojectname) throws DOIDbException
suffix
- suffixnewprojectname
- new project nameDOIDbException
- When an Database exception happensString getDOIProjectName(int suffix) throws DOIDbException
suffix
- suffixDOIDbException
- When an Database exception
happensvoid addToken(String token) throws DOIDbException
token
- Adds a token to the databaseDOIDbException
- When an Database exception
happensvoid deleteToken(String token) throws DOIDbException
token
- token to deleteDOIDbException
- When an Database exception
happensList<String> getTokens() throws DOIDbException
DOIDbException
- When an Database exception
happensvoid close() throws DOIDbException
DOIDbException
- When an error occursCopyright © 2017–2020 CNES. All rights reserved.