com.atlassian.plugin
Class DefaultPluginArtifactFactory

java.lang.Object
  extended by com.atlassian.plugin.DefaultPluginArtifactFactory
All Implemented Interfaces:
PluginArtifactFactory

public class DefaultPluginArtifactFactory
extends Object
implements PluginArtifactFactory

Creates plugin artifacts by handling URI's that are files and looking at the file's extension

Since:
2.1.0

Constructor Summary
DefaultPluginArtifactFactory()
          Create a factory which produces artifacts that do not allow reference installation.
DefaultPluginArtifactFactory(PluginArtifact.AllowsReference.ReferenceMode referenceMode)
          Create a factory which produces artifacts that optionally allow reference installation.
 
Method Summary
 PluginArtifact create(URI artifactUri)
          Creates the artifact by looking at the file extension
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPluginArtifactFactory

public DefaultPluginArtifactFactory()
Create a factory which produces artifacts that do not allow reference installation.


DefaultPluginArtifactFactory

public DefaultPluginArtifactFactory(PluginArtifact.AllowsReference.ReferenceMode referenceMode)
Create a factory which produces artifacts that optionally allow reference installation.

Parameters:
referenceMode - the PluginArtifact.AllowsReference.ReferenceMode passed to JarPluginArtifact instances created by this factory.
Method Detail

create

public PluginArtifact create(URI artifactUri)
Creates the artifact by looking at the file extension

Specified by:
create in interface PluginArtifactFactory
Parameters:
artifactUri - The artifact URI
Returns:
The created artifact
Throws:
IllegalArgumentException - If an artifact cannot be created from the URL


Copyright © 2015 Atlassian. All rights reserved.