mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 17:56:17 +01:00
added dependencies to plugin class
This commit is contained in:
@@ -39,9 +39,12 @@ import com.google.common.base.Objects;
|
|||||||
|
|
||||||
//~--- JDK imports ------------------------------------------------------------
|
//~--- JDK imports ------------------------------------------------------------
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAccessType;
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
import javax.xml.bind.annotation.XmlAccessorType;
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -66,13 +69,15 @@ public final class Plugin extends ScmModule
|
|||||||
* @param information
|
* @param information
|
||||||
* @param resources
|
* @param resources
|
||||||
* @param condition
|
* @param condition
|
||||||
|
* @param dependencies
|
||||||
*/
|
*/
|
||||||
public Plugin(PluginInformation information, PluginResources resources,
|
public Plugin(PluginInformation information, PluginResources resources,
|
||||||
PluginCondition condition)
|
PluginCondition condition, Set<String> dependencies)
|
||||||
{
|
{
|
||||||
this.information = information;
|
this.information = information;
|
||||||
this.resources = resources;
|
this.resources = resources;
|
||||||
this.condition = condition;
|
this.condition = condition;
|
||||||
|
this.dependencies = dependencies;
|
||||||
}
|
}
|
||||||
|
|
||||||
//~--- methods --------------------------------------------------------------
|
//~--- methods --------------------------------------------------------------
|
||||||
@@ -102,7 +107,8 @@ public final class Plugin extends ScmModule
|
|||||||
|
|
||||||
return Objects.equal(condition, other.condition)
|
return Objects.equal(condition, other.condition)
|
||||||
&& Objects.equal(information, other.information)
|
&& Objects.equal(information, other.information)
|
||||||
&& Objects.equal(resources, other.resources);
|
&& Objects.equal(resources, other.resources)
|
||||||
|
&& Objects.equal(dependencies, other.dependencies);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -114,7 +120,7 @@ public final class Plugin extends ScmModule
|
|||||||
@Override
|
@Override
|
||||||
public int hashCode()
|
public int hashCode()
|
||||||
{
|
{
|
||||||
return Objects.hashCode(condition, information, resources);
|
return Objects.hashCode(condition, information, resources, dependencies);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -131,6 +137,7 @@ public final class Plugin extends ScmModule
|
|||||||
.add("condition", condition)
|
.add("condition", condition)
|
||||||
.add("information", information)
|
.add("information", information)
|
||||||
.add("resources", resources)
|
.add("resources", resources)
|
||||||
|
.add("dependencies", dependencies)
|
||||||
.toString();
|
.toString();
|
||||||
//J+
|
//J+
|
||||||
}
|
}
|
||||||
@@ -148,6 +155,19 @@ public final class Plugin extends ScmModule
|
|||||||
return condition;
|
return condition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method description
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*
|
||||||
|
* @since 2.0.0
|
||||||
|
*/
|
||||||
|
public Set<String> getDependencies()
|
||||||
|
{
|
||||||
|
return dependencies;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method description
|
* Method description
|
||||||
*
|
*
|
||||||
@@ -176,6 +196,11 @@ public final class Plugin extends ScmModule
|
|||||||
@XmlElement(name = "conditions")
|
@XmlElement(name = "conditions")
|
||||||
private PluginCondition condition;
|
private PluginCondition condition;
|
||||||
|
|
||||||
|
/** Field description */
|
||||||
|
@XmlElement(name = "dependency")
|
||||||
|
@XmlElementWrapper(name = "dependencies")
|
||||||
|
private Set<String> dependencies;
|
||||||
|
|
||||||
/** Field description */
|
/** Field description */
|
||||||
private PluginInformation information;
|
private PluginInformation information;
|
||||||
|
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ public class ScmModule
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @version Enter version here..., 14/03/28
|
* @version Enter version here..., 14/03/28
|
||||||
* @author Enter your name here...
|
* @author Enter your name here...
|
||||||
*/
|
*/
|
||||||
private static class Unwrapper implements Function<ClassElement, Class<?>>
|
private static class Unwrapper implements Function<ClassElement, Class<?>>
|
||||||
{
|
{
|
||||||
@@ -200,8 +200,6 @@ public class ScmModule
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
//~--- fields ---------------------------------------------------------------
|
//~--- fields ---------------------------------------------------------------
|
||||||
|
|
||||||
/** Field description */
|
/** Field description */
|
||||||
|
|||||||
Reference in New Issue
Block a user