aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-12-28 21:40:29 +0000
committerOlivier Lamy <olamy@apache.org>2012-12-28 21:40:29 +0000
commit46a1c6516952db6c81e8bf9102aa1a055cc90a63 (patch)
treec3010bc786cb13f22eccd6bf8025521a5f07f8d3 /archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src
parentaa482e9b9bef10d2cebf4e00357f38a8c0324ed2 (diff)
downloadarchiva-46a1c6516952db6c81e8bf9102aa1a055cc90a63.tar.gz
archiva-46a1c6516952db6c81e8bf9102aa1a055cc90a63.zip
[MRM-526] add services to configure the cache
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1426642 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src')
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ArchivaRuntimeConfigurationService.java53
1 files changed, 53 insertions, 0 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ArchivaRuntimeConfigurationService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ArchivaRuntimeConfigurationService.java
new file mode 100644
index 000000000..f3f62740a
--- /dev/null
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ArchivaRuntimeConfigurationService.java
@@ -0,0 +1,53 @@
+package org.apache.archiva.rest.api.services;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.archiva.admin.model.beans.ArchivaRuntimeConfiguration;
+import org.apache.archiva.redback.authorization.RedbackAuthorization;
+import org.apache.archiva.security.common.ArchivaRoleConstants;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+/**
+ * @author Olivier Lamy
+ * @since 1.4-M4
+ */
+@Path( "/archivaRuntimeConfigurationService/" )
+public interface ArchivaRuntimeConfigurationService
+{
+ @Path( "archivaRuntimeConfiguration" )
+ @GET
+ @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
+ @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
+ ArchivaRuntimeConfiguration getArchivaRuntimeConfiguration()
+ throws ArchivaRestServiceException;
+
+ @Path( "archivaRuntimeConfiguration" )
+ @PUT
+ @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
+ @Consumes( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
+ @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
+ Boolean updateArchivaRuntimeConfiguration( ArchivaRuntimeConfiguration archivaRuntimeConfiguration )
+ throws ArchivaRestServiceException;
+}