Class UsersGroups
java.lang.Object
it.uniroma2.art.semanticturkey.services.STServiceAdapter
it.uniroma2.art.semanticturkey.services.core.UsersGroups
- All Implemented Interfaces:
NewerNewStyleService
,STService
-
Field Summary
Fields inherited from class it.uniroma2.art.semanticturkey.services.STServiceAdapter
applicationEventPublisher, cfManager, exptManager, stServiceContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addOwnedSchemeToGroup
(String projectName, org.eclipse.rdf4j.model.IRI groupIri, org.eclipse.rdf4j.model.IRI scheme) void
assignGroupToUser
(String projectName, String email, org.eclipse.rdf4j.model.IRI groupIri) com.fasterxml.jackson.databind.node.ObjectNode
createGroup
(String shortName, String fullName, String description, String webPage, String logoUrl, org.eclipse.rdf4j.model.IRI iri) Creates a new users groupvoid
deleteGroup
(org.eclipse.rdf4j.model.IRI groupIri) com.fasterxml.jackson.databind.JsonNode
getGroup
(org.eclipse.rdf4j.model.IRI groupIri) Returns the description of the group identified by the idcom.fasterxml.jackson.databind.JsonNode
getProjectGroupBinding
(String projectName, org.eclipse.rdf4j.model.IRI groupIri) com.fasterxml.jackson.databind.JsonNode
Returns all the groupsvoid
removeGroupFromUser
(String projectName, String email) Remove the group assigned to the user in the given projectvoid
removeOwnedSchemeFromGroup
(String projectName, org.eclipse.rdf4j.model.IRI groupIri, org.eclipse.rdf4j.model.IRI scheme) void
setGroupLimitationsToUser
(String projectName, String email, org.eclipse.rdf4j.model.IRI groupIri, boolean limitations) Changes the application of the limitations of a group in a user-project bindingcom.fasterxml.jackson.databind.node.ObjectNode
updateGroupDescription
(org.eclipse.rdf4j.model.IRI groupIri, String description) com.fasterxml.jackson.databind.node.ObjectNode
updateGroupFullName
(org.eclipse.rdf4j.model.IRI groupIri, String fullName) com.fasterxml.jackson.databind.node.ObjectNode
updateGroupLogoUrl
(org.eclipse.rdf4j.model.IRI groupIri, String logoUrl) com.fasterxml.jackson.databind.node.ObjectNode
updateGroupShortName
(org.eclipse.rdf4j.model.IRI groupIri, String shortName) com.fasterxml.jackson.databind.node.ObjectNode
updateGroupWebPage
(org.eclipse.rdf4j.model.IRI groupIri, String webPage) Methods inherited from class it.uniroma2.art.semanticturkey.services.STServiceAdapter
addValue, checkNotLocallyDefined, createQueryBuilder, generateIRI, generateNatureSPARQLSelectPart, generateNatureSPARQLWherePart, generateResourceWithCustomConstructor, getCodaLexModeForSearchFromLexicalizationModel, getDeleteGraph, getGraphFromNature, getInitializedCodaCore, getManagedConnection, getMetadataGraph, getOptionalProject, getPlatformTransactionManager, getProject, getRepository, getRoleFromNature, getUserNamedGraphs, getWorkingGraph, instantiateSearchStrategy, instantiateSearchStrategy, parseReference, publishResourceDeleted, publishResourceDeleted, removeReifiedValue, retrieveResources, shutDownCodaCore, updateTriplePredicate
-
Constructor Details
-
UsersGroups
public UsersGroups()
-
-
Method Details
-
listGroups
Returns all the groups- Returns:
-
getGroup
@STServiceOperation public com.fasterxml.jackson.databind.JsonNode getGroup(org.eclipse.rdf4j.model.IRI groupIri) Returns the description of the group identified by the id- Returns:
-
createGroup
@PreAuthorize("@auth.isAdmin()") @STServiceOperation(method=POST) public com.fasterxml.jackson.databind.node.ObjectNode createGroup(String shortName, @Optional String fullName, @Optional String description, @Optional String webPage, @Optional String logoUrl, @Optional org.eclipse.rdf4j.model.IRI iri) throws UsersGroupException, ProjectAccessException, ProjectBindingException Creates a new users group- Parameters:
shortName
-fullName
-description
-webPage
-logoUrl
-iri
-- Throws:
UsersGroupException
ProjectBindingException
ProjectAccessException
-
updateGroupShortName
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAdmin()") public com.fasterxml.jackson.databind.node.ObjectNode updateGroupShortName(org.eclipse.rdf4j.model.IRI groupIri, String shortName) throws UsersGroupException - Throws:
UsersGroupException
-
updateGroupFullName
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAdmin()") public com.fasterxml.jackson.databind.node.ObjectNode updateGroupFullName(org.eclipse.rdf4j.model.IRI groupIri, String fullName) throws UsersGroupException - Throws:
UsersGroupException
-
updateGroupDescription
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAdmin()") public com.fasterxml.jackson.databind.node.ObjectNode updateGroupDescription(org.eclipse.rdf4j.model.IRI groupIri, String description) throws UsersGroupException - Throws:
UsersGroupException
-
updateGroupWebPage
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAdmin()") public com.fasterxml.jackson.databind.node.ObjectNode updateGroupWebPage(org.eclipse.rdf4j.model.IRI groupIri, String webPage) throws UsersGroupException - Throws:
UsersGroupException
-
updateGroupLogoUrl
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAdmin()") public com.fasterxml.jackson.databind.node.ObjectNode updateGroupLogoUrl(org.eclipse.rdf4j.model.IRI groupIri, String logoUrl) throws UsersGroupException - Throws:
UsersGroupException
-
deleteGroup
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAdmin()") public void deleteGroup(org.eclipse.rdf4j.model.IRI groupIri) throws Exception - Throws:
Exception
-
assignGroupToUser
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'pm(project, group)\', \'U\')") public void assignGroupToUser(String projectName, String email, org.eclipse.rdf4j.model.IRI groupIri) throws ProjectBindingException, InvalidProjectNameException, ProjectInexistentException, ProjectAccessException, UserException -
setGroupLimitationsToUser
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'pm(project, group)\', \'U\')") public void setGroupLimitationsToUser(String projectName, String email, org.eclipse.rdf4j.model.IRI groupIri, boolean limitations) throws ProjectBindingException, InvalidProjectNameException, ProjectInexistentException, ProjectAccessException, UserException Changes the application of the limitations of a group in a user-project binding- Parameters:
projectName
-email
-groupIri
-limitations
-- Throws:
ProjectBindingException
InvalidProjectNameException
ProjectInexistentException
ProjectAccessException
UserException
-
removeGroupFromUser
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'pm(project, group)\', \'U\')") public void removeGroupFromUser(String projectName, String email) throws ProjectBindingException, InvalidProjectNameException, ProjectInexistentException, ProjectAccessException, UserException Remove the group assigned to the user in the given project- Parameters:
projectName
-email
-- Throws:
ProjectBindingException
InvalidProjectNameException
ProjectInexistentException
ProjectAccessException
UserException
-
addOwnedSchemeToGroup
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'pm(project, group)\', \'U\')") public void addOwnedSchemeToGroup(String projectName, org.eclipse.rdf4j.model.IRI groupIri, org.eclipse.rdf4j.model.IRI scheme) throws ProjectBindingException, InvalidProjectNameException, ProjectInexistentException, ProjectAccessException - Parameters:
projectName
-groupIri
-scheme
-- Throws:
ProjectBindingException
InvalidProjectNameException
ProjectInexistentException
ProjectAccessException
-
removeOwnedSchemeFromGroup
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'pm(project, group)\', \'U\')") public void removeOwnedSchemeFromGroup(String projectName, org.eclipse.rdf4j.model.IRI groupIri, org.eclipse.rdf4j.model.IRI scheme) throws ProjectBindingException, InvalidProjectNameException, ProjectInexistentException, ProjectAccessException - Parameters:
projectName
-groupIri
-scheme
-- Throws:
ProjectBindingException
InvalidProjectNameException
ProjectInexistentException
ProjectAccessException
-
getProjectGroupBinding
@STServiceOperation public com.fasterxml.jackson.databind.JsonNode getProjectGroupBinding(String projectName, org.eclipse.rdf4j.model.IRI groupIri) throws ProjectBindingException, InvalidProjectNameException, ProjectInexistentException, ProjectAccessException - Throws:
ProjectBindingException
org.json.JSONException
ProjectAccessException
ProjectInexistentException
InvalidProjectNameException
STPropertyAccessException
-