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

com.liberologico.cloudesire.cmw.model.enums.DeploymentStatusEnum Maven / Gradle / Ivy

The newest version!
package com.liberologico.cloudesire.cmw.model.enums;

import java.util.Collection;
import java.util.EnumSet;

public enum DeploymentStatusEnum
{
    /** waiting for deploy */
    PENDING,
    DEPLOYED,
    UNDEPLOYED,
    STOPPED,
    FAILED,
    /** requires approval by admin */
    PRE_APPROVAL,
    UNDEPLOY_SENT,
    /** app that requires post-configuration */
    POST_CONFIGURATION,
    /** only for normal orders, when invoice get paid become PENDING */
    WAITING_PAYMENT,
    /** invoice payment time expired */
    PAYMENT_EXPIRED;

    /**
     * The statuses in which the subscription is active
     */
    public static Collection active()
    {
        return EnumSet.of( DEPLOYED, FAILED, POST_CONFIGURATION );
    }

    /**
     * The statuses for a subscription to be renewed automatically
     */
    public static Collection autoRenewable()
    {
        return EnumSet.of( DEPLOYED );
    }

    /**
     * The statuses in which the subscription has been/will be undeployed
     */
    public static Collection undeployed()
    {
        return EnumSet.of( PAYMENT_EXPIRED, UNDEPLOY_SENT, UNDEPLOYED );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy