Package eu.planets_project.tb.gui.backing.service

Examples of eu.planets_project.tb.gui.backing.service.ServiceRecordBean


      if (tmpComponent != null && (tmpComponent instanceof UIData)) {
        Object tmpRowData = ((UIData) tmpComponent).getRowData();
        if (tmpRowData instanceof ServiceRecordBean ) {
            ServiceBrowser sb = (ServiceBrowser)JSFUtil.getManagedObject("ServiceBrowser");
            ServiceRecordBean srb = (ServiceRecordBean) tmpRowData;
            if( srb.equals( sb.getSelectedServiceRecord() ) ) {
                sb.setSelectedServiceRecord(null);
            } else {
                sb.setSelectedServiceRecord( srb );
            }               
        }
View Full Code Here


        List<ServiceDescription> sds = this.listAllMigrationServices();
        List<PathwayBean> paths = new ArrayList<PathwayBean>();
        for( ServiceDescription sd : sds ) {
            log.info("Inspecting "+sd.getName());
            for( MigrationPath path : sd.getPaths() ) {
                ServiceRecordBean srb = new ServiceRecordBean(sd);
                FormatBean in = new FormatBean( ServiceBrowser.fr.getFormatForUri( path.getInputFormat() ) );
                FormatBean out = new FormatBean( ServiceBrowser.fr.getFormatForUri( path.getOutputFormat() ) );
                PathwayBean pb = new PathwayBean( srb, in, out );
                paths.add(pb);
            }
View Full Code Here

     * @return
     */
    public List<ServiceRecordBean> getMigrationServiceBeans() {
        List<ServiceRecordBean> srbs = new ArrayList<ServiceRecordBean>();
        for( ServiceDescription sd : this.getMigrationServices() ) {
            ServiceRecordBean srb = new ServiceRecordBean(sd);
            // Check if this service is selected:
            if( this.getSelectedServiceRecord() != null &&
                    sd.getEndpoint().equals( this.getSelectedServiceRecord().getEndpoint() )) {
                srb.setSelected(true);
            }
            // Check if this service is compatible with the input and output formats:
            List<ServiceDescription> migrationServices = this.getSelectableMigrationServices();
            if( ( this.getSelectedServiceRecord() != null && ! this.getSelectedServiceRecord().equals(srb) )
                    || ! migrationServices.contains(sd) ) {
                srb.setEnabled(false);
            }
            srbs.add(srb);
        }
        return srbs;
    }
View Full Code Here

        HashMap<String,ServiceRecordBean> serviceMap = new HashMap<String,ServiceRecordBean>();
        // Get the historical service records:
        ServiceRecordPersistencyRemote srp = ServiceRecordPersistencyImpl.getInstance();
        for( ServiceRecordImpl sr : srp.getAllServiceRecords() ) {
            log.info("Putting service record: "+sr.getServiceName()+" : '"+sr.getServiceHash()+"'");
            serviceMap.put(sr.getServiceHash(), new ServiceRecordBean(sr) );
        }

        // Now get the active services and patch these records in:
        List<ServiceDescription> serviceList = getListOfServices(null);
        //log.info("Query result: "+serviceList);
        if( serviceList != null ) log.info("Matched services = "+serviceList.size());
        for( ServiceDescription sd : serviceList ) {
            if( serviceMap.containsKey(""+sd.hashCode()) ) {
                log.info("Updating bean for service: "+sd.getName()+" : '"+sd.hashCode()+"'");
                serviceMap.get(""+sd.hashCode()).setServiceDescription(sd);
            } else {
                serviceMap.put(""+sd.hashCode(), new ServiceRecordBean(sd) );
                log.info("Putting in service: "+sd.getName()+" : '"+sd.hashCode()+"'");
            }
        }

        return new ArrayList<ServiceRecordBean>(serviceMap.values());
View Full Code Here

TOP

Related Classes of eu.planets_project.tb.gui.backing.service.ServiceRecordBean

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.