public static ServiceSpec serviceSpec(final String name, final String url) { return new ServiceSpec(name, url, unspecifiedService(), unspecifiedExpectations()); }
@Override public String toString() { return "DatasourceDependency{" + "datasources=" + getDatasources() + "} " + super.toString(); } }
@Override public String toString() { return "ServiceDependency{" + "url='" + getUrl() + '\'' + ", methods=" + getMethods() + ", mediaTypes=" + getMediaTypes() + ", authentication='" + getAuthentication() + '\'' + "} " + super.toString(); }
/** * Creates a ServiceDependencyBuilder with type="db" and subtype="Cassandra". * * @param datasources the datasources of the accessed database. * @return builder used to configure Cassandra datasource dependencies */ public static DatasourceDependencyBuilder cassandraDependency(final List<Datasource> datasources) { return new DatasourceDependencyBuilder() .withDatasources(datasources) .withType(DatasourceDependency.TYPE_DB) .withSubtype(DatasourceDependency.SUBTYPE_CASSANDRA); }
/** * Create a copy of this StatusDetail, updates the message, changes the status to OK, * and return the new StatusDetail. * * @param message the new message * @return StatusDetail */ public StatusDetail toOk(final String message) { return statusDetail(name, OK, message, details); }
/** * Creates a generic ServiceDependencyBuilder with type="service" and subtype="OTHER". * * @param url the url or uri-template of the accessed service. * @return ServiceDependencyBuilder */ public static ServiceDependencyBuilder serviceDependency(final String url) { return new ServiceDependencyBuilder() .withUrl(url) .withType(ServiceDependency.TYPE_SERVICE) .withSubtype(ServiceDependency.SUBTYPE_OTHER); }
@Override public int hashCode() { int result = application != null ? application.hashCode() : 0; result = 31 * result + (system != null ? system.hashCode() : 0); result = 31 * result + (vcs != null ? vcs.hashCode() : 0); result = 31 * result + (team != null ? team.hashCode() : 0); result = 31 * result + (status != null ? status.hashCode() : 0); result = 31 * result + (statusDetails != null ? statusDetails.hashCode() : 0); result = 31 * result + (serviceSpecs != null ? serviceSpecs.hashCode() : 0); return result; }
public static ApplicationInfo applicationInfo(final String name, final String description, final String group, final String environment) { return new ApplicationInfo(name, description, group, environment); }
public static TeamInfo teamInfo(final String name, final String technicalContact, final String businessContact) { return new TeamInfo(name, technicalContact, businessContact); }
/** * Creates a generic DataSourceDependencyBuilder. * * @param datasources the datasources of the accessed database. * @return builder used to configure other datasource dependencies */ public static DatasourceDependencyBuilder datasourceDependency(final List<Datasource> datasources) { return new DatasourceDependencyBuilder() .withDatasources(datasources); } /**
/** * Creates a ServiceType. * * @param type The type of the service dependency. * @param criticality The criticality of the required service for the operation of this service. * @param disasterImpact Short description of the impact of outages: what would happen if the system is not operational? * * @return ServiceType */ public static ServiceType serviceType(final String type, final Criticality criticality, final String disasterImpact) { return new ServiceType(type, criticality, disasterImpact); }
public static ApplicationStatus applicationStatus(final ApplicationInfo applicationInfo, final SystemInfo systemInfo, final VersionInfo versionInfo, final TeamInfo teamInfo, final List<StatusDetail> details, final List<ServiceSpec> serviceSpecs) { return new ApplicationStatus(applicationInfo, systemInfo, versionInfo, teamInfo, details, serviceSpecs); }
/** * Factory method returning Expections with given availabilty and performance requirements. * * @param availability the expected availability * @param performance the expected performance * @return Expectations */ public static Expectations expects(final Availability availability, final Performance performance) { return new Expectations(availability, performance); }
/** * Creates a ClusterInfo instance with color and colorState information. * * @param color the color of the cluster in Blue/Green deployment scenarios. * @param colorState the state of the color, for example "staged" or "live" to determine if the color is currently * in production, or not. * @return ClusterInfo with color and state */ public static ClusterInfo clusterInfo(final String color, final String colorState) { return new ClusterInfo(() -> color, () -> colorState); }
/** * Creates a ServiceDependencyBuilder with type="db" and subtype="ElasticSearch". * * @param datasources the datasources of the accessed ES services. * @return builder used to configure ES datasource dependencies */ public static DatasourceDependencyBuilder elasticSearchDependency(final List<Datasource> datasources) { return new DatasourceDependencyBuilder() .withDatasources(datasources) .withType(DatasourceDependency.TYPE_DB) .withSubtype(DatasourceDependency.SUBTYPE_ELASTICSEARCH); }
/** * Create a copy of this StatusDetail, updates the message, changes the status to ERROR, * and return the new StatusDetail. * * @param message the new message * @return StatusDetail */ public StatusDetail toError(final String message) { return statusDetail(name, ERROR, message, details); }
/** * Creates a ServiceDependencyBuilder with type="db" and subtype="MongoDB". * * @param datasources the datasources of the accessed database. * @return builder used to configure MongoDB datasource dependencies */ public static DatasourceDependencyBuilder mongoDependency(final List<Datasource> datasources) { return new DatasourceDependencyBuilder() .withDatasources(datasources) .withType(DatasourceDependency.TYPE_DB) .withSubtype(DatasourceDependency.SUBTYPE_MONGODB); }
/** * Creates a ServiceDependencyBuilder with type="queue" and subtype="Kafka". * * @param datasources the datasources of the accessed queue. * @return builder used to configure Kafka datasource dependencies */ public static DatasourceDependencyBuilder kafkaDependency(final List<Datasource> datasources) { return new DatasourceDependencyBuilder() .withDatasources(datasources) .withType(DatasourceDependency.TYPE_QUEUE) .withSubtype(DatasourceDependency.SUBTYPE_KAFKA); }