|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.abstracthorizon.extend.server.deployment.service.AbstractServiceModuleLoader org.abstracthorizon.extend.repository.maven.MavenRepoModuleLoader
public class MavenRepoModuleLoader
Module loader that loads files from maven style repository
Field Summary | |
---|---|
protected int |
bufferSize
Download buffer size |
static int |
DEFAULT_BUFFER_SIZE
Default buffer size - 10K |
protected File |
localRepository
Local repository path |
protected Map<String,POM> |
pomCache
POM cache |
protected Map<String,URL> |
repositories
Repositories |
Fields inherited from class org.abstracthorizon.extend.server.deployment.service.AbstractServiceModuleLoader |
---|
deploymentManager, extensions |
Constructor Summary | |
---|---|
MavenRepoModuleLoader()
Constructor |
Method Summary | |
---|---|
boolean |
canLoad(URI uri)
This method checks if URI protocol is "repo" and file starts with "maven". |
protected void |
collectProperties(Map<String,String> properties,
POM pom)
|
static boolean |
copyFile(File fromFile,
File toFile)
Copies files and directories |
File |
createLocalFile(Artifact artifact)
|
File |
createLocalFile(Artifact artifact,
String file)
|
void |
downloadFile(Artifact artifact,
File toFile)
|
void |
downloadFile(URL url,
Artifact artifact,
File toFile)
|
void |
downloadFile(URL url,
Artifact artifact,
String altVersion,
File toFile)
|
protected void |
downloadFile(URL url,
File file)
|
static boolean |
excludesContain(Set<Artifact> excludes,
Dependency dependency)
|
Map<String,URL> |
getRepositories()
Returns repositories |
Module |
load(URI uri)
Loads a file from maven style repository |
Module |
loadAndDeploy(Artifact artifact,
Set<Artifact> excludes)
|
Module |
loadAs(URI uri,
ModuleId moduleId)
Loads a file from maven style repository |
POM |
loadPom(Artifact pomArtifact)
|
static Artifact |
parseArtifact(String fileId)
|
void |
processDependencies(POM pom,
Module module,
Set<Artifact> excludes)
|
void |
setRepositories(Map<String,URL> repositories)
Sets repositories |
void |
stop()
Stop method removes URLResolver from "DefaultURLResolver". |
ModuleId |
toModuleId(URI uri)
Translates URI to moduleId |
void |
updateDependency(POM pom,
Dependency dependency)
|
Methods inherited from class org.abstracthorizon.extend.server.deployment.service.AbstractServiceModuleLoader |
---|
getDeploymentManager, getExtensions, setDeploymentManager, setExtensions, start |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_BUFFER_SIZE
protected Map<String,POM> pomCache
protected Map<String,URL> repositories
protected int bufferSize
protected File localRepository
Constructor Detail |
---|
public MavenRepoModuleLoader()
Method Detail |
---|
public void setRepositories(Map<String,URL> repositories)
repositories
- repositoriespublic Map<String,URL> getRepositories()
public void stop()
stop
in class AbstractServiceModuleLoader
public boolean canLoad(URI uri)
canLoad
in interface ModuleLoader
canLoad
in class AbstractServiceModuleLoader
uri
- URI
true
if URI protocol is "repo" and file starts with "maven".public ModuleId toModuleId(URI uri)
ModuleLoader
uri
- uri
null
public Module load(URI uri)
uri
- URI
public Module loadAs(URI uri, ModuleId moduleId)
uri
- URImoduleId
- module id
public Module loadAndDeploy(Artifact artifact, Set<Artifact> excludes)
public POM loadPom(Artifact pomArtifact) throws FileNotFoundException
FileNotFoundException
protected void collectProperties(Map<String,String> properties, POM pom)
public void processDependencies(POM pom, Module module, Set<Artifact> excludes) throws FileNotFoundException
FileNotFoundException
public void updateDependency(POM pom, Dependency dependency)
public static boolean excludesContain(Set<Artifact> excludes, Dependency dependency)
public File createLocalFile(Artifact artifact)
public File createLocalFile(Artifact artifact, String file)
public void downloadFile(Artifact artifact, File toFile) throws FileNotFoundException
FileNotFoundException
public void downloadFile(URL url, Artifact artifact, File toFile) throws FileNotFoundException
FileNotFoundException
public void downloadFile(URL url, Artifact artifact, String altVersion, File toFile) throws FileNotFoundException
FileNotFoundException
protected void downloadFile(URL url, File file) throws FileNotFoundException
FileNotFoundException
public static Artifact parseArtifact(String fileId)
public static boolean copyFile(File fromFile, File toFile)
fromFile
- source file/dirtoFile
- destination file/dir
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |