Skip to content

Commit

Permalink
Add Describable interface
Browse files Browse the repository at this point in the history
Signed-off-by: David Greven <[email protected]>
  • Loading branch information
grevend-bosch committed Nov 15, 2021
1 parent 5a3dd17 commit c8f9fde
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@
* @see Failure
* @since 0.1.0
*/
public interface CsFailureReason {
public interface CsFailureReason extends Describable {
/**
* A short summary of the failure reason description.
*
* @return the description synopsis
* @see #description()
* @since 0.1.0
*/
@Override
String synopsis();

/**
Expand All @@ -32,6 +33,7 @@ public interface CsFailureReason {
* @see #synopsis()
* @since 0.1.0
*/
@Override
String description();

/**
Expand Down
33 changes: 33 additions & 0 deletions common-types/src/main/java/io/carbynestack/common/Describable.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright (c) 2021 - for information on the respective copyright owner
* see the NOTICE file and/or the repository https://github.com/carbynestack/common.
*
* SPDX-License-Identifier: Apache-2.0
*/
package io.carbynestack.common;

/**
* Implementations of this interface represent describable
* objects that contain a description and synopsis.
*
* @since 0.1.0
*/
public interface Describable {
/**
* A short summary of the description.
*
* @return the description synopsis
* @see #description()
* @since 0.1.0
*/
String synopsis();

/**
* The description.
*
* @return the full description
* @see #synopsis()
* @since 0.1.0
*/
String description();
}

0 comments on commit c8f9fde

Please sign in to comment.