Skip to content

Commit

Permalink
style: update prettier plugin configuration & apply
Browse files Browse the repository at this point in the history
  • Loading branch information
phiz71 authored and gaetanmaisse committed Mar 30, 2022
1 parent 147be9e commit 71c0698
Show file tree
Hide file tree
Showing 197 changed files with 9,210 additions and 11,102 deletions.
2 changes: 2 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
printWidth: 140
tabWidth: 4
194 changes: 97 additions & 97 deletions gravitee-node-api/src/main/java/io/gravitee/node/api/Monitoring.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,101 +23,101 @@
*/
public class Monitoring {

public static final String HEALTH_CHECK = "HEALTH_CHECK";
public static final String MONITOR = "MONITOR";
public static final String NODE_INFOS = "NODE_INFOS";

/**
* The unique identifier of the monitoring object.
*/
private String id;

/**
* The identifier of the node the monitoring object depends on.
*/
private String nodeId;

/**
* The type of monitoring object.
*/
private String type;

/**
* The payload data.
* @see io.gravitee.node.api.healthcheck.HealthCheck
* @see io.gravitee.node.api.monitor.Monitor
* @see io.gravitee.node.api.infos.NodeInfos
*/
private String payload;

/**
* The creation date.
*/
private Date createdAt;

/**
* The date corresponding to the time where the monitoring data have been evaluated.
*/
private Date evaluatedAt;

/**
* The last update date.
*/
private Date updatedAt;

public String getId() {
return id;
}

public void setId(String id) {
this.id = id;
}

public String getNodeId() {
return nodeId;
}

public void setNodeId(String nodeId) {
this.nodeId = nodeId;
}

public String getType() {
return type;
}

public void setType(String type) {
this.type = type;
}

public String getPayload() {
return payload;
}

public void setPayload(String payload) {
this.payload = payload;
}

public Date getCreatedAt() {
return createdAt;
}

public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}

public Date getUpdatedAt() {
return updatedAt;
}

public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}

public Date getEvaluatedAt() {
return evaluatedAt;
}

public void setEvaluatedAt(Date evaluatedAt) {
this.evaluatedAt = evaluatedAt;
}
public static final String HEALTH_CHECK = "HEALTH_CHECK";
public static final String MONITOR = "MONITOR";
public static final String NODE_INFOS = "NODE_INFOS";

/**
* The unique identifier of the monitoring object.
*/
private String id;

/**
* The identifier of the node the monitoring object depends on.
*/
private String nodeId;

/**
* The type of monitoring object.
*/
private String type;

/**
* The payload data.
* @see io.gravitee.node.api.healthcheck.HealthCheck
* @see io.gravitee.node.api.monitor.Monitor
* @see io.gravitee.node.api.infos.NodeInfos
*/
private String payload;

/**
* The creation date.
*/
private Date createdAt;

/**
* The date corresponding to the time where the monitoring data have been evaluated.
*/
private Date evaluatedAt;

/**
* The last update date.
*/
private Date updatedAt;

public String getId() {
return id;
}

public void setId(String id) {
this.id = id;
}

public String getNodeId() {
return nodeId;
}

public void setNodeId(String nodeId) {
this.nodeId = nodeId;
}

public String getType() {
return type;
}

public void setType(String type) {
this.type = type;
}

public String getPayload() {
return payload;
}

public void setPayload(String payload) {
this.payload = payload;
}

public Date getCreatedAt() {
return createdAt;
}

public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}

public Date getUpdatedAt() {
return updatedAt;
}

public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}

public Date getEvaluatedAt() {
return evaluatedAt;
}

