Package org.zeroexchange.model.resource

Examples of org.zeroexchange.model.resource.Resource


        return new AbstractDataSetProvider<Need, Serializable>() {
            private static final long serialVersionUID = 1L;

            @Override
            protected SlicingDataSet<Need> getDataSet(Serializable filter) {
                Resource resource = getResourceModel().getObject();
                return needManager.getNeeds(resource, authorizedUserService.getCurrentUserId());
            }

        };
    }
View Full Code Here


    @Override
    protected List<ControlDescriptor> getControlDescriptors() {
        
        List<ControlDescriptor> controlDescriptors = new ArrayList<ControlDescriptor>();

        final Resource resource = getResourceModel().getObject();
       
        //Category
        controlDescriptors.add(new ControlDescriptor(new ResourceModel(MKEY_CATEGORY)) {
            private static final long serialVersionUID = 1L;

            @Override
            public Component createComponent(String componentId) {
                return new Label(componentId,
                        new ResourceModel(MKEY_RSUBTYPE_PREFIX + ResourceUtils.getShortSubtype(resource.getClass())));
            }
        });
       
        //Description selector
        /*
        final Category category = resource.get;
        if(category != null && !category.getLeafCategory()) {
            controlDescriptors.add(new ControlDescriptor(new ResourceModel(MKEY_DESCRIPTION)) {
                private static final long serialVersionUID = 1L;
   
                @Override
                public Component createComponent(String componentId) {
                    return new MultiLineLabel(componentId, resource.getDescription());
                }
               
            });
        }*/
       
        //Populate with category properties controls
        //Init custom values map
        if(resourceCustomValues == null) {
            resourceCustomValues = new HashMap<Property, Value>();
            Collection<PropertySpecification> propsSpecs = resource.getSpecification();
            for(PropertySpecification spec: propsSpecs) {
                resourceCustomValues.put(spec.getProperty(), spec.getValue());
            }
        }
/*        Collection<Property> properties = categoryReader.getProperties(category);
View Full Code Here

            private static final long serialVersionUID = 1L;

            @Override
            public Component getActionComponent(String componentId, final ResourceTender resourceTender) {
                Integer currentUserId = authorizedUserService.getCurrentUserId();
                Resource resource = resourceTender.getResource();
                User resourceOwner = resource.getOwner();
                boolean acceptanceManagementEnable = resourceTender.getAcceptDate() == null &&
                        resourceOwner != null && currentUserId != null && currentUserId.equals(resourceOwner.getId())
                        && !resourceInformant.isAcceptedTendersCountExceeded(resource, resourceTender.getClass());
                return new LinkPanel(componentId, new ResourceModel(acceptanceManagementEnable ? MKEY_TENDER_MANAGE : MKEY_TENDER_VIEW)) {
                    private static final long serialVersionUID = 1L;
View Full Code Here

TOP

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

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.