]>
git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.support.aether/src/main/java/org/argeo/slc/aether/spring/RemoteRepositoryFactory.java
1 package org
.argeo
.slc
.aether
.spring
;
3 import org
.sonatype
.aether
.repository
.RemoteRepository
;
4 import org
.springframework
.beans
.factory
.BeanNameAware
;
5 import org
.springframework
.beans
.factory
.FactoryBean
;
7 /** Simplifies the definition of a remote factory using Spring */
8 public class RemoteRepositoryFactory
implements BeanNameAware
, FactoryBean
{
9 private String beanName
;
12 private String type
= "default";
14 public Object
getObject() throws Exception
{
15 return new RemoteRepository(id
!= null ? id
: beanName
, type
, url
);
18 public Class
<?
> getObjectType() {
19 return RemoteRepository
.class;
22 public boolean isSingleton() {
26 public void setBeanName(String name
) {
31 public void setId(String id
) {
35 public void setUrl(String url
) {
39 public void setType(String type
) {