Package org.zeroexchange.model.resource

Examples of org.zeroexchange.model.resource.TendersMultiplicity


     * {@inheritDoc}
     */
    @Override
    public boolean isAcceptedTendersCountExceeded(Resource resource,
            Class<? extends ResourceTender> tenderClass) {
        TendersMultiplicity multiplicity = resource.getTendersMultiplicity();
        if(multiplicity == null) {
            multiplicity = TendersMultiplicity.NONE;
        }
        if((multiplicity == TendersMultiplicity.MULTIPLE_CONSUMERS && Need.class.isAssignableFrom(tenderClass)) ||
                (multiplicity == TendersMultiplicity.MULTIPLE_SUPPLIERS && Supply.class.isAssignableFrom(tenderClass))) {
View Full Code Here


       
        Resource resource = getResourceModel().getObject();
        User currentUser = authorizedUserService.getCurrentUser();
        boolean hasConsumers = resourceInformant.hasConsumers(resource, currentUser);
        boolean hasSuppliers = resourceInformant.hasSuppliers(resource, currentUser);
        TendersMultiplicity multiplicity = resource.getTendersMultiplicity();
        boolean newTendersEnabled = multiplicity != TendersMultiplicity.NONE ||
                !hasConsumers || !hasSuppliers;

        //Main form
        add(createPersonalTenderForm()
View Full Code Here

        User currentUser = authorizedUserService.getCurrentUser();
        final IModel<TenderData> formModel = formContainer.getModel();

        boolean hasConsumers = resourceInformant.hasConsumers(resource, currentUser);
        boolean hasSuppliers = resourceInformant.hasSuppliers(resource, currentUser);
        TendersMultiplicity multiplicity = resource.getTendersMultiplicity();

       
       
        // --- Tender type selector
        boolean typeSelectionEnabled = true;
View Full Code Here

        TenderData data = new TenderData();
        Resource resource = getResourceModel().getObject();
        ResourceTender userTender = resourceInformant.getUserTender(resource,
                authorizedUserService.getCurrentUserId());

        TendersMultiplicity multiplicity = resource.getTendersMultiplicity();
        User currentUser = authorizedUserService.getCurrentUser();
        boolean hasConsumers = resourceInformant.hasConsumers(resource, currentUser);
        boolean hasSuppliers = resourceInformant.hasSuppliers(resource, currentUser);
       
        if (userTender != null) {
View Full Code Here

TOP

Related Classes of org.zeroexchange.model.resource.TendersMultiplicity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.