Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1421208 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
olamy committed Dec 13, 2012
1 parent 71856c3 commit 30dfb5f
Show file tree
Hide file tree
Showing 8 changed files with 109 additions and 106 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,23 +159,23 @@ List<FileType> getFileTypes()
List<String> getKnownContentConsumers()
throws ArchivaRestServiceException;

/**
* @since 1.4-M3
*/
@Path( "getKnownContentAdminRepositoryConsumers" )
@GET
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
@RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
/**
* @since 1.4-M3
*/
List<AdminRepositoryConsumer> getKnownContentAdminRepositoryConsumers()
throws ArchivaRestServiceException;

/**
* @since 1.4-M3
*/
@Path( "getInvalidContentAdminRepositoryConsumers" )
@GET
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
@RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
/**
* @since 1.4-M3
*/
List<AdminRepositoryConsumer> getInvalidContentAdminRepositoryConsumers()
throws ArchivaRestServiceException;

Expand Down Expand Up @@ -221,13 +221,13 @@ Boolean registrationDisabled()
void setUiConfiguration( UiConfiguration uiConfiguration )
throws ArchivaRestServiceException;

/**
* @since 1.4-M3
*/
@Path( "applicationUrl" )
@GET
@Produces( MediaType.TEXT_PLAIN )
@RedbackAuthorization( noRestriction = true, noPermission = true )
/**
* @since 1.4-M3
*/
String getApplicationUrl()
throws ArchivaRestServiceException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ public interface BrowseService
BrowseResult getRootGroups( @QueryParam ("repositoryId") String repositoryId )
throws ArchivaRestServiceException;

@Path ("browseGroupId/{groupId}")
@GET
@Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@RedbackAuthorization (noPermission = true, noRestriction = true)
/**
* @param groupId groupId to browse
* @param repositoryId optionnal (repository to browse if <code>null</code> all available user repositories are used)
*/
@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 )
throws ArchivaRestServiceException;
Expand Down Expand Up @@ -93,35 +93,35 @@ ProjectVersionMetadata getProjectMetadata( @PathParam ("g") String groupId, @Pat
@QueryParam ("repositoryId") String repositoryId )
throws ArchivaRestServiceException;

/**
* @return List of managed repositories current user can read
*/
@Path ("userRepositories")
@GET
@Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@RedbackAuthorization (noPermission = true, noRestriction = true)
/**
* @return List of managed repositories current user can read
*/
List<ManagedRepository> getUserRepositories()
throws ArchivaRestServiceException;

@Path ("treeEntries/{g}/{a}/{v}")
@GET
@Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@RedbackAuthorization (noPermission = true, noRestriction = true)
/**
* return the dependency Tree for an artifacts
* <b>the List result has only one entry</b>
*/
@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 )
throws ArchivaRestServiceException;

/**
* List of artifacts using the artifact passed in parameter.
*/
@Path ("dependees/{g}/{a}/{v}")
@GET
@Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@RedbackAuthorization (noPermission = true, noRestriction = true)
/**
* List of artifacts using the artifact passed in parameter.
*/
List<Artifact> getDependees( @PathParam ("g") String groupId, @PathParam ("a") String artifactId,
@PathParam ("v") String version, @QueryParam ("repositoryId") String repositoryId )
throws ArchivaRestServiceException;
Expand Down Expand Up @@ -179,35 +179,31 @@ List<Artifact> getArtifactDownloadInfos( @PathParam ("g") String groupId, @PathP
@QueryParam ("repositoryId") String repositoryId )
throws ArchivaRestServiceException;

/**
* if path is empty content of the file is returned (for pom view)
*/
@Path ("artifactContentText/{g}/{a}/{v}")
@GET
@Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@RedbackAuthorization (noPermission = true, noRestriction = true)
/**
* if path is empty content of the file is returned (for pom view)
*/
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;

@Path ("artifactAvailable/{g}/{a}/{v}")
@GET
@Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@RedbackAuthorization (noPermission = true, noRestriction = true)
/**
* verify if an artifact is available locally if not download from proxies will be try
* @since 1.4-M3
*/
@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 )
throws ArchivaRestServiceException;

