com.memority.citadel.shared.api.im.ObjectStatus Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of citadel-api Show documentation
Show all versions of citadel-api Show documentation
This artifact provides the API classes that are necessary to implement general configuration Rules on the Memority IM platform.
/*
* Copyright (c) 2016-2023 Memority. All Rights Reserved.
*
* This file is part of Memority Citadel API , a Memority project.
*
* This file is released under the Memority Public Artifacts End-User License Agreement,
* see
* Unauthorized copying of this file, via any medium is strictly prohibited.
*/
package com.memority.citadel.shared.api.im;
import com.fasterxml.jackson.annotation.JsonCreator;
import org.apache.commons.lang3.Validate;
/**
* Lifecycle status of the object.
*/
public enum ObjectStatus {
/**
* IM Object is in draft (not fully configured)
*/
DRAFT,
/**
* IM object is in its normal state
*/
NORMAL,
/**
* IM object is retired (deactivated by exceeding the enabledUntil date)
*/
RETIRED,
/**
* IM object is soft deleted
*/
DELETED,
/**
* IM object is failed (NOTE: usage currently not defined)
*/
FAILED;
@JsonCreator
public static ObjectStatus fromJson(String jsonValue) {
Validate.notBlank(jsonValue);
if ("ACTIVE".equalsIgnoreCase(jsonValue)) {
return NORMAL;
}
return ObjectStatus.valueOf(jsonValue.toUpperCase());
}
}