Enum AdStatus
- java.lang.Object
-
- java.lang.Enum<AdStatus>
-
- org.cyclos.model.marketplace.advertisements.AdStatus
-
- All Implemented Interfaces:
Serializable,Comparable<AdStatus>,HasMessageKey
public enum AdStatus extends Enum<AdStatus> implements HasMessageKey
The status of the Ad
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACTIVEPersisted status but calculated after read from database to ensure it is really active or has already expired/scheduled.DISABLEDCalculated status (never persisted)DRAFTPersisted status.EXPIREDCalculated status (never persisted) according to the publication period.HIDDENPersisted status.PENDINGPersisted status.SCHEDULEDCalculated status (never persisted) according to the publication period.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageKeygetMessageKey()booleanisActive()static EnumMessageKeyResolver<AdStatus>resolverForReport()static AdStatusvalueOf(String name)Returns the enum constant of this type with the specified name.static AdStatus[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DRAFT
public static final AdStatus DRAFT
Persisted status. An ad can have this status only if the system is configured to require authorizations. In draft status, only the owner can see and edit the ad.
-
PENDING
public static final AdStatus PENDING
Persisted status. An ad can have this status only if the system is configured to require authorizations. The ad is pending for an authorization and cannot be seen by other members.
-
ACTIVE
public static final AdStatus ACTIVE
Persisted status but calculated after read from database to ensure it is really active or has already expired/scheduled. The ad is published and can be seen by other members.
-
SCHEDULED
public static final AdStatus SCHEDULED
Calculated status (never persisted) according to the publication period. Has a future publication period.
-
EXPIRED
public static final AdStatus EXPIRED
Calculated status (never persisted) according to the publication period. Has reached the end of its publication period.
-
HIDDEN
public static final AdStatus HIDDEN
Persisted status. Prevents the ad from being seen by other members.
-
DISABLED
public static final AdStatus DISABLED
Calculated status (never persisted)
-
-
Method Detail
-
values
public static AdStatus[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AdStatus c : AdStatus.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AdStatus valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
resolverForReport
public static EnumMessageKeyResolver<AdStatus> resolverForReport()
-
getMessageKey
public MessageKey getMessageKey()
- Specified by:
getMessageKeyin interfaceHasMessageKey
-
isActive
public boolean isActive()
-
-