Class ServiceRegistrationJpaImpl

java.lang.Object
org.opencastproject.serviceregistry.impl.jpa.ServiceRegistrationJpaImpl
All Implemented Interfaces:
org.opencastproject.serviceregistry.api.ServiceRegistration

@Entity(name="ServiceRegistration") public class ServiceRegistrationJpaImpl extends Object implements org.opencastproject.serviceregistry.api.ServiceRegistration
A record of a service that creates and manages receipts.
  • Constructor Details

    • ServiceRegistrationJpaImpl

      public ServiceRegistrationJpaImpl()
      Creates a new service registration which is online
    • ServiceRegistrationJpaImpl

      public ServiceRegistrationJpaImpl(HostRegistrationJpaImpl hostRegistration, String serviceType, String path)
      Creates a new service registration which is online
      Parameters:
      hostRegistration - the host registration
      serviceType - the type of job this service handles
      path - the URL path on this host to the service endpoint
    • ServiceRegistrationJpaImpl

      public ServiceRegistrationJpaImpl(HostRegistrationJpaImpl hostRegistration, String serviceType, String path, boolean jobProducer)
      Creates a new service registration which is online and not in maintenance mode.
      Parameters:
      hostRegistration - the host registration
      serviceType - the type of job this service handles
      path - the URL path on this host to the service endpoint
      jobProducer -
  • Method Details

    • getId

      public Long getId()
      Gets the primary key for this service registration.
      Returns:
      the primary key
    • setId

      public void setId(Long id)
      Sets the primary key identifier.
      Parameters:
      id - the identifier
    • getOnlineFrom

      public Date getOnlineFrom()
      Specified by:
      getOnlineFrom in interface org.opencastproject.serviceregistry.api.ServiceRegistration
    • setOnlineFrom

      public void setOnlineFrom(Date onlineFrom)
    • getServiceType

      public String getServiceType()
      Specified by:
      getServiceType in interface org.opencastproject.serviceregistry.api.ServiceRegistration
    • getPath

      public String getPath()
      Specified by:
      getPath in interface org.opencastproject.serviceregistry.api.ServiceRegistration
    • setPath

      public void setPath(String path)
    • getServiceState

      public org.opencastproject.serviceregistry.api.ServiceState getServiceState()
      Specified by:
      getServiceState in interface org.opencastproject.serviceregistry.api.ServiceRegistration
    • setServiceState

      public void setServiceState(org.opencastproject.serviceregistry.api.ServiceState serviceState)
    • setServiceState

      public void setServiceState(org.opencastproject.serviceregistry.api.ServiceState state, int triggerJobSignature)
    • getStateChanged

      public Date getStateChanged()
      Specified by:
      getStateChanged in interface org.opencastproject.serviceregistry.api.ServiceRegistration
    • setStateChanged

      public void setStateChanged(Date stateChanged)
    • getWarningStateTrigger

      public int getWarningStateTrigger()
      Specified by:
      getWarningStateTrigger in interface org.opencastproject.serviceregistry.api.ServiceRegistration
    • setWarningStateTrigger

      public void setWarningStateTrigger(int warningStateTrigger)
    • getErrorStateTrigger

      public int getErrorStateTrigger()
      Specified by:
      getErrorStateTrigger in interface org.opencastproject.serviceregistry.api.ServiceRegistration
    • setErrorStateTrigger

      public void setErrorStateTrigger(int errorStateTrigger)
    • isActive

      public boolean isActive()
      Specified by:
      isActive in interface org.opencastproject.serviceregistry.api.ServiceRegistration
    • setActive

      public void setActive(boolean isActive)
    • isOnline

      public boolean isOnline()
      Specified by:
      isOnline in interface org.opencastproject.serviceregistry.api.ServiceRegistration
    • setOnline

      public void setOnline(boolean online)
    • isJobProducer

      public boolean isJobProducer()
      Specified by:
      isJobProducer in interface org.opencastproject.serviceregistry.api.ServiceRegistration
    • setJobProducer

      public void setJobProducer(boolean isJobProducer)
    • isInMaintenanceMode

      public boolean isInMaintenanceMode()
      Specified by:
      isInMaintenanceMode in interface org.opencastproject.serviceregistry.api.ServiceRegistration
    • getHost

      public String getHost()
      Specified by:
      getHost in interface org.opencastproject.serviceregistry.api.ServiceRegistration
    • getHostRegistration

      public HostRegistrationJpaImpl getHostRegistration()
      Gets the associated HostRegistrationJpaImpl
      Returns:
      the host registration
    • setHostRegistration

      public void setHostRegistration(HostRegistrationJpaImpl hostRegistration)
      Parameters:
      hostRegistration - the hostRegistration to set
    • postLoad

      public void postLoad()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

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

      public String toString()
      Overrides:
      toString in class Object