Package org.apache.tuscany.sca.demos.aggregator.types

Examples of org.apache.tuscany.sca.demos.aggregator.types.SourceType


     * @return the alert source
     */
    public SourceType getAlertSource (String id)
    {          
        System.err.println("getAlertSource(" + id + ")");
        SourceType alertSource = null;
       
        for (Object source : alertSources.getSource()) {
            if ( ((SourceType)source).getId().equals(id)) {
                alertSource = (SourceType)source;
            }
View Full Code Here


             
        try {
            ConfigType alertSourceConfig = alertsSources.getAlertSources(id);
           
            for (Object source : alertSourceConfig.getSource()){
                SourceType sourceType = (SourceType)source;
               
                AlertsType alerts = null;
               
                if ( sourceType.getFeedType().equals("rss")){
                    alerts = rssChecker.getNewAlerts(sourceType.getFeedAddress(),
                                                     sourceType.getLastChecked());
                } else {
                   
                }
               
                // extend return list with any alerts we found
                for( Object alert : alerts.getAlert() ){        

                    // set the id on the alert so we know which source it
                    // came from
                    ((AlertType)alert).setSourceId(sourceType.getId());
                   
                    // convert from SDO to POJO so that the
                    // JSONRPC binding will work. It can't currently
                    // handle SDOs
                    AlertType newAlert = new AlertTypeNonSDOImpl();
   
                    newAlert.setSourceId(((AlertType)alert).getSourceId());
                    newAlert.setTitle(((AlertType)alert).getTitle());
                    newAlert.setSummary(((AlertType)alert).getSummary());                   
                    newAlert.setAddress(((AlertType)alert).getAddress());
                    newAlert.setDate(((AlertType)alert).getDate());
                    newAlert.setId(((AlertType)alert).getId());
                    newAlert.setUnread(((AlertType)alert).isUnread());               
                   
                    returnAlertList.add(newAlert);
                }
               
                // update the time last checked for this source
                sourceType.setLastChecked(nowString);
                //alertsSources.updateAlertSource(sourceType);
            }
        } catch(Exception ex) {
            System.err.println("Exception " + ex.toString());
        }
View Full Code Here

             
        try {
            ConfigType alertSourceConfig = alertsSources.getAlertSources(id);
           
            for (Object source : alertSourceConfig.getSource()){
                SourceType sourceType = (SourceType)source;
               
                AlertsType alerts = null;
               
                if ( sourceType.getFeedType().equals("rss")){
                    alerts = rssChecker.getNewAlerts(sourceType.getFeedAddress(),
                                                     sourceType.getLastChecked());
                } else {
                   
                }
               
                // extend return list with any alerts we found
                for( Object alert : alerts.getAlert() ){        

                    // set the id on the alert so we know which source it
                    // came from
                    ((AlertType)alert).setSourceId(sourceType.getId());
                   
                    // convert from SDO to POJO so that the
                    // JSONRPC binding will work. It can't currently
                    // handle SDOs
                    AlertType newAlert = new AlertTypeNonSDOImpl();
   
                    newAlert.setSourceId(((AlertType)alert).getSourceId());
                    newAlert.setTitle(((AlertType)alert).getTitle());
                    newAlert.setSummary(((AlertType)alert).getSummary());                   
                    newAlert.setAddress(((AlertType)alert).getAddress());
                    newAlert.setDate(((AlertType)alert).getDate());
                    newAlert.setId(((AlertType)alert).getId());
                    newAlert.setUnread(((AlertType)alert).isUnread());               
                   
                    returnAlertList.add(newAlert);
                }
               
                // update the time last checked for this source
                sourceType.setLastChecked(nowString);
                //alertsSources.updateAlertSource(sourceType);
            }
        } catch(Exception ex) {
            System.err.println("Exception " + ex.toString());
        }
View Full Code Here

     * @return the alert source
     */
    public SourceType getAlertSource (String id)
    {          
        System.err.println("getAlertSource(" + id + ")");
        SourceType alertSource = null;
       
        for (Object source : alertSources.getSource()) {
            if ( ((SourceType)source).getId().equals(id)) {
                alertSource = (SourceType)source;
            }
View Full Code Here

             
        try {
            ConfigType alertSourceConfig = alertsSources.getAlertSources(id);
           
            for (Object source : alertSourceConfig.getSource()){
                SourceType sourceType = (SourceType)source;
               
                AlertsType alerts = null;
               
                if ( sourceType.getFeedType().equals("rss")){
                    alerts = rssChecker.getNewAlerts(sourceType.getFeedAddress(),
                                                     sourceType.getLastChecked());
                } else {
                   
                }
               
                // extend return list with any alerts we found
                for( Object alert : alerts.getAlert() ){        

                    // set the id on the alert so we know which source it
                    // came from
                    ((AlertType)alert).setSourceId(sourceType.getId());
                   
                    // convert from SDO to POJO so that the
                    // JSONRPC binding will work. It can't currently
                    // handle SDOs
                    AlertType newAlert = new AlertTypeNonSDOImpl();
   
                    newAlert.setSourceId(((AlertType)alert).getSourceId());
                    newAlert.setTitle(((AlertType)alert).getTitle());
                    newAlert.setSummary(((AlertType)alert).getSummary());                   
                    newAlert.setAddress(((AlertType)alert).getAddress());
                    newAlert.setDate(((AlertType)alert).getDate());
                    newAlert.setId(((AlertType)alert).getId());
                    newAlert.setUnread(((AlertType)alert).isUnread());               
                   
                    returnAlertList.add(newAlert);
                }
               
                // update the time last checked for this source
                sourceType.setLastChecked(nowString);
                //alertsSources.updateAlertSource(sourceType);
            }
        } catch(Exception ex) {
            System.err.println("Exception " + ex.toString());
        }
View Full Code Here

     * @return the alert source
     */
    public SourceType getAlertSource (String id)
    {          
        System.err.println("getAlertSource(" + id + ")");
        SourceType alertSource = null;
       
        for (Object source : alertSources.getSource()) {
            if ( ((SourceType)source).getId().equals(id)) {
                alertSource = (SourceType)source;
            }
View Full Code Here

             
        try {
            ConfigType alertSourceConfig = alertsSources.getAlertSources(id);
           
            for (Object source : alertSourceConfig.getSource()){
                SourceType sourceType = (SourceType)source;
               
                AlertsType alerts = null;
               
                if ( sourceType.getFeedType().equals("rss")){
                    alerts = rssChecker.getNewAlerts(sourceType.getFeedAddress(),
                                                     sourceType.getLastChecked());
                } else {
                   
                }
               
                // extend return list with any alerts we found
                for( Object alert : alerts.getAlert() ){        

                    // set the id on the alert so we know which source it
                    // came from
                    ((AlertType)alert).setSourceId(sourceType.getId());
                   
                    // convert from SDO to POJO so that the
                    // JSONRPC binding will work. It can't currently
                    // handle SDOs
                    AlertType newAlert = new AlertTypeNonSDOImpl();
   
                    newAlert.setSourceId(((AlertType)alert).getSourceId());
                    newAlert.setTitle(((AlertType)alert).getTitle());
                    newAlert.setSummary(((AlertType)alert).getSummary());                   
                    newAlert.setAddress(((AlertType)alert).getAddress());
                    newAlert.setDate(((AlertType)alert).getDate());
                    newAlert.setId(((AlertType)alert).getId());
                    newAlert.setUnread(((AlertType)alert).isUnread());               
                   
                    returnAlertList.add(newAlert);
                }
               
                // update the time last checked for this source
                sourceType.setLastChecked(nowString);
                //alertsSources.updateAlertSource(sourceType);
            }
        } catch(Exception ex) {
            System.err.println("Exception " + ex.toString());
        }
View Full Code Here

             
        try {
            ConfigType alertSourceConfig = alertsSources.getAlertSources(id);
           
            for (Object source : alertSourceConfig.getSource()){
                SourceType sourceType = (SourceType)source;
               
                AlertsType alerts = null;
               
                if ( sourceType.getFeedType().equals("rss")){
                    alerts = rssChecker.getNewAlerts(sourceType.getFeedAddress(),
                                                     sourceType.getLastChecked());
                } else {
                   
                }
               
                // extend return list with any alerts we found
                for( Object alert : alerts.getAlert() ){        

                    // set the id on the alert so we know which source it
                    // came from
                    ((AlertType)alert).setSourceId(sourceType.getId());
                   
                    // convert from SDO to POJO so that the
                    // JSONRPC binding will work. It can't currently
                    // handle SDOs
                    AlertType newAlert = new AlertTypeNonSDOImpl();
   
                    newAlert.setSourceId(((AlertType)alert).getSourceId());
                    newAlert.setTitle(((AlertType)alert).getTitle());
                    newAlert.setSummary(((AlertType)alert).getSummary());                   
                    newAlert.setAddress(((AlertType)alert).getAddress());
                    newAlert.setDate(((AlertType)alert).getDate());
                    newAlert.setId(((AlertType)alert).getId());
                    newAlert.setUnread(((AlertType)alert).isUnread());               
                   
                    returnAlertList.add(newAlert);
                }
               
                // update the time last checked for this source
                sourceType.setLastChecked(nowString);
                //alertsSources.updateAlertSource(sourceType);
            }
        } catch(Exception ex) {
            System.err.println("Exception " + ex.toString());
        }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.demos.aggregator.types.SourceType

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.