* @author Olivier Lamy
* @since 1.4-M3
*/
-@Path ("/browseService/")
+@Path("/browseService/")
public interface BrowseService
{
- @Path ("rootGroups")
+ @Path("rootGroups")
@GET
- @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @RedbackAuthorization (noPermission = true, noRestriction = true)
- BrowseResult getRootGroups( @QueryParam ("repositoryId") String repositoryId )
+ @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @RedbackAuthorization(noPermission = true, noRestriction = true)
+ BrowseResult getRootGroups( @QueryParam("repositoryId") String repositoryId )
throws ArchivaRestServiceException;
/**
- * @param groupId groupId to browse
+ * @param groupId groupId to browse
* @param repositoryId optionnal (repository to browse if <code>null</code> all available user repositories are used)
*/
- @Path ("browseGroupId/{groupId}")
+ @Path("browseGroupId/{groupId}")
@GET
- @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @RedbackAuthorization (noPermission = true, noRestriction = true)
- BrowseResult browseGroupId( @PathParam ("groupId") String groupId,
- @QueryParam ("repositoryId") String repositoryId )
+ @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @RedbackAuthorization(noPermission = true, noRestriction = true)
+ BrowseResult browseGroupId( @PathParam("groupId") String groupId, @QueryParam("repositoryId") String repositoryId )
throws ArchivaRestServiceException;
- @Path ("versionsList/{g}/{a}")
+ @Path("versionsList/{g}/{a}")
@GET
- @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @RedbackAuthorization (noPermission = true, noRestriction = true)
- VersionsList getVersionsList( @PathParam ("g") String groupId, @PathParam ("a") String artifactId,
- @QueryParam ("repositoryId") String repositoryId )
+ @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @RedbackAuthorization(noPermission = true, noRestriction = true)
+ VersionsList getVersionsList( @PathParam("g") String groupId, @PathParam("a") String artifactId,
+ @QueryParam("repositoryId") String repositoryId )
throws ArchivaRestServiceException;
- @Path ("projectVersionMetadata/{g}/{a}")
+ @Path("projectVersionMetadata/{g}/{a}")
@GET
- @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @RedbackAuthorization (noPermission = true, noRestriction = true)
- ProjectVersionMetadata getProjectVersionMetadata( @PathParam ("g") String groupId,
- @PathParam ("a") String artifactId,
- @QueryParam ("repositoryId") String repositoryId )
+ @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @RedbackAuthorization(noPermission = true, noRestriction = true)
+ ProjectVersionMetadata getProjectVersionMetadata( @PathParam("g") String groupId, @PathParam("a") String artifactId,
+ @QueryParam("repositoryId") String repositoryId )
throws ArchivaRestServiceException;
- @Path ("projectVersionMetadata/{g}/{a}/{v}")
+ @Path("projectVersionMetadata/{g}/{a}/{v}")
@GET
- @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @RedbackAuthorization (noPermission = true, noRestriction = true)
- ProjectVersionMetadata getProjectMetadata( @PathParam ("g") String groupId, @PathParam ("a") String artifactId,
- @PathParam ("v") String version,
- @QueryParam ("repositoryId") String repositoryId )
+ @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @RedbackAuthorization(noPermission = true, noRestriction = true)
+ ProjectVersionMetadata getProjectMetadata( @PathParam("g") String groupId, @PathParam("a") String artifactId,
+ @PathParam("v") String version,
+ @QueryParam("repositoryId") String repositoryId )
throws ArchivaRestServiceException;
/**
* @return List of managed repositories current user can read
*/
- @Path ("userRepositories")
+ @Path("userRepositories")
@GET
- @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @RedbackAuthorization (noPermission = true, noRestriction = true)
+ @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @RedbackAuthorization(noPermission = true, noRestriction = true)
List<ManagedRepository> getUserRepositories()
throws ArchivaRestServiceException;
* return the dependency Tree for an artifacts
* <b>the List result has only one entry</b>
*/
- @Path ("treeEntries/{g}/{a}/{v}")
+ @Path("treeEntries/{g}/{a}/{v}")
@GET
- @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @RedbackAuthorization (noPermission = true, noRestriction = true)
- List<TreeEntry> getTreeEntries( @PathParam ("g") String groupId, @PathParam ("a") String artifactId,
- @PathParam ("v") String version, @QueryParam ("repositoryId") String repositoryId )
+ @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @RedbackAuthorization(noPermission = true, noRestriction = true)
+ List<TreeEntry> getTreeEntries( @PathParam("g") String groupId, @PathParam("a") String artifactId,
+ @PathParam("v") String version, @QueryParam("repositoryId") String repositoryId )
throws ArchivaRestServiceException;
/**
* List of artifacts using the artifact passed in parameter.
*/
- @Path ("dependees/{g}/{a}/{v}")
+ @Path("dependees/{g}/{a}/{v}")
@GET
- @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @RedbackAuthorization (noPermission = true, noRestriction = true)
- List<Artifact> getDependees( @PathParam ("g") String groupId, @PathParam ("a") String artifactId,
- @PathParam ("v") String version, @QueryParam ("repositoryId") String repositoryId )
+ @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @RedbackAuthorization(noPermission = true, noRestriction = true)
+ List<Artifact> getDependees( @PathParam("g") String groupId, @PathParam("a") String artifactId,
+ @PathParam("v") String version, @QueryParam("repositoryId") String repositoryId )
throws ArchivaRestServiceException;
- @Path ("metadatas/{g}/{a}/{v}")
+ @Path("metadatas/{g}/{a}/{v}")
@GET
- @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @RedbackAuthorization (noPermission = true, noRestriction = true)
- List<Entry> getMetadatas( @PathParam ("g") String groupId, @PathParam ("a") String artifactId,
- @PathParam ("v") String version, @QueryParam ("repositoryId") String repositoryId )
+ @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @RedbackAuthorization(noPermission = true, noRestriction = true)
+ List<Entry> getMetadatas( @PathParam("g") String groupId, @PathParam("a") String artifactId,
+ @PathParam("v") String version, @QueryParam("repositoryId") String repositoryId )
throws ArchivaRestServiceException;
- @Path ("metadata/{g}/{a}/{v}/{key}/{value}")
+ @Path("metadata/{g}/{a}/{v}/{key}/{value}")
@PUT
- @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @RedbackAuthorization (noPermission = false, noRestriction = false, permissions = "archiva-add-metadata")
- Boolean addMetadata( @PathParam ("g") String groupId, @PathParam ("a") String artifactId,
- @PathParam ("v") String version, @PathParam ("key") String key,
- @PathParam ("value") String value, @QueryParam ("repositoryId") String repositoryId )
+ @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @RedbackAuthorization(noPermission = false, noRestriction = false, permissions = "archiva-add-metadata")
+ Boolean addMetadata( @PathParam("g") String groupId, @PathParam("a") String artifactId,
+ @PathParam("v") String version, @PathParam("key") String key, @PathParam("value") String value,
+ @QueryParam("repositoryId") String repositoryId )
throws ArchivaRestServiceException;
- @Path ("metadata/{g}/{a}/{v}/{key}")
+ @Path("metadata/{g}/{a}/{v}/{key}")
@DELETE
- @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @RedbackAuthorization (noPermission = false, noRestriction = false, permissions = "archiva-add-metadata")
- Boolean deleteMetadata( @PathParam ("g") String groupId, @PathParam ("a") String artifactId,
- @PathParam ("v") String version, @PathParam ("key") String key,
- @QueryParam ("repositoryId") String repositoryId )
+ @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @RedbackAuthorization(noPermission = false, noRestriction = false, permissions = "archiva-add-metadata")
+ Boolean deleteMetadata( @PathParam("g") String groupId, @PathParam("a") String artifactId,
+ @PathParam("v") String version, @PathParam("key") String key,
+ @QueryParam("repositoryId") String repositoryId )
throws ArchivaRestServiceException;
- @Path( "importMetadata" )
+ @Path("importMetadata")
@POST
- @RedbackAuthorization( noPermission = false, noRestriction = false, permissions = "archiva-add-metadata")
- Boolean importMetadata( MetadataAddRequest metadataAddRequest, @QueryParam ("repository") String repository )
+ @RedbackAuthorization(noPermission = false, noRestriction = false, permissions = "archiva-add-metadata")
+ Boolean importMetadata( MetadataAddRequest metadataAddRequest, @QueryParam("repository") String repository )
throws ArchivaRestServiceException;
- @Path ("artifactContentEntries/{g}/{a}/{v}")
+ @Path("artifactContentEntries/{g}/{a}/{v}")
@GET
- @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @RedbackAuthorization (noPermission = true, noRestriction = true)
- List<ArtifactContentEntry> getArtifactContentEntries( @PathParam ("g") String groupId,
- @PathParam ("a") String artifactId,
- @PathParam ("v") String version,
- @QueryParam ("c") String classifier,
- @QueryParam ("t") String type, @QueryParam ("p") String path,
- @QueryParam ("repositoryId") String repositoryId )
+ @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @RedbackAuthorization(noPermission = true, noRestriction = true)
+ List<ArtifactContentEntry> getArtifactContentEntries( @PathParam("g") String groupId,
+ @PathParam("a") String artifactId,
+ @PathParam("v") String version,
+ @QueryParam("c") String classifier,
+ @QueryParam("t") String type, @QueryParam("p") String path,
+ @QueryParam("repositoryId") String repositoryId )
throws ArchivaRestServiceException;
- @Path ("artifactDownloadInfos/{g}/{a}/{v}")
+ @Path("artifactDownloadInfos/{g}/{a}/{v}")
@GET
- @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @RedbackAuthorization (noPermission = true, noRestriction = true)
- List<Artifact> getArtifactDownloadInfos( @PathParam ("g") String groupId, @PathParam ("a") String artifactId,
- @PathParam ("v") String version,
- @QueryParam ("repositoryId") String repositoryId )
+ @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @RedbackAuthorization(noPermission = true, noRestriction = true)
+ List<Artifact> getArtifactDownloadInfos( @PathParam("g") String groupId, @PathParam("a") String artifactId,
+ @PathParam("v") String version,
+ @QueryParam("repositoryId") String repositoryId )
throws ArchivaRestServiceException;
/**
* if path is empty content of the file is returned (for pom view)
*/
- @Path ("artifactContentText/{g}/{a}/{v}")
+ @Path("artifactContentText/{g}/{a}/{v}")
@GET
- @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @RedbackAuthorization (noPermission = true, noRestriction = true)
- ArtifactContent getArtifactContentText( @PathParam ("g") String groupId, @PathParam ("a") String artifactId,
- @PathParam ("v") String version, @QueryParam ("c") String classifier,
- @QueryParam ("t") String type, @QueryParam ("p") String path,
- @QueryParam ("repositoryId") String repositoryId )
+ @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @RedbackAuthorization(noPermission = true, noRestriction = true)
+ ArtifactContent getArtifactContentText( @PathParam("g") String groupId, @PathParam("a") String artifactId,
+ @PathParam("v") String version, @QueryParam("c") String classifier,
+ @QueryParam("t") String type, @QueryParam("p") String path,
+ @QueryParam("repositoryId") String repositoryId )
throws ArchivaRestServiceException;
/**
* verify if an artifact is available locally if not download from proxies will be try
+ *
* @since 1.4-M3
*/
- @Path ("artifactAvailable/{g}/{a}/{v}")
+ @Path("artifactAvailable/{g}/{a}/{v}")
@GET
- @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @RedbackAuthorization (noPermission = true, noRestriction = true)
- Boolean artifactAvailable( @PathParam ("g") String groupId, @PathParam ("a") String artifactId,
- @PathParam ("v") String version, @QueryParam ("repositoryId") String repositoryId )
+ @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @RedbackAuthorization(noPermission = true, noRestriction = true)
+ Boolean artifactAvailable( @PathParam("g") String groupId, @PathParam("a") String artifactId,
+ @PathParam("v") String version, @QueryParam("repositoryId") String repositoryId )
throws ArchivaRestServiceException;
/**
+ * verify if an artifact is available locally if not download from proxies will be try
*
+ * @since 1.4-M4
+ */
+ @Path( "artifactAvailable/{g}/{a}/{v}/{c}" )
+ @GET
+ @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
+ @RedbackAuthorization( noPermission = true, noRestriction = true )
+ Boolean artifactAvailable( @PathParam( "g" ) String groupId, @PathParam( "a" ) String artifactId,
+ @PathParam( "v" ) String version, @PathParam( "c" ) String classifier,
+ @QueryParam( "repositoryId" ) String repositoryId )
+ throws ArchivaRestServiceException;
+
+ /**
* return List of all artifacts from this repository
+ *
* @param repositoryId
* @return
* @throws ArchivaRestServiceException
* @since 1.4-M3
*/
- @Path ("artifacts/{r}")
+ @Path("artifacts/{r}")
@GET
- @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @RedbackAuthorization (noPermission = true, noRestriction = true)
- List<Artifact> getArtifacts( @PathParam ( "r" ) String repositoryId )
+ @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @RedbackAuthorization(noPermission = true, noRestriction = true)
+ List<Artifact> getArtifacts( @PathParam("r") String repositoryId )
throws ArchivaRestServiceException;
}