Package de.narimo.georepo.server.api
Class WorkspaceController
- java.lang.Object
-
- de.narimo.georepo.server.api.WorkspaceController
-
@Provider @Path("/workspaces/{workspace}") public class WorkspaceController extends Object
-
-
Constructor Summary
Constructors Constructor Description WorkspaceController()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static javax.ws.rs.core.ResponsecheckWorkspacePermission(javax.ws.rs.core.SecurityContext sec, String workspace, InputStream body)Deprecated.static javax.ws.rs.core.ResponsedeleteWorkspace(javax.ws.rs.core.SecurityContext sec, javax.servlet.ServletContext ctx, String workspace)static javax.ws.rs.core.ResponsegetDiffWorkspace(javax.ws.rs.core.SecurityContext sec, String dataWorkspace, InputStream body)static javax.ws.rs.core.ResponsegetWorkspaceOWSSettings(javax.ws.rs.core.SecurityContext sec, javax.servlet.ServletContext ctx, String service, String workspace)static javax.ws.rs.core.ResponsegetWorkspacePermission(javax.ws.rs.core.SecurityContext sec, String workspace, InputStream body)Returns 200 OK when the workspace authorization filter confirmed, that we have read (=GET) permission for the requested workspace.static javax.ws.rs.core.ResponseregisterUserWorkspace(String workspace, javax.ws.rs.core.SecurityContext sec, javax.servlet.ServletContext ctx, InputStream body)static javax.ws.rs.core.ResponsesetWorkspaceOWSSettings1(javax.ws.rs.core.SecurityContext sec, javax.servlet.ServletContext ctx, String service, String workspace, InputStream body)Currently supports WMS and WFS settings.static voidsetWorkspacePermission(de.narimo.commons.dto.geometa.User admin, de.narimo.commons.dto.geometa.User user, String ws, String permission)Set a workspace permission.static javax.ws.rs.core.ResponsesetWorkspacePermissionEndpoint(javax.servlet.ServletContext ctx, javax.ws.rs.core.SecurityContext sec, String ws, String perm, InputStream body)Overwrite all current permission settings for the given workspace and user with the new permission.
-
-
-
Method Detail
-
checkWorkspacePermission
@Deprecated @GET @Path("") public static javax.ws.rs.core.Response checkWorkspacePermission(@Context javax.ws.rs.core.SecurityContext sec, @PathParam("workspace") String workspace, InputStream body)
Deprecated.Returns 200 OK when the workspace authorization filter confirmed, that we have read (=GET) permission for the requested workspace.- Parameters:
workspace-sec-body-- Returns:
-
registerUserWorkspace
@POST @Path("/register") public static javax.ws.rs.core.Response registerUserWorkspace(@PathParam("workspace") String workspace, @Context javax.ws.rs.core.SecurityContext sec, @Context javax.servlet.ServletContext ctx, InputStream body)
-
deleteWorkspace
@DELETE @Path("") public static javax.ws.rs.core.Response deleteWorkspace(@Context javax.ws.rs.core.SecurityContext sec, @Context javax.servlet.ServletContext ctx, @PathParam("workspace") String workspace) throws OperationNotSupportedException- Throws:
OperationNotSupportedException
-
getWorkspaceOWSSettings
@GET @Path("/services/{service}/settings") public static javax.ws.rs.core.Response getWorkspaceOWSSettings(@Context javax.ws.rs.core.SecurityContext sec, @Context javax.servlet.ServletContext ctx, @PathParam("service") String service, @PathParam("workspace") String workspace) throws Exception- Throws:
Exception
-
setWorkspaceOWSSettings1
@PUT @Path("/services/{service}/settings") public static javax.ws.rs.core.Response setWorkspaceOWSSettings1(@Context javax.ws.rs.core.SecurityContext sec, @Context javax.servlet.ServletContext ctx, @PathParam("service") String service, @PathParam("workspace") String workspace, InputStream body) throws ExceptionCurrently supports WMS and WFS settings.- Parameters:
sec-ctx-service-workspace-body-- Returns:
- Throws:
Exception
-
getWorkspacePermission
@GET @Path("/permissions") public static javax.ws.rs.core.Response getWorkspacePermission(@Context javax.ws.rs.core.SecurityContext sec, @PathParam("workspace") String workspace, InputStream body)Returns 200 OK when the workspace authorization filter confirmed, that we have read (=GET) permission for the requested workspace.- Parameters:
workspace-sec-body-- Returns:
-
setWorkspacePermissionEndpoint
@PUT @Path("/permissions/{permission}") public static javax.ws.rs.core.Response setWorkspacePermissionEndpoint(@Context javax.servlet.ServletContext ctx, @Context javax.ws.rs.core.SecurityContext sec, @PathParam("workspace") String ws, @PathParam("permission") String perm, InputStream body)Overwrite all current permission settings for the given workspace and user with the new permission. A user with admin permissions on the workspace is allowed to change permissions on the same workspace for other users.- Parameters:
ctx-ws-username-perm-- Returns:
- Throws:
SQLException
-
getDiffWorkspace
@GET @Path("/managed") public static javax.ws.rs.core.Response getDiffWorkspace(@Context javax.ws.rs.core.SecurityContext sec, @PathParam("workspace") String dataWorkspace, InputStream body)
-
setWorkspacePermission
public static void setWorkspacePermission(de.narimo.commons.dto.geometa.User admin, de.narimo.commons.dto.geometa.User user, String ws, String permission) throws IOException, SQLExceptionSet a workspace permission.- Parameters:
admin-user-ws-permission-- Throws:
IOExceptionSQLException
-
-