Class Mission

java.lang.Object
com.inesm.KeyManager.model.Mission
All Implemented Interfaces:
Resource, SharedResource, Serializable

public class Mission extends Object implements Serializable, SharedResource
Represents a joint usage context and sharing preferences for a set of keys.

All the getters and setters are the default ones.

Details about the meaning of each field are provided in the source code.

See Also:
  • Field Details

  • Constructor Details

    • Mission

      public Mission()
  • Method Details

    • patch

      public void patch(Mission upd)
      Updates the fields in the current object instance with the ones from another object. Will only update the fields that have been modified after the initialization.
      Parameters:
      upd - the object containing the fields to update the current instance with
    • getResourceID

      public String getResourceID()
      Description copied from interface: Resource
      Gets the station resource identifier.
      Specified by:
      getResourceID in interface Resource
      Returns:
      a string containing the resource identifier.
    • deserialize

      public void deserialize(String data) throws IOException, ClassNotFoundException
      Description copied from interface: Resource
      Deserializes the resource from a data string generated by the Resource.serialize() method.
      Specified by:
      deserialize in interface Resource
      Parameters:
      data - the serialized data as a string
      Throws:
      IOException - if an error occurred during the serialization process
      ClassNotFoundException - if its was not possible to load the class data, or the class data was not found
    • serialize

      public String serialize() throws IOException
      Description copied from interface: Resource
      Serializes a resource into a string.
      Specified by:
      serialize in interface Resource
      Returns:
      the string representing the serialization of the resource.
      Throws:
      IOException - if an error occurred during serialization
    • isKey

      public boolean isKey()
      Description copied from interface: SharedResource
      Checks if the resource is a Key.
      Specified by:
      isKey in interface SharedResource
      Returns:
      true if the resource is a key, false otherwise.
    • isMission

      public boolean isMission()
      Description copied from interface: SharedResource
      Checks if resource is a Mission.
      Specified by:
      isMission in interface SharedResource
      Returns:
      true if the resource is a mission, false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getMissionID

      public long getMissionID()
    • getLocation

      public String getLocation()
    • setLocation

      public void setLocation(String location)
    • getBranches

      public String getBranches()
    • setBranches

      public void setBranches(String branches)
    • setMissionID

      public void setMissionID(long missionID)
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getDescription

      public String getDescription()
    • setDescription

      public void setDescription(String description)
    • getStationID

      public long getStationID()
    • setStationID

      public void setStationID(long stationID)
    • getStartDate

      public LocalDateTime getStartDate()
    • setStartDate

      public void setStartDate(LocalDateTime startDate)
    • getEndDate

      public LocalDateTime getEndDate()
    • setEndDate

      public void setEndDate(LocalDateTime endDate)
    • getState

      public int getState()
    • setState

      public void setState(int state)
    • getStationName

      public String getStationName()
    • setStationName

      public void setStationName(String stationName)
    • getDistributionMode

      public int getDistributionMode()
    • setDistributionMode

      public void setDistributionMode(int distributionMode)
    • getMissionUUID

      public String getMissionUUID()
      Description copied from interface: SharedResource
      Gets the resource's assigned MissionUUID.
      Specified by:
      getMissionUUID in interface SharedResource
      Returns:
      the missionUUID of the mission the resource is assigned to
    • setMissionUUID

      public void setMissionUUID(String uuid)
    • getSharedStations

      public Set<String> getSharedStations()
    • setSharedStations

      public void setSharedStations(Set<String> sharedStations)
    • isInvalidAlert

      public boolean isInvalidAlert()
    • setInvalidAlert

      public void setInvalidAlert(boolean invalidAlert)
    • isWaitingAlert

      public boolean isWaitingAlert()
    • setWaitingAlert

      public void setWaitingAlert(boolean waitingAlert)