Interface TeamSpaceService
- All Known Implementing Classes:
TeamSpaceServiceImpl
public interface TeamSpaceService
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if aTeamSpaceAppwith the given id existsvoidvoidassertIsUser(TeamSpace teamSpace) Creates a newTeamSpacewith the current user as owner.createTeamSpace(User user) voidforceRemove(TeamSpace teamSpace) Returns aCollectionof all existingTeamSpacesgetAppDefinitionById(String appId) Retrieves the primaryTeamSpaceof the current user if this is explicitely set.getMemberFor(TeamSpace teamSpace, AbstractUserManagerNode folk) Returns the current user's ownedTeamSpacesgetOwnedTeamSpaces(User user) Retrieves the primaryTeamSpaceof the current user.getPrimarySpace(User user) getTeamSpaceById(Long id) getTeamSpaceByName(String name) Returns the current user'sTeamSpacesgetTeamSpaces(User user) Returns theTeamSpaces that can be accessed by a given folkgetTeamSpacesByName(String name) booleanhasRole(TeamSpace teamSpace, TeamSpaceRole roleToHave) Tests if the current user has the givenTeamSpaceRoleon the givenTeamSpacebooleanhasRole(User user, TeamSpace teamSpace, TeamSpaceRole roleToHave) installTeamSpaceApp(TeamSpace teamSpace, String appId) Creates a newTeamSpaceAppinstance of the given typebooleanTests if the current user is an admin of the givenTeamSpacebooleanbooleanTests if the current user is a globalTeamSpaceadminbooleanisGlobalTsAdmin(User user) booleanTests if the current user is a guest in the givenTeamSpacebooleanbooleanTests if the current user is a manager of the givenTeamSpacebooleanbooleanchecks if the current user owns the TeamSpacebooleanTests if the current user is a user of the givenTeamSpacebooleanbooleanTests if the current user has the right to access the givenTeamSpacebooleanMerges the givenTeamSpacewith the representation in the database and returns the result.merge(TeamSpaceApp app) Merges the givenTeamSpaceAppwith the representation in the database and returns the result.merge(TeamSpaceMember member) Merges the givenTeamSpaceMemberwith the representation in the database and returns the result.voidPersists the givenTeamSpacevoidpersist(TeamSpaceApp teamSpaceApp) Persists the givenTeamSpaceAppvoidpersist(TeamSpaceMember tsMember) Persists the givenTeamSpaceMembervoidprovideAccess(TeamSpace teamSpace, User user, TeamSpaceRole role) voidRemoves the givenTeamSpacefrom the databasevoidremove(TeamSpaceApp app) Removes the givenTeamSpaceAppfrom the databasevoidremove(TeamSpaceMember member) Removes the givenTeamSpaceMemberfrom the databasevoidsetInstalledApps(TeamSpace teamSpace, Collection<String> appIds) voidsetPrimarySpace(TeamSpace teamSpace) Sets the primaryTeamSpacefor the current user
-
Field Details
-
USER_PROPERTY_PRIMARY_TEAMSPACE
- See Also:
-
-
Method Details
-
getTeamSpaceById
-
getPrimarySpace
TeamSpace getPrimarySpace()Retrieves the primaryTeamSpaceof the current user.- Returns:
- The primary
TeamSpaceof the current user.
-
getExplicitPrimarySpace
TeamSpace getExplicitPrimarySpace()Retrieves the primaryTeamSpaceof the current user if this is explicitely set.- Returns:
- The primary
TeamSpaceof the current user if this is explicitely set.
-
getPrimarySpace
-
setPrimarySpace
Sets the primaryTeamSpacefor the current user- Parameters:
teamSpace- The new primaryTeamSpace
-
createTeamSpace
TeamSpace createTeamSpace()Creates a newTeamSpacewith the current user as owner.- Returns:
- The newly created
TeamSpace
-
createTeamSpace
-
getTeamSpaces
Collection<TeamSpace> getTeamSpaces()Returns the current user'sTeamSpaces- Returns:
- A
Collectionof the current user'sTeamSpaces
-
getTeamSpaces
Returns theTeamSpaces that can be accessed by a given folk- Parameters:
user- TheUser- Returns:
- A
CollectionofTeamSpaces
-
getOwnedTeamSpaces
Collection<TeamSpace> getOwnedTeamSpaces()Returns the current user's ownedTeamSpaces- Returns:
- A
Collectionof theTeamSpaceowned by the current user
-
getOwnedTeamSpaces
- Parameters:
user- TheUser- Returns:
- A
Collectionof theTeamSpaces owned by the givenUser
-
persist
Persists the givenTeamSpace- Parameters:
teamSpace- TheTeamSpaceto persist
-
persist
Persists the givenTeamSpaceMember- Parameters:
tsMember- TheTeamSpaceMemberto persist
-
persist
Persists the givenTeamSpaceApp- Parameters:
teamSpaceApp- TheTeamSpaceAppto persist
-
merge
Merges the givenTeamSpacewith the representation in the database and returns the result. -
merge
Merges the givenTeamSpaceMemberwith the representation in the database and returns the result.- Parameters:
member- TheTeamSpaceMemberwith the new data- Returns:
- The merged
TeamSpaceMember
-
merge
Merges the givenTeamSpaceAppwith the representation in the database and returns the result.- Parameters:
app- TheTeamSpaceAppwith the new data- Returns:
- The merged
TeamSpaceApp
-
remove
Removes the givenTeamSpacefrom the database- Parameters:
teamSpace- TheTeamSpaceto be removed
-
remove
Removes the givenTeamSpaceMemberfrom the database- Parameters:
member- TheTeamSpaceMemberto be removed
-
remove
Removes the givenTeamSpaceAppfrom the database- Parameters:
app- TheTeamSpaceAppto be removed
-
appExists
Tests if aTeamSpaceAppwith the given id exists- Parameters:
appId- TheTeamSpaceAppid- Returns:
- true if the
TeamSpaceAppexists; false otherwise
-
installTeamSpaceApp
Creates a newTeamSpaceAppinstance of the given type- Parameters:
appId- The type (TeamSpaceAppid)- Returns:
- The newly created
TeamSpaceApp
-
getAllTeamSpaces
Collection<TeamSpace> getAllTeamSpaces()Returns aCollectionof all existingTeamSpaces- Returns:
- A
CollectionofTeamSpaces
-
isGlobalTsAdmin
boolean isGlobalTsAdmin()Tests if the current user is a globalTeamSpaceadmin- Returns:
- true if the current user is a global
TeamSpaceadmin; false otherwise
-
isGlobalTsAdmin
-
isManager
Tests if the current user is a manager of the givenTeamSpace -
isManager
-
isGuest
Tests if the current user is a guest in the givenTeamSpace -
isGuest
-
isUser
Tests if the current user is a user of the givenTeamSpace -
isUser
-
isAdmin
Tests if the current user is an admin of the givenTeamSpace -
isAdmin
-
hasRole
- Parameters:
user- TheUserteamSpace- TheTeamSpaceroleToHave- TheTeamSpaceRoleto test- Returns:
- true if the
Userhas theTeamSpaceRole; false otherwise
-
hasRole
Tests if the current user has the givenTeamSpaceRoleon the givenTeamSpace- Parameters:
teamSpace- TheTeamSpaceroleToHave- TheTeamSpaceRoleto test- Returns:
- true if the current user has the
TeamSpaceRole; false otherwise
-
mayAccess
Tests if the current user has the right to access the givenTeamSpace -
mayAccess
-
getTeamSpaceByName
-
getTeamSpacesByName
-
provideAccess
-
setInstalledApps
-
getAppDefinitionById
-
getMemberFor
-
forceRemove
-
getRole
-
getRole
-
isOwner
checks if the current user owns the TeamSpace- Parameters:
teamSpace-
-
getTeamSpacesWithMemberFor
-
assertAccess
-
assertIsUser
-
isFileUploadEnabled
Boolean isFileUploadEnabled() -
getMaxUploadFileSizeBytes
Long getMaxUploadFileSizeBytes() -
getFileUploadEndingWhiteList
-