All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.bdeploy.jersey.ws.change.msg.ObjectChangeDto Maven / Gradle / Ivy

Go to download

Public API including dependencies, ready to be used for integrations and plugins.

There is a newer version: 7.3.6
Show newest version
package io.bdeploy.jersey.ws.change.msg;

import java.util.Collections;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Represents a change in an object
 */
public class ObjectChangeDto {

    /**
     * The type of the object.
     */
    public String type;

    /**
     * The scope of the object.
     */
    public ObjectScope scope;

    /**
     * The event which happened.
     */
    public ObjectEvent event;

    /**
     * Type and event specific details about the event.
     */
    public Map details;

    @JsonCreator
    public ObjectChangeDto(@JsonProperty("type") String type, @JsonProperty("scope") ObjectScope scope,
            @JsonProperty("event") ObjectEvent event, @JsonProperty("details") Map details) {
        this.type = type;
        this.scope = scope == null ? ObjectScope.EMPTY : scope;
        this.event = event;
        this.details = details == null ? Collections.emptyMap() : details;
    }

    @Override
    public String toString() {
        return "ObjectChange { type=" + type + ", event=" + event + ", scope=" + scope + ", details=" + details + " }";
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy