com.atlassian.plugin
Class DefaultPluginArtifactFactory

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

public class DefaultPluginArtifactFactory
extends java.lang.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(boolean createReferenceArtifacts)
          Create a factory which produces artifacts that optionally allow reference installation.
 
Method Summary
 PluginArtifact create(java.net.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(boolean createReferenceArtifacts)
Create a factory which produces artifacts that optionally allow reference installation.

Parameters:
createReferenceArtifacts - the return value for PluginArtifact.AllowsReference.allowsReference for plugins from this factory.
Method Detail

create

public PluginArtifact create(java.net.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:
java.lang.IllegalArgumentException - If an artifact cannot be created from the URL


Copyright © 2013 Atlassian. All Rights Reserved.