Class WorkspaceRepository
- java.lang.Object
-
- de.narimo.georepo.server.repository.WorkspaceRepository
-
public class WorkspaceRepository extends Object
-
-
Constructor Summary
Constructors Constructor Description WorkspaceRepository()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidchangeWorkspacePermission(int userid, String workspace, String permission)static List<Integer>getWorkspaceAdminIds(String workspace)static intgetWorkspaceCount(int userId, String workspace, String permission)static StringgetWorkspacePermissionType(int userId, String workspace)Returns the type of permission for a specific workspace.static Map<String,String>getWorkspaces(int userId, boolean includeDiffWorkspaces)static booleanisWorkspaceSecretValid(String workspace, String workspaceSecret)Confirm that a given secrect conforms with the server side workspace secret.
-
-
-
Method Detail
-
changeWorkspacePermission
public static void changeWorkspacePermission(int userid, String workspace, String permission) throws SQLException, IOException- Throws:
SQLExceptionIOException
-
getWorkspaceCount
public static int getWorkspaceCount(int userId, String workspace, String permission)
-
getWorkspacePermissionType
public static String getWorkspacePermissionType(int userId, String workspace)
Returns the type of permission for a specific workspace.- Parameters:
userId-workspace-- Returns:
-
isWorkspaceSecretValid
public static boolean isWorkspaceSecretValid(String workspace, String workspaceSecret)
Confirm that a given secrect conforms with the server side workspace secret. Used e.g. to authorize workspace registration.- Parameters:
workspace-workspaceSecret-- Returns:
-
-