* @author Eric Barboni
* @since 1.4.0
*/
-@Path( "/pluginsService/" )
+@Path("/pluginsService/")
public interface PluginsService
{
- @Path( "getAdminPlugins" )
+ @Path("getAdminPlugins")
@GET
- @Produces(
- {
- MediaType.TEXT_PLAIN
- } )
- @RedbackAuthorization( noRestriction = true )
+ @Produces(
+ { MediaType.TEXT_PLAIN })
+ @RedbackAuthorization(noRestriction = true)
String getAdminPlugins()
- throws ArchivaRestServiceException;
+ throws ArchivaRestServiceException;
}
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
+
import org.apache.archiva.rest.api.services.ArchivaRestServiceException;
import org.springframework.stereotype.Service;
import javax.inject.Inject;
+
import org.apache.archiva.rest.api.services.PluginsService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author Eric Barboni
+ * @since 1.4.0
*/
-@Service( "pluginsService#rest" )
+@Service("pluginsService#rest")
public class DefaultPluginsServices
- implements PluginsService
+ implements PluginsService
{
private List<String> repositoryType = new ArrayList<String>();
+
private List<String> adminFeatures = new ArrayList<String>();
+
private ApplicationContext appCont;
+
private Logger log = LoggerFactory.getLogger( getClass() );
@Inject
this.appCont = applicationContext;
}
- private void feed( List<String> repository, String key ) throws ArchivaRestServiceException
+ private void feed( List<String> repository, String key )
+ throws ArchivaRestServiceException
{
log.info( "Feeding: {}", key );
repository.clear();
@Override
public String getAdminPlugins()
- throws ArchivaRestServiceException
+ throws ArchivaRestServiceException
{
// rebuild
feed( repositoryType, "repository" );