public interface TeamSpaceService
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
USER_PROPERTY_PRIMARY_TEAMSPACE |
| Modifier and Type | Method and Description |
|---|---|
boolean |
appExists(java.lang.String appId)
Tests if a
TeamSpaceApp with the given id exists |
void |
assertAccess(TeamSpace ts) |
void |
assertIsUser(TeamSpace teamSpace) |
TeamSpace |
createTeamSpace()
Creates a new
TeamSpace with the current user as owner. |
TeamSpace |
createTeamSpace(User user)
|
void |
forceRemove(TeamSpace teamSpace) |
java.util.Collection<TeamSpace> |
getAllTeamSpaces()
Returns a
Collection of all existing TeamSpaces |
TeamSpaceAppDefinition |
getAppDefinitionById(java.lang.String appId) |
TeamSpace |
getExplicitPrimarySpace()
Retrieves the primary
TeamSpace of the current user if this is
explicitely set. |
java.util.List<java.lang.String> |
getFileUploadEndingWhiteList() |
java.lang.Long |
getMaxUploadFileSizeBytes() |
TeamSpaceMember |
getMemberFor(TeamSpace teamSpace,
AbstractUserManagerNode folk) |
java.util.Collection<TeamSpace> |
getOwnedTeamSpaces()
Returns the current user's owned
TeamSpaces |
java.util.Collection<TeamSpace> |
getOwnedTeamSpaces(User user)
|
TeamSpace |
getPrimarySpace()
Retrieves the primary
TeamSpace of the current user. |
TeamSpace |
getPrimarySpace(User user)
|
TeamSpaceRole |
getRole(TeamSpace teamSpace) |
TeamSpaceRole |
getRole(User user,
TeamSpace teamSpace) |
TeamSpace |
getTeamSpaceById(java.lang.Long id) |
TeamSpace |
getTeamSpaceByName(java.lang.String name) |
java.util.Collection<TeamSpace> |
getTeamSpaces()
Returns the current user's
TeamSpaces |
java.util.Collection<TeamSpace> |
getTeamSpaces(User user)
Returns the
TeamSpaces that can be accessed by a given folk |
java.util.Collection<TeamSpace> |
getTeamSpacesByName(java.lang.String name) |
java.util.Collection<TeamSpace> |
getTeamSpacesWithMemberFor(AbstractUserManagerNode folk) |
boolean |
hasRole(TeamSpace teamSpace,
TeamSpaceRole roleToHave)
Tests if the current user has the given
TeamSpaceRole on the given
TeamSpace |
boolean |
hasRole(User user,
TeamSpace teamSpace,
TeamSpaceRole roleToHave)
|
TeamSpaceApp |
installTeamSpaceApp(TeamSpace teamSpace,
java.lang.String appId)
Creates a new
TeamSpaceApp instance of the given type |
boolean |
isAdmin(TeamSpace teamSpace)
Tests if the current user is an admin of the given
TeamSpace |
boolean |
isAdmin(User user,
TeamSpace teamSpace)
|
java.lang.Boolean |
isFileUploadEnabled() |
boolean |
isGlobalTsAdmin()
Tests if the current user is a global
TeamSpace admin |
boolean |
isGlobalTsAdmin(User user)
|
boolean |
isGuest(TeamSpace teamSpace)
Tests if the current user is a guest in the given
TeamSpace |
boolean |
isGuest(User folk,
TeamSpace teamSpace)
|
boolean |
isManager(TeamSpace teamSpace)
Tests if the current user is a manager of the given
TeamSpace |
boolean |
isManager(User user,
TeamSpace teamSpace)
|
boolean |
isOwner(TeamSpace teamSpace)
checks if the current user owns the TeamSpace
|
boolean |
isUser(TeamSpace teamSpace)
Tests if the current user is a user of the given
TeamSpace |
boolean |
isUser(User folk,
TeamSpace teamSpace)
|
boolean |
mayAccess(TeamSpace teamSpace)
Tests if the current user has the right to access the given
TeamSpace |
boolean |
mayAccess(User user,
TeamSpace teamSpace)
|
TeamSpace |
merge(TeamSpace teamSpace)
Merges the given
TeamSpace with the representation in the database
and returns the result. |
TeamSpaceApp |
merge(TeamSpaceApp app)
Merges the given
TeamSpaceApp with the representation in the database
and returns the result. |
TeamSpaceMember |
merge(TeamSpaceMember member)
Merges the given
TeamSpaceMember with the representation in the
database and returns the result. |
void |
persist(TeamSpace teamSpace)
Persists the given
TeamSpace |
void |
persist(TeamSpaceApp teamSpaceApp)
Persists the given
TeamSpaceApp |
void |
persist(TeamSpaceMember tsMember)
Persists the given
TeamSpaceMember |
void |
provideAccess(TeamSpace teamSpace,
User user,
TeamSpaceRole role) |
void |
remove(TeamSpace teamSpace)
Removes the given
TeamSpace from the database |
void |
remove(TeamSpaceApp app)
Removes the given
TeamSpaceApp from the database |
void |
remove(TeamSpaceMember member)
Removes the given
TeamSpaceMember from the database |
void |
setInstalledApps(TeamSpace teamSpace,
java.util.Collection<java.lang.String> appIds) |
void |
setPrimarySpace(TeamSpace teamSpace)
Sets the primary
TeamSpace for the current user |
static final java.lang.String USER_PROPERTY_PRIMARY_TEAMSPACE
TeamSpace getTeamSpaceById(java.lang.Long id)
TeamSpace getPrimarySpace()
TeamSpace of the current user.TeamSpace of the current user.TeamSpace getExplicitPrimarySpace()
TeamSpace of the current user if this is
explicitely set.TeamSpace of the current user if this is
explicitely set.void setPrimarySpace(TeamSpace teamSpace)
TeamSpace for the current userteamSpace - The new primary TeamSpaceTeamSpace createTeamSpace()
TeamSpace with the current user as owner.TeamSpacejava.util.Collection<TeamSpace> getTeamSpaces()
TeamSpacesCollection of the current user's TeamSpacesjava.util.Collection<TeamSpace> getTeamSpaces(User user)
TeamSpaces that can be accessed by a given folkjava.util.Collection<TeamSpace> getOwnedTeamSpaces()
TeamSpacesCollection of the TeamSpace owned by the current
uservoid persist(TeamSpace teamSpace)
TeamSpaceteamSpace - The TeamSpace to persistvoid persist(TeamSpaceMember tsMember)
TeamSpaceMembertsMember - The TeamSpaceMember to persistvoid persist(TeamSpaceApp teamSpaceApp)
TeamSpaceAppteamSpaceApp - The TeamSpaceApp to persistTeamSpace merge(TeamSpace teamSpace)
TeamSpace with the representation in the database
and returns the result.TeamSpaceMember merge(TeamSpaceMember member)
TeamSpaceMember with the representation in the
database and returns the result.member - The TeamSpaceMember with the new dataTeamSpaceMemberTeamSpaceApp merge(TeamSpaceApp app)
TeamSpaceApp with the representation in the database
and returns the result.app - The TeamSpaceApp with the new dataTeamSpaceAppvoid remove(TeamSpace teamSpace)
TeamSpace from the databaseteamSpace - The TeamSpace to be removedvoid remove(TeamSpaceMember member)
TeamSpaceMember from the databasemember - The TeamSpaceMember to be removedvoid remove(TeamSpaceApp app)
TeamSpaceApp from the databaseapp - The TeamSpaceApp to be removedboolean appExists(java.lang.String appId)
TeamSpaceApp with the given id existsappId - The TeamSpaceApp idTeamSpaceApp exists; false otherwiseTeamSpaceApp installTeamSpaceApp(TeamSpace teamSpace, java.lang.String appId)
TeamSpaceApp instance of the given typeappId - The type (TeamSpaceApp id)TeamSpaceAppjava.util.Collection<TeamSpace> getAllTeamSpaces()
Collection of all existing TeamSpacesCollection of TeamSpacesboolean isGlobalTsAdmin()
TeamSpace adminTeamSpace admin; false
otherwiseboolean isGlobalTsAdmin(User user)
boolean isManager(TeamSpace teamSpace)
TeamSpaceboolean isGuest(TeamSpace teamSpace)
TeamSpaceboolean isUser(TeamSpace teamSpace)
TeamSpaceboolean isAdmin(TeamSpace teamSpace)
TeamSpaceboolean hasRole(User user, TeamSpace teamSpace, TeamSpaceRole roleToHave)
user - The UserteamSpace - The TeamSpaceroleToHave - The TeamSpaceRole to testUser has the TeamSpaceRole; false
otherwiseboolean hasRole(TeamSpace teamSpace, TeamSpaceRole roleToHave)
TeamSpaceRole on the given
TeamSpaceteamSpace - The TeamSpaceroleToHave - The TeamSpaceRole to testTeamSpaceRole; false
otherwiseboolean mayAccess(TeamSpace teamSpace)
TeamSpaceTeamSpace getTeamSpaceByName(java.lang.String name)
java.util.Collection<TeamSpace> getTeamSpacesByName(java.lang.String name)
void provideAccess(TeamSpace teamSpace, User user, TeamSpaceRole role)
void setInstalledApps(TeamSpace teamSpace, java.util.Collection<java.lang.String> appIds)
TeamSpaceAppDefinition getAppDefinitionById(java.lang.String appId)
TeamSpaceMember getMemberFor(TeamSpace teamSpace, AbstractUserManagerNode folk)
void forceRemove(TeamSpace teamSpace)
TeamSpaceRole getRole(TeamSpace teamSpace)
TeamSpaceRole getRole(User user, TeamSpace teamSpace)
boolean isOwner(TeamSpace teamSpace)
teamSpace - java.util.Collection<TeamSpace> getTeamSpacesWithMemberFor(AbstractUserManagerNode folk)
void assertAccess(TeamSpace ts)
void assertIsUser(TeamSpace teamSpace)
java.lang.Boolean isFileUploadEnabled()
java.lang.Long getMaxUploadFileSizeBytes()
java.util.List<java.lang.String> getFileUploadEndingWhiteList()