aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-rest/archiva-rest-api
diff options
context:
space:
mode:
Diffstat (limited to 'archiva-modules/archiva-web/archiva-rest/archiva-rest-api')
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/v2/BeanInformation.java13
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/v2/CacheConfiguration.java2
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/v2/SecurityConfigurationService.java13
3 files changed, 21 insertions, 7 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/v2/BeanInformation.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/v2/BeanInformation.java
index 2185a6f28..6922d34b5 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/v2/BeanInformation.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/v2/BeanInformation.java
@@ -34,6 +34,19 @@ public class BeanInformation implements Serializable
String defaultDescription;
boolean readonly;
+ public BeanInformation( )
+ {
+ }
+
+ public BeanInformation( String id, String displayName, String descriptionKey, String defaultDescription, boolean readonly )
+ {
+ this.id = id;
+ this.displayName = displayName;
+ this.descriptionKey = descriptionKey;
+ this.defaultDescription = defaultDescription;
+ this.readonly = readonly;
+ }
+
@Schema(description = "The identifier")
public String getId( )
{
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/v2/CacheConfiguration.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/v2/CacheConfiguration.java
index 5f062f089..2b07e57f6 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/v2/CacheConfiguration.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/v2/CacheConfiguration.java
@@ -58,7 +58,7 @@ public class CacheConfiguration
// no op
}
- public CacheConfiguration of( org.apache.archiva.admin.model.beans.CacheConfiguration beanConfiguration ) {
+ public static CacheConfiguration of( org.apache.archiva.admin.model.beans.CacheConfiguration beanConfiguration ) {
CacheConfiguration newConfig = new CacheConfiguration( );
newConfig.setMaxEntriesInMemory( beanConfiguration.getMaxElementsInMemory() );
newConfig.setMaxEntriesOnDisk( beanConfiguration.getMaxElementsOnDisk() );
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/v2/SecurityConfigurationService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/v2/SecurityConfigurationService.java
index 59c57c53e..5292c0e91 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/v2/SecurityConfigurationService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/v2/SecurityConfigurationService.java
@@ -77,6 +77,7 @@ public interface SecurityConfigurationService
SecurityConfiguration getConfiguration()
throws ArchivaRestServiceException;
+ @Path( "config/properties" )
@GET
@Produces( { APPLICATION_JSON } )
@RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
@@ -85,7 +86,7 @@ public interface SecurityConfigurationService
@Parameter(name = "q", description = "Search term"),
@Parameter(name = "offset", description = "The offset of the first element returned"),
@Parameter(name = "limit", description = "Maximum number of items to return in the response"),
- @Parameter(name = "orderBy", description = "List of attribute used for sorting (user_id, fullName, email, created"),
+ @Parameter(name = "orderBy", description = "List of attribute used for sorting (key, value)"),
@Parameter(name = "order", description = "The sort order. Either ascending (asc) or descending (desc)")
},
security = {
@@ -105,10 +106,10 @@ public interface SecurityConfigurationService
PagedResult<PropertyEntry> getConfigurationProperties( @QueryParam("q") @DefaultValue( "" ) String searchTerm,
@QueryParam( "offset" ) @DefaultValue( "0" ) Integer offset,
@QueryParam( "limit" ) @DefaultValue( value = DEFAULT_PAGE_LIMIT ) Integer limit,
- @QueryParam( "orderBy") @DefaultValue( "id" ) List<String> orderBy,
+ @QueryParam( "orderBy") @DefaultValue( "key" ) List<String> orderBy,
@QueryParam("order") @DefaultValue( "asc" ) String order ) throws ArchivaRestServiceException;
- @Path("ldap")
+ @Path("config/ldap")
@GET
@Produces({ MediaType.APPLICATION_JSON })
@RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
@@ -129,7 +130,7 @@ public interface SecurityConfigurationService
LdapConfiguration getLdapConfiguration( ) throws ArchivaRestServiceException;
- @Path("user/cache")
+ @Path("config/cache")
@GET
@Produces({ MediaType.APPLICATION_JSON })
@RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
@@ -149,7 +150,7 @@ public interface SecurityConfigurationService
)
CacheConfiguration getCacheConfiguration( ) throws ArchivaRestServiceException;
- @Path("user/managers")
+ @Path("user_managers")
@GET
@Produces({ MediaType.APPLICATION_JSON })
@RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
@@ -170,7 +171,7 @@ public interface SecurityConfigurationService
List<BeanInformation> getAvailableUserManagers()
throws ArchivaRestServiceException;
- @Path("rbac/managers")
+ @Path("rbac_managers")
@GET
@Produces({ MediaType.APPLICATION_JSON })
@RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)