@Path ("artifacts/{r}")
@GET
@Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@RedbackAuthorization (noPermission = true, noRestriction = true)
/**
*
* return List of all artifacts from this repository
Expand All @@ -216,6 +212,10 @@ Boolean artifactAvailable( @PathParam ("g") String groupId, @PathParam ("a") Str
* @throws ArchivaRestServiceException
* @since 1.4-M3
*/
@Path ("artifacts/{r}")
@GET
@Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@RedbackAuthorization (noPermission = true, noRestriction = true)
List<Artifact> getArtifacts( @PathParam ( "r" ) String repositoryId )
throws ArchivaRestServiceException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,29 @@
@Path( "/commonServices/" )
public interface CommonServices
{
@Path( "getI18nResources" )
@GET
@Produces( { MediaType.TEXT_PLAIN } )
@RedbackAuthorization( noRestriction = true )

/**
* will return properties available in org/apache/archiva/i18n/default.properties
* load default (en) then override with locale used so at least en are returned if no
* translation in the locale asked.
*/
String getI18nResources( @QueryParam( "locale" ) String locale )
throws ArchivaRestServiceException;

@Path( "getAllI18nResources" )
@Path( "getI18nResources" )
@GET
@Produces( { MediaType.TEXT_PLAIN } )
@RedbackAuthorization( noRestriction = true )
String getI18nResources( @QueryParam( "locale" ) String locale )
throws ArchivaRestServiceException;

/**
* will return properties available in org/apache/archiva/i18n/default.properties
* load default (en) then override with locale used so at least en are returned if no
* translation in the locale asked.
* This method will add redback resources too. note Archva wins
*/
@Path( "getAllI18nResources" )
@GET
@Produces( { MediaType.TEXT_PLAIN } )
@RedbackAuthorization( noRestriction = true )
String getAllI18nResources( @QueryParam( "locale" ) String locale )
throws ArchivaRestServiceException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,35 +81,35 @@ ManagedRepository addManagedRepository( ManagedRepository managedRepository )
Boolean updateManagedRepository( ManagedRepository managedRepository )
throws ArchivaRestServiceException;

/**
* @since 1.4-M3
*/
@Path( "fileLocationExists" )
@GET
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
@RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
/**
* @since 1.4-M3
*/
Boolean fileLocationExists( @QueryParam( "fileLocation" ) String fileLocation )
throws ArchivaRestServiceException;

/**
* @since 1.4-M3
*/
@Path( "getManagedRepositoryStatistics/{repositoryId}/{lang}" )
@GET
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
@RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
/**
* @since 1.4-M3
*/
ArchivaRepositoryStatistics getManagedRepositoryStatistics( @PathParam( "repositoryId" ) String repositoryId,
@PathParam( "lang" ) String lang )
throws ArchivaRestServiceException;

@Path( "getPomSnippet/{repositoryId}" )
@GET
@Produces( { MediaType.TEXT_PLAIN } )
@RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
/**
* return a pom snippet to use this repository with entities escaped (< > )
* @since 1.4-M3
*/
@Path( "getPomSnippet/{repositoryId}" )
@GET
@Produces( { MediaType.TEXT_PLAIN } )
@RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
String getPomSnippet( @PathParam( "repositoryId" ) String repositoryId )
throws ArchivaRestServiceException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,26 @@
@Path ("/mergeRepositoriesService/")
public interface MergeRepositoriesService
{
@Path ("mergeConflictedArtifacts/{sourceRepositoryId}/{targetRepositoryId}")
@GET
@Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@RedbackAuthorization (permissions = ArchivaRoleConstants.OPERATION_MERGE_REPOSITORY)

/**
* <b>permissions are checked in impl</b>
* @since 1.4-M3
*/
@Path ("mergeConflictedArtifacts/{sourceRepositoryId}/{targetRepositoryId}")
@GET
@Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@RedbackAuthorization (permissions = ArchivaRoleConstants.OPERATION_MERGE_REPOSITORY)
List<Artifact> getMergeConflictedArtifacts( @PathParam ("sourceRepositoryId") String sourceRepositoryId,
@PathParam ("targetRepositoryId") String targetRepositoryId )
throws ArchivaRestServiceException;

@Path ("mergeRepositories/{sourceRepositoryId}/{targetRepositoryId}/{skipConflicts}")
@GET
@RedbackAuthorization (permissions = ArchivaRoleConstants.OPERATION_MERGE_REPOSITORY)
/**
* <b>permissions are checked in impl</b>
* @since 1.4-M3
*/
@Path ("mergeRepositories/{sourceRepositoryId}/{targetRepositoryId}/{skipConflicts}")
@GET
@RedbackAuthorization (permissions = ArchivaRoleConstants.OPERATION_MERGE_REPOSITORY)
void mergeRepositories( @PathParam ("sourceRepositoryId") String sourceRepositoryId,
@PathParam ("targetRepositoryId") String targetRepositoryId,
@PathParam ("skipConflicts") boolean skipConflicts )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ Boolean addProxyConnector( ProxyConnector proxyConnector )
Boolean deleteProxyConnector( ProxyConnector proxyConnector )
throws ArchivaRestServiceException;

/**
* @since 1.4-M3
*/
@Path( "removeProxyConnector" )
@GET
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
@RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
/**
* @since 1.4-M3
*/
Boolean removeProxyConnector( @QueryParam( "sourceRepoId" ) String sourceRepoId,
@QueryParam( "targetRepoId" ) String targetRepoId )
throws ArchivaRestServiceException;
Expand Down
Loading

0 comments on commit 30dfb5f

Please sign in to comment.