public static final String OPERATION_REPOSITORY_UPLOAD = "archiva-upload-repository"; | public static final String OPERATION_REPOSITORY_UPLOAD = "archiva-upload-repository"; | ||||
public static final String OPERATION_FILE_UPLOAD = "archiva-upload-file"; | |||||
public static final String OPERATION_REPOSITORY_DELETE = "archiva-delete-artifact"; | public static final String OPERATION_REPOSITORY_DELETE = "archiva-delete-artifact"; | ||||
public static final String OPERATION_MERGE_REPOSITORY = "archiva-merge-repository"; | public static final String OPERATION_MERGE_REPOSITORY = "archiva-merge-repository"; |
<name>archiva-upload-repository</name> | <name>archiva-upload-repository</name> | ||||
<description>Upload Archiva Repository</description> | <description>Upload Archiva Repository</description> | ||||
</operation> | </operation> | ||||
<operation> | |||||
<id>archiva-upload-file</id> | |||||
<name>archiva-upload-file</name> | |||||
<description>Upload File to Archiva</description> | |||||
</operation> | |||||
<operation> | <operation> | ||||
<id>archiva-access-repository</id> | <id>archiva-access-repository</id> | ||||
<name>archiva-access-repository</name> | <name>archiva-access-repository</name> | ||||
<operation>archiva-upload-repository</operation> | <operation>archiva-upload-repository</operation> | ||||
<resource>${resource}</resource> | <resource>${resource}</resource> | ||||
</permission> | </permission> | ||||
<permission> | |||||
<id>archiva-upload-file</id> | |||||
<name>Archiva Upload File to Archiva</name> | |||||
<operation>archiva-upload-file</operation> | |||||
<resource>global</resource> | |||||
</permission> | |||||
<permission> | <permission> | ||||
<id>archiva-view-audit-logs</id> | <id>archiva-view-audit-logs</id> | ||||
<name>Archiva View Audit Logs</name> | <name>Archiva View Audit Logs</name> |
@Path("metadata/{g}/{a}/{v}/{key}/{value}") | @Path("metadata/{g}/{a}/{v}/{key}/{value}") | ||||
@PUT | @PUT | ||||
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) | @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) | ||||
@RedbackAuthorization(noPermission = false, noRestriction = false, permissions = "archiva-add-metadata") | |||||
@RedbackAuthorization( permissions = "archiva-add-metadata", resource = "{repositoryId}") | |||||
ActionStatus addMetadata( @PathParam("g") String groupId, @PathParam("a") String artifactId, | ActionStatus addMetadata( @PathParam("g") String groupId, @PathParam("a") String artifactId, | ||||
@PathParam("v") String version, @PathParam("key") String key, @PathParam("value") String value, | @PathParam("v") String version, @PathParam("key") String key, @PathParam("value") String value, | ||||
@QueryParam("repositoryId") String repositoryId ) | @QueryParam("repositoryId") String repositoryId ) | ||||
@Path("metadata/{g}/{a}/{v}/{key}") | @Path("metadata/{g}/{a}/{v}/{key}") | ||||
@DELETE | @DELETE | ||||
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) | @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) | ||||
@RedbackAuthorization(noPermission = false, noRestriction = false, permissions = "archiva-add-metadata") | |||||
@RedbackAuthorization( permissions = "archiva-add-metadata", resource = "{repositoryId}") | |||||
ActionStatus deleteMetadata( @PathParam("g") String groupId, @PathParam("a") String artifactId, | ActionStatus deleteMetadata( @PathParam("g") String groupId, @PathParam("a") String artifactId, | ||||
@PathParam("v") String version, @PathParam("key") String key, | @PathParam("v") String version, @PathParam("key") String key, | ||||
@QueryParam("repositoryId") String repositoryId ) | @QueryParam("repositoryId") String repositoryId ) | ||||
@Path("importMetadata") | @Path("importMetadata") | ||||
@POST | @POST | ||||
@RedbackAuthorization(noPermission = false, noRestriction = false, permissions = "archiva-add-metadata") | |||||
@RedbackAuthorization( permissions = "archiva-add-metadata", resource = "{repository}") | |||||
ActionStatus importMetadata( MetadataAddRequest metadataAddRequest, @QueryParam("repository") String repository ) | ActionStatus importMetadata( MetadataAddRequest metadataAddRequest, @QueryParam("repository") String repository ) | ||||
throws ArchivaRestServiceException; | throws ArchivaRestServiceException; | ||||
@Path ("mergeConflictedArtifacts/{sourceRepositoryId}/{targetRepositoryId}") | @Path ("mergeConflictedArtifacts/{sourceRepositoryId}/{targetRepositoryId}") | ||||
@GET | @GET | ||||
@Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) | @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) | ||||
@RedbackAuthorization (permissions = ArchivaRoleConstants.OPERATION_MERGE_REPOSITORY) | |||||
@RedbackAuthorization (permissions = ArchivaRoleConstants.OPERATION_MERGE_REPOSITORY, resource = "{sourceRepositoryId}") | |||||
List<Artifact> getMergeConflictedArtifacts( @PathParam ("sourceRepositoryId") String sourceRepositoryId, | List<Artifact> getMergeConflictedArtifacts( @PathParam ("sourceRepositoryId") String sourceRepositoryId, | ||||
@PathParam ("targetRepositoryId") String targetRepositoryId ) | @PathParam ("targetRepositoryId") String targetRepositoryId ) | ||||
throws ArchivaRestServiceException; | throws ArchivaRestServiceException; | ||||
*/ | */ | ||||
@Path ("mergeRepositories/{sourceRepositoryId}/{targetRepositoryId}/{skipConflicts}") | @Path ("mergeRepositories/{sourceRepositoryId}/{targetRepositoryId}/{skipConflicts}") | ||||
@GET | @GET | ||||
@RedbackAuthorization (permissions = ArchivaRoleConstants.OPERATION_MERGE_REPOSITORY) | |||||
@RedbackAuthorization (permissions = ArchivaRoleConstants.OPERATION_MERGE_REPOSITORY, resource = "{sourceRepositoryId}") | |||||
void mergeRepositories( @PathParam ("sourceRepositoryId") String sourceRepositoryId, | void mergeRepositories( @PathParam ("sourceRepositoryId") String sourceRepositoryId, | ||||
@PathParam ("targetRepositoryId") String targetRepositoryId, | @PathParam ("targetRepositoryId") String targetRepositoryId, | ||||
@PathParam ("skipConflicts") boolean skipConflicts ) | @PathParam ("skipConflicts") boolean skipConflicts ) |
@POST | @POST | ||||
@Consumes( MediaType.MULTIPART_FORM_DATA ) | @Consumes( MediaType.MULTIPART_FORM_DATA ) | ||||
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) | @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) | ||||
@RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_REPOSITORY_UPLOAD ) | |||||
@RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_FILE_UPLOAD ) | |||||
FileMetadata post( MultipartBody multipartBody ) | FileMetadata post( MultipartBody multipartBody ) | ||||
throws ArchivaRestServiceException; | throws ArchivaRestServiceException; | ||||
@Path( "{fileName}" ) | @Path( "{fileName}" ) | ||||
@DELETE | @DELETE | ||||
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) | @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) | ||||
@RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_REPOSITORY_UPLOAD ) | |||||
@RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_FILE_UPLOAD ) | |||||
Boolean deleteFile( @PathParam( "fileName" ) String fileName ) | Boolean deleteFile( @PathParam( "fileName" ) String fileName ) | ||||
throws ArchivaRestServiceException; | throws ArchivaRestServiceException; | ||||
@Path( "sessionFileMetadatas" ) | @Path( "sessionFileMetadatas" ) | ||||
@GET | @GET | ||||
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) | @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) | ||||
@RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_REPOSITORY_UPLOAD ) | |||||
@RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_FILE_UPLOAD ) | |||||
List<FileMetadata> getSessionFileMetadatas() | List<FileMetadata> getSessionFileMetadatas() | ||||
throws ArchivaRestServiceException; | throws ArchivaRestServiceException; | ||||
@Path( "clearUploadedFiles" ) | @Path( "clearUploadedFiles" ) | ||||
@GET | @GET | ||||
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) | @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) | ||||
@RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_REPOSITORY_UPLOAD ) | |||||
@RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_FILE_UPLOAD ) | |||||
Boolean clearUploadedFiles() | Boolean clearUploadedFiles() | ||||
throws ArchivaRestServiceException; | throws ArchivaRestServiceException; | ||||