Class Destination

All Implemented Interfaces:
Serializable, Comparable<PerunBean>
Direct Known Subclasses:
RichDestination

public class Destination extends Auditable implements Comparable<PerunBean>
Destination where services are propagated.
Author:
Slavek Licehammer
See Also:
  • Field Details

  • Constructor Details

    • Destination

      public Destination()
    • Destination

      public Destination(int id, String destination)
    • Destination

      public Destination(int id, String destination, String type)
    • Destination

      public Destination(int id, String destination, String type, String propagationType)
    • Destination

      public Destination(int id, String destination, String type, String createdAt, String createdBy, String modifiedAt, String modifiedBy, Integer createdByUid, Integer modifiedByUid)
  • Method Details

    • compareTo

      public int compareTo(PerunBean perunBean)
      Specified by:
      compareTo in interface Comparable<PerunBean>
      Overrides:
      compareTo in class PerunBean
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Auditable
    • getDestination

      public String getDestination()
      Gets the destination for this instance.
      Returns:
      The name.
    • setDestination

      public void setDestination(String destination)
      Sets the destination for this instance.
      Parameters:
      destination - The destination.
    • getHostNameFromDestination

      public String getHostNameFromDestination()
      Gets the hostname from destination e.g. if destination is type user@host then return host e.g. if destination is type user@host:port then return host e.g. if destination is type user@host-windows then return host-windows if destination is other type then these three, return destination without changes

      if there is no chars @ and :, return not changed type if type is null, return this destination without changes if destination null, return destination without changes (null)

      Returns:
      host from destination if possible to separate, in other case return destination without changes
    • getPropagationType

      public String getPropagationType()
      Gets the propagation type for this instance.
      Returns:
      The propagation type, either "PARALLEL", "SERIAL" or "DUMMY"
    • setPropagationType

      public void setPropagationType(String type)
      Sets the propagation type for this instance.
      Parameters:
      type - The propagation type.
    • getType

      public String getType()
      Gets the type for this instance.
      Returns:
      The type.
    • setType

      public void setType(String type)
      Sets the type for this instance.
      Parameters:
      type - The type.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Auditable
    • serializeToString

      public String serializeToString()
      Overrides:
      serializeToString in class Auditable
    • toString

      public String toString()
      Overrides:
      toString in class Auditable