org.zeroexchange.resource.read
Interface ResourceReader

All Known Implementing Classes:
DAOResourceReader

public interface ResourceReader

The resources management service.

Author:
black

Method Summary
 SlicingDataSet<Resource> getContractResources(Integer contractId, SortDescriptor sortDescriptor, Object filter)
          Returns the resource for the specified contract.
 PropertySpecification getPropertySpecification(Resource resource, String propertyName)
          Returns property specification.
<T extends Resource>
T
getResource(Integer resourceId)
          Returns the resource by its id.
 DictionaryItem getUnitOfMeasure(Resource resource)
          Deprecated. 
 SlicingDataSet<Resource> getUserRelatedResources(int userId, SortDescriptor sortDescriptor, String filterQuery)
          Returns resources where user is participant.
 Collection<Resource> getUserResources(int userId, Set<Integer> resourcesIds)
          Returns resources belonging to the current user by their PKs.
 boolean isResourceAccepted(Resource resource)
          Returns true if the resource is accepted by the partner of the specified user.
 boolean isUserInRole(Resource resource, TenderType role, User flowUser)
           
 boolean isUserParticipant(Resource resource, Integer currentUserId)
          Returns true if the resource have the tender from the specified user.
 

Method Detail

getPropertySpecification

PropertySpecification getPropertySpecification(Resource resource,
                                               String propertyName)
                                               throws BusinessLogicException
Returns property specification.

Throws:
BusinessLogicException

getUnitOfMeasure

@Deprecated
DictionaryItem getUnitOfMeasure(Resource resource)
Deprecated. 

Returns unit of measure dictionary item. UOM model should be refactored (use explicit UnitOfMeasure entity)


getUserRelatedResources

SlicingDataSet<Resource> getUserRelatedResources(int userId,
                                                 SortDescriptor sortDescriptor,
                                                 String filterQuery)
Returns resources where user is participant.


getUserResources

Collection<Resource> getUserResources(int userId,
                                      Set<Integer> resourcesIds)
Returns resources belonging to the current user by their PKs.


getResource

<T extends Resource> T getResource(Integer resourceId)
Returns the resource by its id.


getContractResources

SlicingDataSet<Resource> getContractResources(Integer contractId,
                                              SortDescriptor sortDescriptor,
                                              Object filter)
Returns the resource for the specified contract.

Parameters:
resourcesCriteria - TODO

isUserInRole

boolean isUserInRole(Resource resource,
                     TenderType role,
                     User flowUser)

isUserParticipant

boolean isUserParticipant(Resource resource,
                          Integer currentUserId)
Returns true if the resource have the tender from the specified user.

Parameters:
resource - TODO

isResourceAccepted

boolean isResourceAccepted(Resource resource)
Returns true if the resource is accepted by the partner of the specified user.

Parameters:
resource - TODO


Copyright © 2013. All Rights Reserved.