Package org.opencms.module
Class CmsModuleDependency
- java.lang.Object
-
- org.opencms.module.CmsModuleDependency
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<java.lang.Object>
public class CmsModuleDependency extends java.lang.Object implements java.lang.Comparable<java.lang.Object>, java.io.Serializable
Describes an OpenCms module dependency.Module dependencies are checked if a module is imported or deleted. If a module A requires certain resources (like Java classes) from another module B, a should be made dependend on B.
- Since:
- 6.0.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CmsModuleDependency()Generates a new, empty module dependency.CmsModuleDependency(java.lang.String moduleName, CmsModuleVersion minVersion)Generates a new module dependency.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()intcompareTo(java.lang.Object obj)booleandependesOn(CmsModuleDependency other)Checks if this module depedency depends on another given module dependency.booleanequals(java.lang.Object obj)java.lang.StringgetName()Returns the name of the module dependency.CmsModuleVersiongetVersion()Returns the minimum version of the dependency.inthashCode()voidsetName(java.lang.String value)Sets the name of a module dependency.voidsetVersion(CmsModuleVersion value)Sets the version of a module dependency.java.lang.StringtoString()
-
-
-
Constructor Detail
-
CmsModuleDependency
public CmsModuleDependency()
Generates a new, empty module dependency.
-
CmsModuleDependency
public CmsModuleDependency(java.lang.String moduleName, CmsModuleVersion minVersion)
Generates a new module dependency.- Parameters:
moduleName- the name of the module dependencyminVersion- the minimum version of the dependency
-
-
Method Detail
-
clone
public java.lang.Object clone()
- Overrides:
clonein classjava.lang.Object- See Also:
Object.clone()
-
compareTo
public int compareTo(java.lang.Object obj)
- Specified by:
compareToin interfacejava.lang.Comparable<java.lang.Object>- See Also:
Comparable.compareTo(java.lang.Object)
-
dependesOn
public boolean dependesOn(CmsModuleDependency other)
Checks if this module depedency depends on another given module dependency.- Parameters:
other- the other dependency to check against- Returns:
- true if this module depedency depends on the given module dependency
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object- See Also:
Object.equals(java.lang.Object)
-
getName
public java.lang.String getName()
Returns the name of the module dependency.- Returns:
- the name of the module dependency
-
getVersion
public CmsModuleVersion getVersion()
Returns the minimum version of the dependency.- Returns:
- the minimum version of the dependency
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object- See Also:
Object.hashCode()
-
setName
public void setName(java.lang.String value)
Sets the name of a module dependency.- Parameters:
value- the name of a module dependency
-
setVersion
public void setVersion(CmsModuleVersion value)
Sets the version of a module dependency.- Parameters:
value- the version of a module dependency
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
-