Class HostBean

java.lang.Object
ecmwf.web.dao.ModelBeanBase
ecmwf.ecpds.master.plugin.http.dao.transfer.HostBean
All Implemented Interfaces:
OjbImplementedBean, CollectionSizeBean, Host, ecmwf.web.model.ModelBean

public class HostBean extends ecmwf.web.dao.ModelBeanBase implements Host, OjbImplementedBean
The Class HostBean.
  • Constructor Details

    • HostBean

      public HostBean(ecmwf.web.model.users.User user, Host host)
      Instantiates a new host bean.
      Parameters:
      user - the user
      host - the host
    • HostBean

      public HostBean(Host host)
      Instantiates a new host bean.
      Parameters:
      host - the host
  • Method Details

    • setUser

      public void setUser(ecmwf.web.model.users.User user)
      Sets the user. Sets the user.
      Specified by:
      setUser in interface Host
      Parameters:
      user - the new user
    • getUser

      public ecmwf.web.model.users.User getUser()
      Gets the user. Gets the user.
      Specified by:
      getUser in interface Host
      Returns:
      the user
    • getBeanInterfaceName

      public String getBeanInterfaceName()
      Gets the bean interface name.
      Specified by:
      getBeanInterfaceName in interface ecmwf.web.model.ModelBean
      Specified by:
      getBeanInterfaceName in class ecmwf.web.dao.ModelBeanBase
    • getOjbImplementation

      public DataBaseObject getOjbImplementation()
      Gets the ojb implementation. Gets the ojb implementation.
      Specified by:
      getOjbImplementation in interface Host
      Specified by:
      getOjbImplementation in interface OjbImplementedBean
      Returns:
      the ojb implementation
    • setOjbImplementation

      public void setOjbImplementation(Object object)
      Sets the ojb implementation.
      Parameters:
      object - the new ojb implementation
    • getId

      public String getId()
      Gets the id.
      Specified by:
      getId in interface ecmwf.web.model.ModelBean
      Overrides:
      getId in class ecmwf.web.dao.ModelBeanBase
    • getCollectionSize

      public int getCollectionSize()
      Gets the collection size. Gets the collection size.
      Specified by:
      getCollectionSize in interface CollectionSizeBean
      Returns:
      the collection size
    • getCheckTime

      public Date getCheckTime()
      Gets the check time. Gets the check time.
      Specified by:
      getCheckTime in interface Host
      Returns:
      the check time
    • getAcquisitionTime

      public Date getAcquisitionTime()
      Gets the acquisition time.
      Returns:
      the acquisition time
    • getCheckFrequency

      public long getCheckFrequency()
      Gets the check frequency. Gets the check frequency.
      Specified by:
      getCheckFrequency in interface Host
      Returns:
      the check frequency
    • getFormattedCheckFrequency

      public String getFormattedCheckFrequency()
      Gets the formatted check frequency. Gets the formatted check frequency.
      Specified by:
      getFormattedCheckFrequency in interface Host
      Returns:
      the formatted check frequency
    • getAcquisitionFrequency

      public long getAcquisitionFrequency()
      Gets the acquisition frequency. Gets the acquisition frequency.
      Specified by:
      getAcquisitionFrequency in interface Host
      Returns:
      the acquisition frequency
    • getFormattedAcquisitionFrequency

      public String getFormattedAcquisitionFrequency()
      Gets the formatted acquisition frequency. Gets the formatted acquisition frequency.
      Specified by:
      getFormattedAcquisitionFrequency in interface Host
      Returns:
      the formatted acquisition frequency
    • getValid

      public boolean getValid()
      Gets the valid. Gets the valid.
      Specified by:
      getValid in interface Host
      Returns:
      the valid
    • getCheck

      public boolean getCheck()
      Gets the check. Gets the check.
      Specified by:
      getCheck in interface Host
      Returns:
      the check
    • getCheckFilename

      public String getCheckFilename()
      Gets the check filename. Gets the check filename.
      Specified by:
      getCheckFilename in interface Host
      Returns:
      the check filename
    • getMailOnSuccess

      public boolean getMailOnSuccess()
      Gets the mail on success. Gets the mail on success.
      Specified by:
      getMailOnSuccess in interface Host
      Returns:
      the mail on success
    • getMailOnError

      public boolean getMailOnError()
      Gets the mail on error. Gets the mail on error.
      Specified by:
      getMailOnError in interface Host
      Returns:
      the mail on error
    • getNotifyOnce

      public boolean getNotifyOnce()
      Gets the notify once. Gets the notify once.
      Specified by:
      getNotifyOnce in interface Host
      Returns:
      the notify once
    • getUserMail

      public String getUserMail()
      Gets the user mail. Gets the user mail.
      Specified by:
      getUserMail in interface Host
      Returns:
      the user mail
    • getActive

      public boolean getActive()
      Gets the active. Gets the active.
      Specified by:
      getActive in interface Host
      Returns:
      the active
    • getComment

      public String getComment()
      Gets the comment. Gets the comment.
      Specified by:
      getComment in interface Host
      Returns:
      the comment
    • getConnections

      public int getConnections()
      Gets the connections. Gets the connections.
      Specified by:
      getConnections in interface Host
      Returns:
      the connections
    • getProperties

      public String getProperties()
      Gets the properties. Gets the properties.
      Specified by:
      getProperties in interface Host
      Returns:
      the properties
    • getJavascript

      public String getJavascript()
      Gets the javascript. Gets the javascript.
      Specified by:
      getJavascript in interface Host
      Returns:
      the javascript
    • getData

      public String getData()
      Gets the data. Gets the data. This is the method which is called from the JSP to get the content of the setup.
      Specified by:
      getData in interface Host
      Returns:
      the data
    • getLastOutput

      public String getLastOutput()
      Gets the last output. Gets the last output.
      Specified by:
      getLastOutput in interface Host
      Returns:
      the last output
    • getFormattedLastOutput

      public String getFormattedLastOutput()
      Gets the formatted last output. Gets the formatted last output.
      Specified by:
      getFormattedLastOutput in interface Host
      Returns:
      the formatted last output
    • getEcUser

      public EcUser getEcUser() throws EcUserException
      Gets the ec user. Gets the ec user.
      Specified by:
      getEcUser in interface Host
      Returns:
      the ec user
      Throws:
      EcUserException - the ec user exception
    • getECUserName

      public String getECUserName()
      Gets the EC user name. Gets the EC user name.
      Specified by:
      getECUserName in interface Host
      Returns:
      the EC user name
    • getHost

      public String getHost()
      Gets the host. Gets the host.
      Specified by:
      getHost in interface Host
      Returns:
      the host
    • getLogin

      public String getLogin()
      Gets the login. Gets the login.
      Specified by:
      getLogin in interface Host
      Returns:
      the login
    • getMaxConnections

      public int getMaxConnections()
      Gets the max connections. Gets the max connections.
      Specified by:
      getMaxConnections in interface Host
      Returns:
      the max connections
    • getName

      public String getName()
      Gets the name. Gets the name.
      Specified by:
      getName in interface Host
      Returns:
      the name
    • getPasswd

      public String getPasswd()
      Gets the passwd. Gets the passwd.
      Specified by:
      getPasswd in interface Host
      Returns:
      the passwd
    • getRetryCount

      public int getRetryCount()
      Gets the retry count. Gets the retry count.
      Specified by:
      getRetryCount in interface Host
      Returns:
      the retry count
    • getRetryFrequency

      public int getRetryFrequency()
      Gets the retry frequency. Gets the retry frequency.
      Specified by:
      getRetryFrequency in interface Host
      Returns:
      the retry frequency
    • getFormattedRetryFrequency

      public String getFormattedRetryFrequency()
      Gets the formatted retry frequency. Gets the formatted retry frequency.
      Specified by:
      getFormattedRetryFrequency in interface Host
      Returns:
      the formatted retry frequency
    • getTransferGroup

      public TransferGroup getTransferGroup() throws DataFileException
      Gets the transfer group. Gets the transfer group.
      Specified by:
      getTransferGroup in interface Host
      Returns:
      the transfer group
      Throws:
      DataFileException - the data file exception
    • getTransferGroupName

      public String getTransferGroupName()
      Gets the transfer group name. Gets the transfer group name.
      Specified by:
      getTransferGroupName in interface Host
      Returns:
      the transfer group name
    • getTransferMethod

      public TransferMethod getTransferMethod() throws TransferException
      Gets the transfer method. Gets the transfer method.
      Specified by:
      getTransferMethod in interface Host
      Returns:
      the transfer method
      Throws:
      TransferException - the transfer exception
    • getTransferMethodName

      public String getTransferMethodName()
      Gets the transfer method name. Gets the transfer method name.
      Specified by:
      getTransferMethodName in interface Host
      Returns:
      the transfer method name
    • getDataTransfersToday

      public Collection<DataTransferLightBean> getDataTransfersToday() throws TransferException
      Gets the data transfers today. Gets the data transfers today.
      Specified by:
      getDataTransfersToday in interface Host
      Returns:
      the data transfers today
      Throws:
      TransferException - the transfer exception
    • getAllowedUsers

      public Collection<EcUser> getAllowedUsers() throws TransferException
      Gets the allowed users. Gets the allowed users.
      Specified by:
      getAllowedUsers in interface Host
      Returns:
      the allowed users
      Throws:
      TransferException - the transfer exception
    • setCheckFrequency

      public void setCheckFrequency(long i)
      Sets the check frequency. Sets the check frequency.
      Specified by:
      setCheckFrequency in interface Host
      Parameters:
      i - the new check frequency
    • setAcquisitionFrequency

      public void setAcquisitionFrequency(long i)
      Sets the acquisition frequency. Sets the acquisition frequency.
      Specified by:
      setAcquisitionFrequency in interface Host
      Parameters:
      i - the new acquisition frequency
    • setCheck

      public void setCheck(boolean b)
      Sets the check. Sets the check.
      Specified by:
      setCheck in interface Host
      Parameters:
      b - the new check
    • setCheckFilename

      public void setCheckFilename(String s)
      Sets the check filename. Sets the check filename.
      Specified by:
      setCheckFilename in interface Host
      Parameters:
      s - the new check filename
    • setMailOnSuccess

      public void setMailOnSuccess(boolean b)
      Sets the mail on success. Sets the mail on success.
      Specified by:
      setMailOnSuccess in interface Host
      Parameters:
      b - the new mail on success
    • setMailOnError

      public void setMailOnError(boolean b)
      Sets the mail on error. Sets the mail on error.
      Specified by:
      setMailOnError in interface Host
      Parameters:
      b - the new mail on error
    • setNotifyOnce

      public void setNotifyOnce(boolean b)
      Sets the notify once. Sets the notify once.
      Specified by:
      setNotifyOnce in interface Host
      Parameters:
      b - the new notify once
    • setUserMail

      public void setUserMail(String s)
      Sets the user mail. Sets the user mail.
      Specified by:
      setUserMail in interface Host
      Parameters:
      s - the new user mail
    • setActive

      public void setActive(boolean b)
      Sets the active. Sets the active.
      Specified by:
      setActive in interface Host
      Parameters:
      b - the new active
    • setComment

      public void setComment(String s)
      Sets the comment. Sets the comment.
      Specified by:
      setComment in interface Host
      Parameters:
      s - the new comment
    • setData

      public void setData(String s)
      Sets the data. Sets the data.
      Specified by:
      setData in interface Host
      Parameters:
      s - the new data
    • setECUserName

      public void setECUserName(String u)
      Sets the EC user name. Sets the EC user name.
      Specified by:
      setECUserName in interface Host
      Parameters:
      u - the new EC user name
    • setHost

      public void setHost(String s)
      Sets the host. Sets the host.
      Specified by:
      setHost in interface Host
      Parameters:
      s - the new host
    • setLogin

      public void setLogin(String s)
      Sets the login. Sets the login.
      Specified by:
      setLogin in interface Host
      Parameters:
      s - the new login
    • setMaxConnections

      public void setMaxConnections(int i)
      Sets the max connections. Sets the max connections.
      Specified by:
      setMaxConnections in interface Host
      Parameters:
      i - the new max connections
    • setName

      public void setName(String s)
      Sets the name. Sets the name.
      Specified by:
      setName in interface Host
      Parameters:
      s - the new name
    • setPasswd

      public void setPasswd(String s)
      Sets the passwd. Sets the passwd.
      Specified by:
      setPasswd in interface Host
      Parameters:
      s - the new passwd
    • setRetryCount

      public void setRetryCount(int i)
      Sets the retry count. Sets the retry count.
      Specified by:
      setRetryCount in interface Host
      Parameters:
      i - the new retry count
    • setRetryFrequency

      public void setRetryFrequency(int i)
      Sets the retry frequency. Sets the retry frequency.
      Specified by:
      setRetryFrequency in interface Host
      Parameters:
      i - the new retry frequency
    • setTransferMethod

      public void setTransferMethod(TransferMethod m)
      Sets the transfer method. Sets the transfer method.
      Specified by:
      setTransferMethod in interface Host
      Parameters:
      m - the new transfer method
    • setTransferMethodName

      public void setTransferMethodName(String s)
      Sets the transfer method name. Sets the transfer method name.
      Specified by:
      setTransferMethodName in interface Host
      Parameters:
      s - the new transfer method name
    • setTransferGroup

      public void setTransferGroup(TransferGroup m)
      Sets the transfer group. Sets the transfer group.
      Specified by:
      setTransferGroup in interface Host
      Parameters:
      m - the new transfer group
    • setTransferGroupName

      public void setTransferGroupName(String s)
      Sets the transfer group name. Sets the transfer group name.
      Specified by:
      setTransferGroupName in interface Host
      Parameters:
      s - the new transfer group name
    • increasePriorityWithinDestination

      public void increasePriorityWithinDestination(Destination d, int step)
      Increase priority within destination. Increase priority within destination.
      Specified by:
      increasePriorityWithinDestination in interface Host
      Parameters:
      d - the d
      step - the step
    • decreasePriorityWithinDestination

      public void decreasePriorityWithinDestination(Destination d, int step)
      Decrease priority within destination. Decrease priority within destination.
      Specified by:
      decreasePriorityWithinDestination in interface Host
      Parameters:
      d - the d
      step - the step
    • addAllowedUser

      public void addAllowedUser(EcUser u)
      Adds the allowed user. Adds the allowed user.
      Specified by:
      addAllowedUser in interface Host
      Parameters:
      u - the u
    • deleteAllowedUser

      public void deleteAllowedUser(EcUser u)
      Delete allowed user. Delete allowed user.
      Specified by:
      deleteAllowedUser in interface Host
      Parameters:
      u - the u
    • equals

      public boolean equals(Object o)
      Equals.
      Overrides:
      equals in class Object
    • equals

      public boolean equals(HostBean u)
      Equals.
      Parameters:
      u - the u
      Returns:
      true, if successful
    • hashCode

      public int hashCode()
      Hash code.
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      To string.
      Overrides:
      toString in class Object
    • getDir

      public String getDir()
      Gets the dir. Gets the dir.
      Specified by:
      getDir in interface Host
      Returns:
      the dir
    • setDir

      public void setDir(String s)
      Sets the dir. Sets the dir.
      Specified by:
      setDir in interface Host
      Parameters:
      s - the new dir
    • getDuration

      public long getDuration()
      Gets the duration. Gets the duration.
      Specified by:
      getDuration in interface Host
      Returns:
      the duration
    • getFormattedDuration

      public String getFormattedDuration()
      Gets the formatted duration. Gets the formatted duration.
      Specified by:
      getFormattedDuration in interface Host
      Returns:
      the formatted duration
    • getSent

      public long getSent()
      Gets the sent. Gets the sent.
      Specified by:
      getSent in interface Host
      Returns:
      the sent
    • getFormattedSent

      public String getFormattedSent()
      Gets the formatted sent. Gets the formatted sent.
      Specified by:
      getFormattedSent in interface Host
      Returns:
      the formatted sent
    • getBandWidth

      public long getBandWidth()
      Gets the band width. Gets the band width.
      Specified by:
      getBandWidth in interface Host
      Returns:
      the band width
    • getFormattedBandWidth

      public String getFormattedBandWidth()
      Gets the formatted band width. Gets the formatted band width.
      Specified by:
      getFormattedBandWidth in interface Host
      Returns:
      the formatted band width
    • getFormattedBandWidthInMBitsPerSeconds

      public double getFormattedBandWidthInMBitsPerSeconds()
      Gets the formatted band width in M bits per seconds. Gets the formatted band width in M bits per seconds.
      Specified by:
      getFormattedBandWidthInMBitsPerSeconds in interface Host
      Returns:
      the formatted band width in M bits per seconds
    • getDestinations

      public Collection<Destination> getDestinations() throws TransferException
      Gets the destinations. Gets the destinations.
      Specified by:
      getDestinations in interface Host
      Returns:
      the destinations
      Throws:
      TransferException - the transfer exception
    • transfer

      public long transfer(ecmwf.web.model.users.User u, byte[] bytes, String target, long remotePos) throws TransferException
      Transfer. Transfer.
      Specified by:
      transfer in interface Host
      Parameters:
      u - the u
      bytes - the bytes
      target - the target
      remotePos - the remote pos
      Returns:
      the long
      Throws:
      TransferException - the transfer exception
    • getReport

      public String getReport(ecmwf.web.model.users.User u) throws TransferException
      Gets the report. Gets the report.
      Specified by:
      getReport in interface Host
      Parameters:
      u - the u
      Returns:
      the report
      Throws:
      TransferException - the transfer exception
    • getReport

      public String getReport(ecmwf.web.model.users.User u, Host proxy) throws TransferException
      Gets the report. Gets the report.
      Specified by:
      getReport in interface Host
      Parameters:
      u - the u
      proxy - the proxy
      Returns:
      the report
      Throws:
      TransferException - the transfer exception
    • getOutput

      public RemoteInputStream getOutput(ecmwf.web.model.users.User u) throws TransferException
      Gets the output. Gets the output.
      Specified by:
      getOutput in interface Host
      Parameters:
      u - the u
      Returns:
      the output
      Throws:
      TransferException - the transfer exception
    • resetTransferStatistics

      public void resetTransferStatistics(ecmwf.web.model.users.User u) throws TransferException
      Reset transfer statistics. Reset transfer statistics.
      Specified by:
      resetTransferStatistics in interface Host
      Parameters:
      u - the u
      Throws:
      TransferException - the transfer exception
    • cleanDataWindow

      public void cleanDataWindow(ecmwf.web.model.users.User u) throws TransferException
      Clean data window. Clean data window.
      Specified by:
      cleanDataWindow in interface Host
      Parameters:
      u - the u
      Throws:
      TransferException - the transfer exception
    • getChangeLogList

      public Collection<ChangeLog> getChangeLogList() throws TransferException
      Gets the change log list. Gets the change log list.
      Specified by:
      getChangeLogList in interface Host
      Returns:
      the change log list
      Throws:
      TransferException - the transfer exception
    • getAutomaticLocation

      public boolean getAutomaticLocation()
      Gets the automatic location. Gets the automatic location.
      Specified by:
      getAutomaticLocation in interface Host
      Returns:
      the automatic location
    • setAutomaticLocation

      public void setAutomaticLocation(boolean b)
      Sets the automatic location. Sets the automatic location.
      Specified by:
      setAutomaticLocation in interface Host
      Parameters:
      b - the new automatic location
    • getLatitude

      public Double getLatitude()
      Gets the latitude. Gets the latitude.
      Specified by:
      getLatitude in interface Host
      Returns:
      the latitude
    • setLatitude

      public void setLatitude(Double f)
      Sets the latitude. Sets the latitude.
      Specified by:
      setLatitude in interface Host
      Parameters:
      f - the new latitude
    • getLongitude

      public Double getLongitude()
      Gets the longitude. Gets the longitude.
      Specified by:
      getLongitude in interface Host
      Returns:
      the longitude
    • setLongitude

      public void setLongitude(Double f)
      Sets the longitude. Sets the longitude.
      Specified by:
      setLongitude in interface Host
      Parameters:
      f - the new longitude
    • getNickName

      public String getNickName()
      Gets the nick name. Gets the nick name.
      Specified by:
      getNickName in interface Host
      Returns:
      the nick name
    • setNickName

      public void setNickName(String s)
      Sets the nick name. Sets the nick name.
      Specified by:
      setNickName in interface Host
      Parameters:
      s - the new nick name
    • getType

      public String getType()
      Gets the type. Gets the type.
      Specified by:
      getType in interface Host
      Returns:
      the type
    • setType

      public void setType(String s)
      Sets the type. Sets the type.
      Specified by:
      setType in interface Host
      Parameters:
      s - the new type
    • setAcquisitionFrequency

      public void setAcquisitionFrequency(String s)
      Sets the acquisition frequency.
      Parameters:
      s - the new acquisition frequency
    • getFilterName

      public String getFilterName()
      Gets the filter name. Gets the filter name.
      Specified by:
      getFilterName in interface Host
      Returns:
      the filter name
    • setFilterName

      public void setFilterName(String s)
      Sets the filter name. Sets the filter name.
      Specified by:
      setFilterName in interface Host
      Parameters:
      s - the new filter name
    • getNetworkName

      public String getNetworkName()
      Gets the network name. Gets the network name.
      Specified by:
      getNetworkName in interface Host
      Returns:
      the network name
    • getAllNetworks

      public List<ecmwf.web.util.bean.StringPair> getAllNetworks()
      Gets the all networks. Gets the all networks.
      Specified by:
      getAllNetworks in interface Host
      Returns:
      the all networks
    • getTransferModuleNames

      public String getTransferModuleNames() throws TransferException
      Gets the transfer module names. Gets the transfer module names.
      Specified by:
      getTransferModuleNames in interface Host
      Returns:
      the transfer module names
      Throws:
      TransferException - the transfer exception
    • setNetworkName

      public void setNetworkName(String s)
      Sets the network name. Sets the network name.
      Specified by:
      setNetworkName in interface Host
      Parameters:
      s - the new network name
    • getNetworkCode

      public String getNetworkCode()
      Gets the network code. Gets the network code.
      Specified by:
      getNetworkCode in interface Host
      Returns:
      the network code
    • setNetworkCode

      public void setNetworkCode(String s)
      Sets the network code. Sets the network code.
      Specified by:
      setNetworkCode in interface Host
      Parameters:
      s - the new network code
    • getIncreasedPriorities

      protected Collection<Destination> getIncreasedPriorities()
      Gets the increased priorities.
      Returns:
      the increased priorities
    • getDecreasedPriorities

      protected Collection<Destination> getDecreasedPriorities()
      Gets the decreased priorities.
      Returns:
      the decreased priorities
    • getPriorityChangeStep

      protected int getPriorityChangeStep()
      Gets the priority change step.
      Returns:
      the priority change step
    • getAddedEcUsers

      protected Collection<EcUser> getAddedEcUsers()
      Gets the added ec users.
      Returns:
      the added ec users
    • getDeletedEcUsers

      protected Collection<EcUser> getDeletedEcUsers()
      Gets the deleted ec users.
      Returns:
      the deleted ec users
    • getCompletions

      public String getCompletions()
      Gets the completions. Gets the completions.
      Specified by:
      getCompletions in interface Host
      Returns:
      the completions