|
@@ -23,6 +23,10 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
|
|
import javax.xml.bind.annotation.XmlElement;
|
|
|
import javax.xml.bind.annotation.XmlElementWrapper;
|
|
|
import javax.xml.bind.annotation.XmlElements;
|
|
|
+
|
|
|
+import org.apache.commons.lang.builder.ToStringBuilder;
|
|
|
+import org.apache.commons.lang.builder.ToStringStyle;
|
|
|
+
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -51,6 +55,13 @@ public class ComponentInfo {
|
|
|
*/
|
|
|
private CommandScriptDefinition commandScript;
|
|
|
|
|
|
+ /**
|
|
|
+ * List of the logs that the component writes
|
|
|
+ */
|
|
|
+ @XmlElementWrapper(name = "logs")
|
|
|
+ @XmlElements(@XmlElement(name = "log"))
|
|
|
+ private List<LogDefinition> logs;
|
|
|
+
|
|
|
/**
|
|
|
* List of clients which configs are updated with master component.
|
|
|
* If clientsToUpdateConfigs is not specified all clients are considered to be updated.
|
|
@@ -82,6 +93,10 @@ public class ComponentInfo {
|
|
|
@XmlElements(@XmlElement(name="dependency"))
|
|
|
private List<DependencyInfo> dependencies = new ArrayList<DependencyInfo>();
|
|
|
|
|
|
+ @XmlElementWrapper(name="configuration-dependencies")
|
|
|
+ @XmlElements(@XmlElement(name="config-type"))
|
|
|
+ private List<String> configDependencies;
|
|
|
+
|
|
|
/**
|
|
|
* Auto-deployment information.
|
|
|
* If auto-deployment is enabled and the component doesn't meet the cardinality requirement,
|
|
@@ -110,6 +125,7 @@ public class ComponentInfo {
|
|
|
versionAdvertised = prototype.versionAdvertised;
|
|
|
clientsToUpdateConfigs = prototype.clientsToUpdateConfigs;
|
|
|
commandScript = prototype.commandScript;
|
|
|
+ logs = prototype.logs;
|
|
|
customCommands = prototype.customCommands;
|
|
|
dependencies = prototype.dependencies;
|
|
|
autoDeploy = prototype.autoDeploy;
|
|
@@ -170,6 +186,14 @@ public class ComponentInfo {
|
|
|
this.commandScript = commandScript;
|
|
|
}
|
|
|
|
|
|
+ public List<LogDefinition> getLogs() {
|
|
|
+ return logs;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setLogs(List<LogDefinition> logs) {
|
|
|
+ this.logs = logs;
|
|
|
+ }
|
|
|
+
|
|
|
public List<ClientConfigFileDefinition> getClientConfigFiles() {
|
|
|
return clientConfigFiles;
|
|
|
}
|
|
@@ -211,10 +235,6 @@ public class ComponentInfo {
|
|
|
public List<DependencyInfo> getDependencies() {
|
|
|
return dependencies;
|
|
|
}
|
|
|
- @XmlElementWrapper(name="configuration-dependencies")
|
|
|
- @XmlElements(@XmlElement(name="config-type"))
|
|
|
- private List<String> configDependencies;
|
|
|
-
|
|
|
|
|
|
public List<String> getConfigDependencies() {
|
|
|
return configDependencies;
|
|
@@ -294,6 +314,7 @@ public class ComponentInfo {
|
|
|
if (clientConfigFiles != null ? !clientConfigFiles.equals(that.clientConfigFiles) : that.clientConfigFiles != null)
|
|
|
return false;
|
|
|
if (commandScript != null ? !commandScript.equals(that.commandScript) : that.commandScript != null) return false;
|
|
|
+ if (logs != null ? !logs.equals(that.logs) : that.logs != null) return false;
|
|
|
if (configDependencies != null ? !configDependencies.equals(that.configDependencies) : that.configDependencies != null)
|
|
|
return false;
|
|
|
if (customCommands != null ? !customCommands.equals(that.customCommands) : that.customCommands != null)
|
|
@@ -316,6 +337,7 @@ public class ComponentInfo {
|
|
|
result = 31 * result + (cardinality != null ? cardinality.hashCode() : 0);
|
|
|
result = 31 * result + (versionAdvertised ? 1 : 0);
|
|
|
result = 31 * result + (commandScript != null ? commandScript.hashCode() : 0);
|
|
|
+ result = 31 * result + (logs != null ? logs.hashCode() : 0);
|
|
|
result = 31 * result + (clientConfigFiles != null ? clientConfigFiles.hashCode() : 0);
|
|
|
result = 31 * result + (customCommands != null ? customCommands.hashCode() : 0);
|
|
|
result = 31 * result + (dependencies != null ? dependencies.hashCode() : 0);
|
|
@@ -324,4 +346,9 @@ public class ComponentInfo {
|
|
|
result = 31 * result + (clientConfigFiles != null ? clientConfigFiles.hashCode() : 0);
|
|
|
return result;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String toString() {
|
|
|
+ return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
|
|
|
+ }
|
|
|
}
|