org.zeroexchange.flow.collaboration
Class PersonalContractStatusInformant

java.lang.Object
  extended by org.zeroexchange.flow.collaboration.PersonalContractStatusInformant
All Implemented Interfaces:
ContractStatusInformant

public class PersonalContractStatusInformant
extends Object
implements ContractStatusInformant

Provides contract status considering the user acceptance state.

Author:
black

Constructor Summary
PersonalContractStatusInformant()
           
 
Method Summary
 ContractStatus getContractStatus(Contract contract, Integer userId)
          Returns actual contract status.
protected  boolean isContractIsAcceptedByUser(Contract contract, Integer userId)
          Returns true if the contract is accepted by the user.
 boolean isContractModificationAllowed(Contract contract)
          Returns true if the contract status allows to change the contract conditions.
 boolean isDeliveryDone(Contract contract, Integer currentUserId)
          Returns true if the user completed at least one delivery.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersonalContractStatusInformant

public PersonalContractStatusInformant()
Method Detail

isContractModificationAllowed

public boolean isContractModificationAllowed(Contract contract)
Returns true if the contract status allows to change the contract conditions.

Specified by:
isContractModificationAllowed in interface ContractStatusInformant

getContractStatus

public ContractStatus getContractStatus(Contract contract,
                                        Integer userId)
Returns actual contract status.

Specified by:
getContractStatus in interface ContractStatusInformant

isDeliveryDone

public boolean isDeliveryDone(Contract contract,
                              Integer currentUserId)
Returns true if the user completed at least one delivery.

Specified by:
isDeliveryDone in interface ContractStatusInformant

isContractIsAcceptedByUser

protected boolean isContractIsAcceptedByUser(Contract contract,
                                             Integer userId)
Returns true if the contract is accepted by the user.



Copyright © 2013. All Rights Reserved.