Package org.opencms.module
Class CmsModuleDependency
java.lang.Object
org.opencms.module.CmsModuleDependency
- All Implemented Interfaces:
Serializable
,Comparable<Object>
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:
-
Constructor Summary
ConstructorDescriptionGenerates a new, empty module dependency.CmsModuleDependency
(String moduleName, CmsModuleVersion minVersion) Generates a new module dependency. -
Method Summary
Modifier and TypeMethodDescriptionclone()
int
boolean
dependesOn
(CmsModuleDependency other) Checks if this module depedency depends on another given module dependency.boolean
getName()
Returns the name of the module dependency.Returns the minimum version of the dependency.int
hashCode()
void
Sets the name of a module dependency.void
setVersion
(CmsModuleVersion value) Sets the version of a module dependency.toString()
-
Constructor Details
-
CmsModuleDependency
public CmsModuleDependency()Generates a new, empty module dependency. -
CmsModuleDependency
Generates a new module dependency.- Parameters:
moduleName
- the name of the module dependencyminVersion
- the minimum version of the dependency
-
-
Method Details
-
clone
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Object>
- See Also:
-
dependesOn
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
-
getName
Returns the name of the module dependency.- Returns:
- the name of the module dependency
-
getVersion
Returns the minimum version of the dependency.- Returns:
- the minimum version of the dependency
-
hashCode
-
setName
Sets the name of a module dependency.- Parameters:
value
- the name of a module dependency
-
setVersion
Sets the version of a module dependency.- Parameters:
value
- the version of a module dependency
-
toString
-