Class CompositeScheduleModel

All Implemented Interfaces:
BindableModel, Serializable

public class CompositeScheduleModel extends AbstractScheduleModel
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getType

      public String getType()
      Specified by:
      getType in class AbstractScheduleModel
    • getScheduleForDay

      public Timeline getScheduleForDay(Calendar cal) throws Exception
      Description copied from class: AbstractScheduleModel
      Returns a Timeline object with the day's schedule, or null if no schedule for the day.
      Specified by:
      getScheduleForDay in class AbstractScheduleModel
      Throws:
      Exception
    • isObserveHolidays

      public boolean isObserveHolidays()
      Specified by:
      isObserveHolidays in class AbstractScheduleModel
    • setObserveHolidays

      public void setObserveHolidays(boolean observeHolidays)
      Specified by:
      setObserveHolidays in class AbstractScheduleModel
    • getModels

      public List<AbstractScheduleModel> getModels()
    • serializeToTypedArray

      public static <T> com.inductiveautomation.ignition.common.gson.JsonArray serializeToTypedArray(List<T> list, com.inductiveautomation.ignition.common.gson.JsonSerializationContext context)
      For lists that contain objects of different types, this method can be used to serialize the list, while preserving the type for deserialization. Used in conjunction with deserializeFromTypedArray(JsonArray, JsonDeserializationContext, Class).
    • serializeToTypedElement

      public static com.inductiveautomation.ignition.common.gson.JsonElement serializeToTypedElement(Object object, com.inductiveautomation.ignition.common.gson.JsonSerializationContext context)
      For objects that are subclasses of a common type, erasure can cause issues when deserializing. This method preserves the type of the object when serializing, so that it can be deserialized correctly using deserializeFromTypedElement(JsonElement, JsonDeserializationContext, Class).
      Parameters:
      object - The object to serialize
      context - The serialization context
      Returns:
      A JsonElement that contains the serialized object
    • deserializeFromTypedArray

      public static <T> List<T> deserializeFromTypedArray(com.inductiveautomation.ignition.common.gson.JsonArray array, com.inductiveautomation.ignition.common.gson.JsonDeserializationContext context, Class<T> clazz)
      Method is used to deserialize a list of objects that were serialized using serializeToTypedArray(List, JsonSerializationContext). See that method for an explanation of the context of usage.
    • deserializeFromTypedElement

      public static <T> T deserializeFromTypedElement(com.inductiveautomation.ignition.common.gson.JsonElement element, com.inductiveautomation.ignition.common.gson.JsonDeserializationContext context, Class<T> clazz)
      Method is used to deserialize an object that was serialized using serializeToTypedElement(Object, JsonSerializationContext). See that method of an explanation of the context of usage.