edu.isi.policy.entity
Class Transfer

java.lang.Object
  extended by edu.isi.policy.entity.AbstractEntity
      extended by edu.isi.policy.entity.Transfer
All Implemented Interfaces:
Entity, java.lang.Comparable<Transfer>

public final class Transfer
extends AbstractEntity
implements java.lang.Comparable<Transfer>

Defines a transfer that is being sent to the policy service for advice.

Author:
David Smith

Constructor Summary
Transfer()
          Default constructor.
Transfer(java.lang.String source, java.lang.String destination)
           
Transfer(java.lang.String id, java.net.URI source, java.net.URI destination)
          Constructs a new transfer object.
Transfer(java.net.URI source, java.net.URI destination)
           
 
Method Summary
 int compareTo(Transfer t)
           
 boolean equals(java.lang.Object o)
           
 java.net.URI getDestination()
           
 java.net.URI getSource()
           
 void setDestination(java.net.URI destination)
          Sets the destination of the transfer.
 void setSource(java.net.URI source)
          Sets the source of the transfer.
 java.lang.String toString()
           
 
Methods inherited from class edu.isi.policy.entity.AbstractEntity
getId, getProperties, getProperty, hasId, setId, setProperties, setProperty
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Transfer

public Transfer()
Default constructor.


Transfer

public Transfer(java.lang.String id,
                java.net.URI source,
                java.net.URI destination)
Constructs a new transfer object.

Parameters:
id - the unique identifier of this transfer.
source - the source of the transfer.
destination - the destination of the transfer.

Transfer

public Transfer(java.net.URI source,
                java.net.URI destination)

Transfer

public Transfer(java.lang.String source,
                java.lang.String destination)
         throws java.net.URISyntaxException
Throws:
java.net.URISyntaxException
Method Detail

setSource

public void setSource(java.net.URI source)
Sets the source of the transfer.

Parameters:
source -

setDestination

public void setDestination(java.net.URI destination)
Sets the destination of the transfer.

Parameters:
destination -

getSource

public java.net.URI getSource()
Returns:
the source

getDestination

public java.net.URI getDestination()
Returns:
the destination

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(Transfer t)
Specified by:
compareTo in interface java.lang.Comparable<Transfer>


Copyright © 2012. All Rights Reserved.