public void setEvaluatedAt(Date evaluatedAt) {
this.evaluatedAt = evaluatedAt;
}
}
66 changes: 33 additions & 33 deletions gravitee-node-api/src/main/java/io/gravitee/node/api/Node.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,44 +26,44 @@
* @author GraviteeSource Team
*/
public interface Node extends LifecycleComponent<Node> {
String META_INSTALLATION = "installation";
String META_ORGANIZATIONS = "organizations";
String META_ENVIRONMENTS = "environments";
String META_INSTALLATION = "installation";
String META_ORGANIZATIONS = "organizations";
String META_ENVIRONMENTS = "environments";

String ID = UUID.toString(UUID.random());
String ID = UUID.toString(UUID.random());

/**
* Returns the node name in a human format
*
* @return The node name in a human format
*/
String name();
/**
* Returns the node name in a human format
*
* @return The node name in a human format
*/
String name();

/**
* Returns the node name in a technical format
*
* @return The node name in a technical format
*/
String application();
/**
* Returns the node name in a technical format
*
* @return The node name in a technical format
*/
String application();

/**
* Returns the node id.
*
* @return The node id.
*/
default String id() {
return ID;
}
/**
* Returns the node id.
*
* @return The node id.
*/
default String id() {
return ID;
}

default List<Class<? extends LifecycleComponent>> components() {
return Collections.emptyList();
}
default List<Class<? extends LifecycleComponent>> components() {
return Collections.emptyList();
}

default String hostname() {
return "";
}
default String hostname() {
return "";
}

default Map<String, Object> metadata() {
return Collections.emptyMap();
}
default Map<String, Object> metadata() {
return Collections.emptyMap();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
* @author GraviteeSource Team
*/
public interface NodeDeployer {
Node deploy(Node node);
Node deploy(Node node);
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
* @author GraviteeSource Team
*/
public interface NodeMetadataResolver {
public Map<String, Object> resolve();
public Map<String, Object> resolve();
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,40 +25,40 @@
* @author GraviteeSource Team
*/
public interface NodeMonitoringRepository {
/**
* Returns the {@link Monitoring} object corresponding to the specified type for the specified node identifier.
*
* @param nodeId the node identifier.
* @param type the type of monitoring (MONITOR, HEALTH_CHECK, NODE_INFOS).
*
* @return the {@link Monitoring} found or none if no corresponding monitoring object has been found.
*/
Maybe<Monitoring> findByNodeIdAndType(String nodeId, String type);
/**
* Returns the {@link Monitoring} object corresponding to the specified type for the specified node identifier.
*
* @param nodeId the node identifier.
* @param type the type of monitoring (MONITOR, HEALTH_CHECK, NODE_INFOS).
*
* @return the {@link Monitoring} found or none if no corresponding monitoring object has been found.
*/
Maybe<Monitoring> findByNodeIdAndType(String nodeId, String type);

/**
* Creates a {@link Monitoring} object.
* @param monitoring the monitoring object to create.
*
* @return the created {@link Monitoring} object.
*/
Single<Monitoring> create(Monitoring monitoring);
/**
* Creates a {@link Monitoring} object.
* @param monitoring the monitoring object to create.
*
* @return the created {@link Monitoring} object.
*/
Single<Monitoring> create(Monitoring monitoring);

/**
* Updates a {@link Monitoring} object.
* @param monitoring the monitoring object to update.
*
* @return the updated {@link Monitoring} object.
*/
Single<Monitoring> update(Monitoring monitoring);
/**
* Updates a {@link Monitoring} object.
* @param monitoring the monitoring object to update.
*
* @return the updated {@link Monitoring} object.
*/
Single<Monitoring> update(Monitoring monitoring);

/**
* Returns all the {@link Monitoring} objects corresponding to the specified type for the specified time frame.
*
* @param type the type of monitoring (MONITOR, HEALTH_CHECK, NODE_INFOS).
* @param from the beginning of the timeframe.
* @param to the end of the timeframe.
*
* @return the {@link Monitoring} found or none if no corresponding monitoring object has been found.
*/
Flowable<Monitoring> findByTypeAndTimeFrame(String type, long from, long to);
/**
* Returns all the {@link Monitoring} objects corresponding to the specified type for the specified time frame.
*
* @param type the type of monitoring (MONITOR, HEALTH_CHECK, NODE_INFOS).
* @param from the beginning of the timeframe.
* @param to the end of the timeframe.
*
* @return the {@link Monitoring} found or none if no corresponding monitoring object has been found.
*/
Flowable<Monitoring> findByTypeAndTimeFrame(String type, long from, long to);
}
Loading

0 comments on commit 71c0698

Please sign in to comment.