Class UsersGroupsManager
java.lang.Object
it.uniroma2.art.semanticturkey.user.UsersGroupsManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
createGroup
(UsersGroup group) add a groupstatic void
deleteGroup
(UsersGroup group) Delete the user with the given emailstatic Collection<File>
Returns all the user folders under/users/ static UsersGroup
getGroupByIRI
(org.eclipse.rdf4j.model.IRI iri) Returns the group with the given IRI.static UsersGroup
getGroupByShortName
(String name) Returns the group with the given name.static File
getGroupFolder
(UsersGroup group) Returns the group folder under/groups/ for the given group static Collection<UsersGroup>
Returns a list of all the groupsstatic void
Loads all the groups into the repositorystatic UsersGroup
updateDescription
(UsersGroup group, String description) Updates the description of the given group and returns it updatedstatic UsersGroup
updateFullName
(UsersGroup group, String fullName) Updates the fullName of the given group and returns it updatedstatic UsersGroup
updateLogoUrl
(UsersGroup group, String logoUrl) Updates the logoUrl of the given group and returns it updatedstatic UsersGroup
updateShortName
(UsersGroup group, String shortName) Updates the shortName of the given group and returns it updatedstatic UsersGroup
updateWebPage
(UsersGroup group, String webPage) Updates the webPage of the given group and returns it updated
-
Constructor Details
-
UsersGroupsManager
public UsersGroupsManager()
-
-
Method Details
-
loadGroups
public static void loadGroups() throws org.eclipse.rdf4j.rio.RDFParseException, org.eclipse.rdf4j.repository.RepositoryException, IOExceptionLoads all the groups into the repository- Throws:
IOException
org.eclipse.rdf4j.repository.RepositoryException
org.eclipse.rdf4j.rio.RDFParseException
-
createGroup
add a group- Parameters:
group
-- Throws:
UserException
IOException
UsersGroupException
-
listGroups
Returns a list of all the groups- Returns:
-
getGroupByIRI
Returns the group with the given IRI. Null if there is no group with the given IRI.- Parameters:
iri
-- Returns:
-
getGroupByShortName
Returns the group with the given name. Null if there is no group with the given name.- Parameters:
name
-- Returns:
-
deleteGroup
Delete the user with the given email- Parameters:
group
-- Throws:
IOException
-
updateShortName
public static UsersGroup updateShortName(UsersGroup group, String shortName) throws UsersGroupException Updates the shortName of the given group and returns it updated- Parameters:
group
-shortName
-- Returns:
- Throws:
IOException
UsersGroupException
-
updateFullName
public static UsersGroup updateFullName(UsersGroup group, String fullName) throws UsersGroupException Updates the fullName of the given group and returns it updated- Parameters:
group
-fullName
-- Returns:
- Throws:
IOException
UsersGroupException
-
updateDescription
public static UsersGroup updateDescription(UsersGroup group, String description) throws UsersGroupException Updates the description of the given group and returns it updated- Parameters:
group
-description
-- Returns:
- Throws:
IOException
UsersGroupException
-
updateWebPage
Updates the webPage of the given group and returns it updated- Parameters:
group
-webPage
-- Returns:
- Throws:
IOException
UsersGroupException
-
updateLogoUrl
Updates the logoUrl of the given group and returns it updated- Parameters:
group
-logoUrl
-- Returns:
- Throws:
IOException
UsersGroupException
-
getGroupFolder
Returns the group folder under/groups/ for the given group - Parameters:
group
-- Returns:
-
getAllGroupFolders
Returns all the user folders under/users/ - Returns:
-