examples/appnet-api-server/src/main/java/com/hedera/hashgraph/identity/hcs/example/appnet/handlers/VcHandler.java
/**
   * Constructs a new VC topic message for the given VC operation and credential hash.
   * The unsigned message is written into the response body.
   *
   * @param ctx       The HTTP context.
   * @param operation The operation on VC.
   */
Constructs a new VC topic message for the given VC operation and credential hash.
The unsigned message is written into the response body.

@param ctx       The HTTP context.
@param operation The operation on VC.
Constructs a new VC topic message for the given VC operation and credential hash . The unsigned message is written into the response body . @param ctx The HTTP context . @param operation The operation on VC .
private void buildVcMessage(final Context ctx, final HcsVcOperation operation) {
    String credentialHash = ctx.getPathTokens().get(PATH_PARAM_CREDENTIAL_HASH);
    try {
      MessageEnvelope<HcsVcMessage> message = HcsVcMessage.fromCredentialHash(credentialHash, operation);
      ctx.render(message.toJson());
    } catch (Exception e) {
      ctx.getResponse().status(Status.BAD_REQUEST);
      ctx.render(Jackson.json(new ErrorResponse(e)));
    }
  }
private void buildVcMessage ( final Context ctx , final HcsVcOperation operation ) { String credentialHash = ctx . getPathTokens ( ) . get ( PATH_PARAM_CREDENTIAL_HASH ) ; try { MessageEnvelope < HcsVcMessage > message = HcsVcMessage . fromCredentialHash ( credentialHash , operation ) ; ctx . render ( message . toJson ( ) ) ; } catch ( Exception e ) { ctx . getResponse ( ) . status ( Status . BAD_REQUEST ) ; ctx . render ( Jackson . json ( new ErrorResponse ( e ) ) ) ; } }
Constructs a new VC topic message for the given VC operation and credential hash.
Constructs a new VC topic message for the given VC operation and credential hash .