Changeset 1491


Ignore:
Timestamp:
04/15/13 12:04:19 (7 years ago)
Author:
philsmart
Message:
 
Location:
raptor-web/trunk
Files:
22 added
20 edited

Legend:

Unmodified
Added
Removed
  • raptor-web/trunk/pom.xml

    r1483 r1491  
    1 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 
     1<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     2    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 
    23    <modelVersion>4.0.0</modelVersion> 
    34    <groupId>uk.ac.cardiff.raptor</groupId> 
     
    2122        <url>http://iam.cf.ac.uk/repos/RAPTOR/raptor-web</url> 
    2223    </scm> 
    23      
    24      <distributionManagement> 
     24 
     25    <distributionManagement> 
    2526        <repository> 
    2627            <uniqueVersion>false</uniqueVersion> 
     
    3435        </snapshotRepository> 
    3536    </distributionManagement> 
    36      
     37 
    3738 
    3839    <!-- Adding extra repositories for Richfaces and EL --> 
     
    267268        <dependency> 
    268269            <groupId>org.springframework</groupId> 
     270            <artifactId>spring-oxm</artifactId> 
     271            <version>${spring.version}</version> 
     272        </dependency> 
     273 
     274        <dependency> 
     275            <groupId>org.springframework</groupId> 
    269276            <artifactId>spring-webmvc</artifactId> 
    270277            <version>${spring.version}</version> 
     
    671678            <scope>compile</scope> 
    672679        </dependency> 
     680 
     681        <dependency> 
     682            <groupId>org.codehaus.castor</groupId> 
     683            <artifactId>castor-xml</artifactId> 
     684            <version>1.3.2</version> 
     685        </dependency> 
    673686    </dependencies> 
    674687 
    675688 
    676689    <build> 
    677     
     690 
    678691 
    679692        <pluginManagement> 
  • raptor-web/trunk/src/main/java/uk/ac/cardiff/raptorweb/engine/RaptorWebEngine.java

    r1358 r1491  
    1717 * 
    1818 */ 
     19 
    1920package uk.ac.cardiff.raptorweb.engine; 
    2021 
     
    3031import uk.ac.cardiff.model.resource.ResourceMetadata; 
    3132import uk.ac.cardiff.model.wsmodel.Capabilities; 
     33import uk.ac.cardiff.model.wsmodel.DynamicStatisticalUnitInformation; 
    3234import uk.ac.cardiff.model.wsmodel.LogFileUpload; 
    3335import uk.ac.cardiff.model.wsmodel.LogFileUploadResult; 
     36import uk.ac.cardiff.model.wsmodel.StatisticFunctionType; 
    3437import uk.ac.cardiff.model.wsmodel.StatisticalUnitInformation; 
    3538import uk.ac.cardiff.raptorweb.engine.reports.ReportHandler; 
     
    112115 
    113116    /** 
    114      * Returns the list of USER level statistical units from the attached MUA as stored in the currentlyAttachedCapabilities. If no 
    115      * currentlyAttachedCapabilities exists, hence no MUA has been successfully queried, it chooses either the current MUA <code>attachedMUA</code> or the MUA 
    116      * that was loaded with <code>isAttached value="true"</code> from the XML configuration. 
     117     * Returns the list of USER level statistical units from the attached MUA as stored in the 
     118     * currentlyAttachedCapabilities. If no currentlyAttachedCapabilities exists, hence no MUA has been successfully 
     119     * queried, it chooses either the current MUA <code>attachedMUA</code> or the MUA that was loaded with 
     120     * <code>isAttached value="true"</code> from the XML configuration. 
    117121     *  
    118122     * @return List of statistical units, as <code>StatisticalUnitInformation</code> 
     
    149153     * Gets the capabilites from the selectedEndpoint. This is a live lookup. 
    150154     *  
    151      * @param selectedEndpoint 
    152      *            the endpoint to get the capabilities of. 
     155     * @param selectedEndpoint the endpoint to get the capabilities of. 
    153156     * @return the {@link Capabilities} of the selected endpoint. 
    154157     */ 
     
    158161 
    159162    /** 
    160      * Gets the capabilites from the currently selected endpoint (held in <code>attachedMUA</code>). This is a live lookup. 
     163     * Gets the capabilites from the currently selected endpoint (held in <code>attachedMUA</code>). This is a live 
     164     * lookup. 
    161165     *  
    162166     * @return the {@link Capabilities} of the selected endpoint. 
     
    166170    } 
    167171 
     172    /** 
     173     * Gets the attached from those already stored - this is a cached lookup. 
     174     *  
     175     * @return 
     176     */ 
    168177    public MUAEntry getCurrentlyAttached() { 
    169178        for (MUAEntry entry : registry.getMUAEntries()) { 
     
    176185 
    177186    public AggregatorGraphModel invokeStatisticalUnit(StatisticalUnitInformation selectedStatisticalUnit) { 
    178         AggregatorGraphModel gmodel = serviceEndpointClient.invokeStatisticalUnit(getCurrentlyAttached(), selectedStatisticalUnit.getStatisticParameters().getUnitName()); 
     187        AggregatorGraphModel gmodel = 
     188                serviceEndpointClient.invokeStatisticalUnit(getCurrentlyAttached(), selectedStatisticalUnit 
     189                        .getStatisticParameters().getUnitName()); 
    179190        return gmodel; 
    180191 
     
    182193 
    183194    public AggregatorGraphModel updateAndInvokeStatisticalUnit(StatisticalUnitInformation selectedStatisticalUnit) { 
    184         AggregatorGraphModel gmodel = serviceEndpointClient.updateAndinvokeStatisticalUnit(getCurrentlyAttached(), selectedStatisticalUnit); 
     195        AggregatorGraphModel gmodel = 
     196                serviceEndpointClient.updateAndinvokeStatisticalUnit(getCurrentlyAttached(), selectedStatisticalUnit); 
    185197        return gmodel; 
    186198 
     
    212224     */ 
    213225    public void updateMUAStatistic(GraphModel model) { 
    214         log.debug("Updating statistic {} ", model.getSelectedStatisticalUnit().getStatisticalUnitInformation().getStatisticParameters().getUnitName()); 
    215         log.debug("Has startDate {}", model.getSelectedStatisticalUnit().getStatisticalUnitInformation().getStatisticParameters().getStartTimeAsDate()); 
    216         serviceEndpointClient.updateStatisticalUnit(attachedMUA, model.getSelectedStatisticalUnit().getStatisticalUnitInformation()); 
     226        log.debug("Updating statistic {} ", model.getSelectedStatisticalUnit().getStatisticalUnitInformation() 
     227                .getStatisticParameters().getUnitName()); 
     228        log.debug("Has startDate {}", model.getSelectedStatisticalUnit().getStatisticalUnitInformation() 
     229                .getStatisticParameters().getStartTimeAsDate()); 
     230        serviceEndpointClient.updateStatisticalUnit(attachedMUA, model.getSelectedStatisticalUnit() 
     231                .getStatisticalUnitInformation()); 
    217232    } 
    218233 
     
    317332    } 
    318333 
     334    /** 
     335     *  
     336     * Live lookup to the MUA to find the {@link StatisticalUnitInformation} for the input {@link StatisticFunctionType} 
     337     * . 
     338     *  
     339     * @param selectedStatisticFunctionType 
     340     */ 
     341    public StatisticalUnitInformation lookupStatisticalUnitInformation( 
     342            StatisticFunctionType selectedStatisticFunctionType) { 
     343        return serviceEndpointClient.lookupStatisticalUnitInformation(attachedMUA, selectedStatisticFunctionType); 
     344    } 
     345 
     346    /** 
     347     * @param statisticalUnitInformations 
     348     */ 
     349    public AggregatorGraphModel invokeStatisticalUnitDynamic( 
     350            DynamicStatisticalUnitInformation statisticalUnitInformation) { 
     351        return serviceEndpointClient.invokeStatisticalUnitDynamic(attachedMUA, statisticalUnitInformation); 
     352    } 
     353 
    319354} 
  • raptor-web/trunk/src/main/java/uk/ac/cardiff/raptorweb/model/ChartOptions.java

    r899 r1491  
    1717 * 
    1818 */ 
     19 
    1920package uk.ac.cardiff.raptorweb.model; 
    2021 
    2122import java.io.Serializable; 
    22 import java.util.Arrays; 
    23 import java.util.List; 
    2423 
    2524import javax.faces.model.SelectItem; 
     
    2827import org.slf4j.Logger; 
    2928import org.slf4j.LoggerFactory; 
    30  
    3129 
    3230/** 
     
    4139 
    4240    private ChartType graphType; 
     41 
    4342    private String perspective; 
     43 
    4444    private int xMajorGridCount; 
     45 
    4546    private int yMajorGridCount; 
     47 
    4648    private OrientationType orientation; 
     49 
    4750    private int imageWidth; 
    48     private int imageHeight;    
    49      
     51 
     52    private int imageHeight; 
     53 
    5054    private GraphPresentation graphPresentation; 
     55 
    5156    private LabelPositionType xLabelPosition; 
    52      
    53     /* the orientation of labels, mapped to JFreeChart <code>CategoryLabelPositions</code> */ 
    54     public enum LabelPositionType{ 
    55         UP_45(CategoryLabelPositions.UP_45, "45 Degree Up"), UP_90(CategoryLabelPositions.UP_90, "90 Degree Up"), 
    56         DOWN_45(CategoryLabelPositions.DOWN_45, "45 Degree Down"),DOWN_90(CategoryLabelPositions.DOWN_90, "90 Degree Down"), 
    57         STANDARD(CategoryLabelPositions.STANDARD, "Standard"); 
    58          
    59         private CategoryLabelPositions labelPosition; 
    60         private String label; 
    61          
    62         LabelPositionType(CategoryLabelPositions labelPosition, String label){ 
    63             this.setLabelPosition(labelPosition); 
    64         } 
    65  
    66         public void setLabel(String label) { 
    67             this.label = label; 
    68         } 
    69  
    70         public String getLabel() { 
    71             return label; 
    72         } 
    73  
    74         public void setLabelPosition(CategoryLabelPositions labelPosition) { 
    75             this.labelPosition = labelPosition; 
    76         } 
    77  
    78         public CategoryLabelPositions getLabelPosition() { 
    79             return labelPosition; 
    80         } 
    81          
    82     } 
    83      
    84     /* options for how the graph is displayed */ 
     57 
     58    /** the orientation of labels, mapped to JFreeChart <code>CategoryLabelPositions</code> */ 
     59    public enum LabelPositionType { 
     60        UP_45(CategoryLabelPositions.UP_45, "45 Degree Up"), UP_90(CategoryLabelPositions.UP_90, "90 Degree Up"), 
     61        DOWN_45(CategoryLabelPositions.DOWN_45, "45 Degree Down"), DOWN_90(CategoryLabelPositions.DOWN_90, 
     62                "90 Degree Down"), STANDARD(CategoryLabelPositions.STANDARD, "Standard"); 
     63 
     64        private CategoryLabelPositions labelPosition; 
     65 
     66        private String label; 
     67 
     68        LabelPositionType(CategoryLabelPositions labelPosition, String label) { 
     69            this.setLabelPosition(labelPosition); 
     70        } 
     71 
     72        public void setLabel(String label) { 
     73            this.label = label; 
     74        } 
     75 
     76        public String getLabel() { 
     77            return label; 
     78        } 
     79 
     80        public void setLabelPosition(CategoryLabelPositions labelPosition) { 
     81            this.labelPosition = labelPosition; 
     82        } 
     83 
     84        public CategoryLabelPositions getLabelPosition() { 
     85            return labelPosition; 
     86        } 
     87 
     88    } 
     89 
     90    /** options for how the graph is displayed */ 
    8591    public enum GraphPresentation { 
    86         FANCY(true), FRONT(false); 
    87         private boolean legend; 
    88  
    89         GraphPresentation(boolean legend) { 
    90             this.legend = legend; 
    91         } 
    92          
    93         public boolean getLegend(){ 
    94             return legend; 
    95         } 
    96     } 
    97      
     92        FANCY(true), FRONT(false); 
     93        private final boolean legend; 
     94 
     95        GraphPresentation(boolean legend) { 
     96            this.legend = legend; 
     97        } 
     98 
     99        public boolean getLegend() { 
     100            return legend; 
     101        } 
     102    } 
     103 
    98104    public enum OrientationType { 
    99         HORIZONTAL("Horizontal"), VERTICAL("Vertical"); 
    100  
    101         private final String label; 
    102  
    103         private OrientationType(String label) { 
    104             this.label = label; 
    105         } 
    106  
    107         public String getLabel() { 
    108             return this.label; 
    109         } 
     105        HORIZONTAL("Horizontal"), VERTICAL("Vertical"); 
     106 
     107        private final String label; 
     108 
     109        private OrientationType(String label) { 
     110            this.label = label; 
     111        } 
     112 
     113        public String getLabel() { 
     114            return this.label; 
     115        } 
    110116 
    111117    } 
    112118 
    113119    public enum ChartType { 
    114         LINE("Line Graph"), BAR("Bar Graph"),AREA("Area Graph"),  
    115         BAR3D ("3D Bar Graph"), LINE3D ("3D Line Graph"); 
    116  
    117         private final String label; 
    118  
    119         private ChartType(String label) { 
    120             this.label = label; 
    121         } 
    122  
    123         public String getLabel() { 
    124             return this.label; 
    125         } 
    126  
    127     } 
    128      
     120        LINE("Line Graph"), BAR("Bar Graph"), AREA("Area Graph"), BAR3D("3D Bar Graph"), LINE3D("3D Line Graph"); 
     121 
     122        private final String label; 
     123 
     124        private ChartType(String label) { 
     125            this.label = label; 
     126        } 
     127 
     128        public String getLabel() { 
     129            return this.label; 
     130        } 
     131 
     132    } 
     133 
    129134    public SelectItem[] getLabelPositionsTypeList() { 
    130         SelectItem[] items = new SelectItem[LabelPositionType.values().length]; 
    131         int i = 0; 
    132         for (LabelPositionType t : LabelPositionType.values()) { 
    133             items[i++] = new SelectItem(t, t.getLabel()); 
    134         } 
    135         return items; 
    136     } 
    137      
     135        SelectItem[] items = new SelectItem[LabelPositionType.values().length]; 
     136        int i = 0; 
     137        for (LabelPositionType t : LabelPositionType.values()) { 
     138            items[i++] = new SelectItem(t, t.getLabel()); 
     139        } 
     140        return items; 
     141    } 
     142 
    138143    public SelectItem[] getOrientationTypeList() { 
    139         SelectItem[] items = new SelectItem[OrientationType.values().length]; 
    140         int i = 0; 
    141         for (OrientationType t : OrientationType.values()) { 
    142             items[i++] = new SelectItem(t, t.getLabel()); 
    143         } 
    144         return items; 
     144        SelectItem[] items = new SelectItem[OrientationType.values().length]; 
     145        int i = 0; 
     146        for (OrientationType t : OrientationType.values()) { 
     147            items[i++] = new SelectItem(t, t.getLabel()); 
     148        } 
     149        return items; 
    145150    } 
    146151 
    147152    public SelectItem[] getGraphTypeList() { 
    148         SelectItem[] items = new SelectItem[ChartType.values().length]; 
    149         int i = 0; 
    150         for (ChartType g : ChartType.values()) { 
    151             items[i++] = new SelectItem(g, g.getLabel()); 
    152         } 
    153         return items; 
     153        SelectItem[] items = new SelectItem[ChartType.values().length]; 
     154        int i = 0; 
     155        for (ChartType g : ChartType.values()) { 
     156            items[i++] = new SelectItem(g, g.getLabel()); 
     157        } 
     158        return items; 
    154159    } 
    155160 
    156161    public void setPerspective(String perspective) { 
    157         this.perspective = perspective; 
     162        this.perspective = perspective; 
    158163    } 
    159164 
    160165    public String getPerspective() { 
    161         return perspective; 
     166        return perspective; 
    162167    } 
    163168 
    164169    public void setxMajorGridCount(int xMajorGridCount) { 
    165         this.xMajorGridCount = xMajorGridCount; 
     170        this.xMajorGridCount = xMajorGridCount; 
    166171    } 
    167172 
    168173    public int getxMajorGridCount() { 
    169         return xMajorGridCount; 
     174        return xMajorGridCount; 
    170175    } 
    171176 
    172177    public void setyMajorGridCount(int yMajorGridCount) { 
    173         this.yMajorGridCount = yMajorGridCount; 
     178        this.yMajorGridCount = yMajorGridCount; 
    174179    } 
    175180 
    176181    public int getyMajorGridCount() { 
    177         return yMajorGridCount; 
    178     } 
    179  
     182        return yMajorGridCount; 
     183    } 
    180184 
    181185    public void setGraphType(ChartType graphType) { 
    182         log.debug("Setting graph type {}",graphType); 
    183         this.graphType = graphType; 
     186        log.debug("Setting graph type {}", graphType); 
     187        this.graphType = graphType; 
    184188    } 
    185189 
    186190    public ChartType getGraphType() { 
    187         return graphType; 
     191        return graphType; 
    188192    } 
    189193 
    190194    public void setOrientation(OrientationType orientation) { 
    191         this.orientation = orientation; 
     195        this.orientation = orientation; 
    192196    } 
    193197 
    194198    public OrientationType getOrientation() { 
    195         return orientation; 
     199        return orientation; 
    196200    } 
    197201 
    198202    public void setImageWidth(int imageWidth) { 
    199         this.imageWidth = imageWidth; 
     203        this.imageWidth = imageWidth; 
    200204    } 
    201205 
    202206    public int getImageWidth() { 
    203         return imageWidth; 
     207        return imageWidth; 
    204208    } 
    205209 
    206210    public void setImageHeight(int imageHeight) { 
    207         this.imageHeight = imageHeight; 
     211        this.imageHeight = imageHeight; 
    208212    } 
    209213 
    210214    public int getImageHeight() { 
    211         return imageHeight; 
     215        return imageHeight; 
    212216    } 
    213217 
    214218    public void setGraphPresentation(GraphPresentation graphPresentation) { 
    215         this.graphPresentation = graphPresentation; 
     219        this.graphPresentation = graphPresentation; 
    216220    } 
    217221 
    218222    public GraphPresentation getGraphPresentation() { 
    219         return graphPresentation; 
     223        return graphPresentation; 
    220224    } 
    221225 
    222226    public void setxLabelPosition(LabelPositionType xLabelPosition) { 
    223         this.xLabelPosition = xLabelPosition; 
     227        this.xLabelPosition = xLabelPosition; 
    224228    } 
    225229 
    226230    public LabelPositionType getxLabelPosition() { 
    227         return xLabelPosition; 
    228     } 
    229  
     231        return xLabelPosition; 
     232    } 
    230233 
    231234} 
  • raptor-web/trunk/src/main/java/uk/ac/cardiff/raptorweb/model/CurrentTimeRanges.java

    r1390 r1491  
    1414 * limitations under the License. 
    1515 */ 
     16 
    1617package uk.ac.cardiff.raptorweb.model; 
    1718 
     
    2829 
    2930    public DateTime currentTime; 
     31 
    3032    public DateTime startToday; 
     33 
    3134    public DateTime startWeek; 
     35 
    3236    public DateTime startMonth; 
     37 
    3338    public DateTime startYear; 
    3439 
     40    public DateTime startLastMonth; 
     41 
     42    public DateTime endLastMonth; 
     43 
     44    @Deprecated 
    3545    public CurrentTimeRanges() { 
    3646        computeTimeRanges(); 
     47    } 
     48 
     49    /** 
     50     * if forceDayBoundaries is true, then computes start times from the beginning of days and end times from the end of 
     51     * days. 
     52     *  
     53     * Constructor. 
     54     *  
     55     * @param forceDayStart 
     56     */ 
     57    public CurrentTimeRanges(boolean forceDayBoundaries) { 
     58        if (forceDayBoundaries) { 
     59            computeTimeRangesForceDayBoundaries(); 
     60        } else { 
     61            computeTimeRanges(); 
     62        } 
    3763    } 
    3864 
     
    4672        } else if (period == TimeRange.LASTYEAR) { 
    4773            return startYear; 
     74        } else if (period == TimeRange.PREVIOUSMONTH) { 
     75            return startLastMonth; 
    4876        } else { 
    4977            throw new NoSuchTimeRangeException("Requested a time period that does not exists [" + period + "]"); 
     
    6896        } else if (period == TimeRange.LASTYEAR) { 
    6997            return currentTime; 
     98        } else if (period == TimeRange.PREVIOUSMONTH) { 
     99            return endLastMonth; 
    70100        } else { 
    71101            throw new NoSuchTimeRangeException("Requested a time period that does not exists [" + period + "]"); 
    72102        } 
     103    } 
     104 
     105    private void computeTimeRangesForceDayBoundaries() { 
     106        long currentTimeInMS = System.currentTimeMillis(); 
     107        DateTime currentDateTime = new DateTime(currentTimeInMS); 
     108        currentDateTime = currentDateTime.plusDays(1); 
     109        currentDateTime = currentDateTime.minusHours(currentDateTime.getHourOfDay()); 
     110        currentDateTime = currentDateTime.minusMinutes(currentDateTime.getMinuteOfHour()); 
     111        currentDateTime = currentDateTime.minusSeconds(currentDateTime.getSecondOfMinute()); 
     112 
     113        DateTime today = new DateTime(currentTimeInMS); 
     114        today = today.minusHours(today.getHourOfDay()); 
     115        today = today.minusMinutes(today.getMinuteOfHour()); 
     116        today = today.minusSeconds(today.getSecondOfMinute()); 
     117 
     118        DateTime oneMonthPrevious = currentDateTime.minusMonths(1); 
     119        oneMonthPrevious = oneMonthPrevious.minusHours(oneMonthPrevious.getHourOfDay()); 
     120        oneMonthPrevious = oneMonthPrevious.minusMinutes(oneMonthPrevious.getMinuteOfHour()); 
     121        oneMonthPrevious = oneMonthPrevious.minusSeconds(oneMonthPrevious.getSecondOfMinute()); 
     122 
     123        DateTime oneYearPrevious = currentDateTime.minusYears(1); 
     124        oneYearPrevious = oneYearPrevious.minusHours(oneYearPrevious.getHourOfDay()); 
     125        oneYearPrevious = oneYearPrevious.minusMinutes(oneYearPrevious.getMinuteOfHour()); 
     126        oneYearPrevious = oneYearPrevious.minusSeconds(oneYearPrevious.getSecondOfMinute()); 
     127 
     128        DateTime oneWeekPrevious = currentDateTime.minusWeeks(1); 
     129        oneWeekPrevious = oneWeekPrevious.minusHours(oneWeekPrevious.getHourOfDay()); 
     130        oneWeekPrevious = oneWeekPrevious.minusMinutes(oneWeekPrevious.getMinuteOfHour()); 
     131        oneWeekPrevious = oneWeekPrevious.minusSeconds(oneWeekPrevious.getSecondOfMinute()); 
     132 
     133        DateTime lastMonthStart = new DateTime().minusMonths(1).dayOfMonth().withMinimumValue(); 
     134        DateTime lastMonthEnd = new DateTime().minusMonths(1).dayOfMonth().withMaximumValue(); 
     135        lastMonthStart = lastMonthStart.minusMillis(lastMonthStart.getMillisOfDay()); 
     136        lastMonthEnd = 
     137                lastMonthEnd.withHourOfDay(23).withMinuteOfHour(59).withSecondOfMinute(59).withMillisOfSecond(999); 
     138 
     139        startMonth = oneMonthPrevious; 
     140        startToday = today; 
     141        startWeek = oneWeekPrevious; 
     142        startYear = oneYearPrevious; 
     143        currentTime = currentDateTime; 
     144        endLastMonth = lastMonthEnd; 
     145        startLastMonth = lastMonthStart; 
     146 
     147        log.debug("Ignore time, TODAY [start:{}] [end:{}]", today, currentDateTime); 
     148        log.debug("Ignore time, LASTWEEK [start:{}] [end:{}]", oneWeekPrevious, currentDateTime); 
     149        log.debug("Ignore time, LASTMONTH [start:{}] [end:{}]", oneMonthPrevious, currentDateTime); 
     150        log.debug("Ignore time, LASTYEAR [start:{}] [end:{}]", oneYearPrevious, currentDateTime); 
     151        log.debug("Ignore time, PREVIOUSYEAR [start:{}] [end:{}]", startLastMonth, endLastMonth); 
     152 
    73153    } 
    74154 
     
    84164        DateTime oneWeekPrevious = currentDateTime.minusWeeks(1); 
    85165 
     166        DateTime lastMonthStart = new DateTime().minusMonths(1).dayOfMonth().withMinimumValue(); 
     167        DateTime lastMonthEnd = new DateTime().minusMonths(1).dayOfMonth().withMaximumValue(); 
     168        lastMonthStart = lastMonthStart.minusMillis(lastMonthStart.getMillisOfDay()); 
     169 
    86170        startMonth = oneMonthPrevious; 
    87171        startToday = today; 
     
    89173        startYear = oneYearPrevious; 
    90174        currentTime = currentDateTime; 
     175        endLastMonth = lastMonthEnd; 
     176        startLastMonth = lastMonthStart; 
    91177 
    92         log.debug("Start Page, TODAY [start:{}] [end:{}]", today, currentDateTime); 
    93         log.debug("Start Page, LASTWEEK [start:{}] [end:{}]", oneWeekPrevious, currentDateTime); 
    94         log.debug("Start Page, LASTMONTH [start:{}] [end:{}]", oneMonthPrevious, currentDateTime); 
    95         log.debug("Start Page, LASTYEAR [start:{}] [end:{}]", oneYearPrevious, currentDateTime); 
     178        log.debug("TODAY [start:{}] [end:{}]", today, currentDateTime); 
     179        log.debug("LASTWEEK [start:{}] [end:{}]", oneWeekPrevious, currentDateTime); 
     180        log.debug("LASTMONTH [start:{}] [end:{}]", oneMonthPrevious, currentDateTime); 
     181        log.debug("LASTYEAR [start:{}] [end:{}]", oneYearPrevious, currentDateTime); 
     182        log.debug("PREVIOUSYEAR [start:{}] [end:{}]", startLastMonth, endLastMonth); 
     183 
     184    } 
     185 
     186    public static void main(String args[]) { 
     187        DateTime lastMonthStart = new DateTime().minusMonths(1).dayOfMonth().withMinimumValue(); 
     188        DateTime lastMonthEnd = new DateTime().minusMonths(1).dayOfMonth().withMaximumValue(); 
     189        lastMonthStart = lastMonthStart.minusMillis(lastMonthStart.getMillisOfDay()); 
     190        lastMonthEnd = 
     191                lastMonthEnd.withHourOfDay(23).withMinuteOfHour(59).withSecondOfMinute(59).withMillisOfSecond(999); 
     192        System.out.println("Start " + lastMonthStart + "  End " + lastMonthEnd); 
    96193 
    97194    } 
  • raptor-web/trunk/src/main/java/uk/ac/cardiff/raptorweb/model/RaptorJFreeChartModel.java

    r1217 r1491  
    1717 * 
    1818 */ 
     19 
    1920package uk.ac.cardiff.raptorweb.model; 
    2021 
    2122import java.io.File; 
    22 import java.io.IOException; 
    2323import java.io.Serializable; 
    2424 
     
    2929/** 
    3030 * @author philsmart 
    31  * 
     31 *  
    3232 */ 
    3333public class RaptorJFreeChartModel implements Serializable { 
     
    3838 
    3939    private File chartLocation; 
     40 
    4041    private String relativeChartLocation; 
     42 
    4143    private JFreeChart chart; 
    4244 
    4345    public void setChartLocation(File chartLocation) { 
    44         this.chartLocation = chartLocation; 
     46        this.chartLocation = chartLocation; 
    4547    } 
    4648 
    4749    public File getChartLocation() { 
    48         return chartLocation; 
     50        return chartLocation; 
    4951    } 
    5052 
    5153    public void setRelativeChartLocation(String relativeChartLocation) { 
    52         this.relativeChartLocation = relativeChartLocation; 
     54        this.relativeChartLocation = relativeChartLocation; 
    5355    } 
    5456 
    5557    public String getRelativeChartLocation() { 
    56         return relativeChartLocation; 
     58        return relativeChartLocation; 
    5759    } 
    5860 
    59     public String getRelativeChartLocationPath(){ 
    60         return relativeChartLocation; 
     61    public String getRelativeChartLocationPath() { 
     62        return relativeChartLocation; 
    6163    } 
    6264 
    6365    public void setChart(JFreeChart chart) { 
    64         this.chart = chart; 
     66        this.chart = chart; 
    6567    } 
    6668 
    6769    public JFreeChart getChart() { 
    68         return chart; 
     70        return chart; 
    6971    } 
    7072 
    71  
    7273} 
  • raptor-web/trunk/src/main/java/uk/ac/cardiff/raptorweb/model/RaptorTableChartModel.java

    r899 r1491  
    1717 * 
    1818 */ 
     19 
    1920package uk.ac.cardiff.raptorweb.model; 
    2021 
    2122import java.io.Serializable; 
    2223import java.util.ArrayList; 
    23 import java.util.Arrays; 
    2424import java.util.List; 
    2525 
     
    3131/** 
    3232 * @author philsmart 
    33  * 
     33 *  
    3434 */ 
    3535public class RaptorTableChartModel implements Serializable { 
    3636    static Logger log = LoggerFactory.getLogger(RaptorTableChartModel.class); 
    3737 
    38     /* generated serialID */ 
     38    /** generated serialID */ 
    3939    private static final long serialVersionUID = 1765790673328864045L; 
    4040 
     
    4444 
    4545    private List<String> series; 
     46 
    4647    private List<Object[]> rowList; 
    4748 
    4849    public RaptorTableChartModel() { 
    49         setTableSeries(new ArrayList()); 
     50        setTableSeries(new ArrayList()); 
    5051    } 
    5152 
     
    5455     */ 
    5556    public void addTableSeries(TableSeries tseries) { 
    56         getTableSeries().add(tseries); 
     57        getTableSeries().add(tseries); 
    5758    } 
    5859 
    5960    public void setTableSeries(List<TableSeries> tableSeries) { 
    60         this.tableSeries = tableSeries; 
     61        this.tableSeries = tableSeries; 
    6162    } 
    6263 
    6364    public List<TableSeries> getTableSeries() { 
    64         return tableSeries; 
     65        return tableSeries; 
    6566    } 
    6667 
    6768    /** 
    6869     * This could be cached, as opposed to created on the fly e.g. created after the construction of he tableSeries 
    69      * 
     70     *  
    7071     * @return 
    7172     */ 
    7273    public void constructTableForView() { 
    73         if (rowsForView == null) 
    74             rowsForView = new ArrayList<ManyRow>(); 
    75         if (series == null) 
    76             series = new ArrayList<String>(); 
     74        if (rowsForView == null) 
     75            rowsForView = new ArrayList<ManyRow>(); 
     76        if (series == null) 
     77            series = new ArrayList<String>(); 
    7778 
     79        series.add("Group"); 
     80        for (TableSeries tseries : tableSeries) { 
     81            series.add(tseries.getSeriesLabel()); 
    7882 
    79         series.add("Group"); 
    80         for (TableSeries tseries : tableSeries) { 
    81             series.add(tseries.getSeriesLabel()); 
     83        } 
    8284 
    83         } 
     85        if (tableSeries.size() > 0) { 
     86            for (Row row : tableSeries.get(0).getRows()) { 
     87                ManyRow manyRow = new ManyRow(); 
     88                manyRow.setGroupLabel(row.getGroup()); 
     89                getRowsForView().add(manyRow); 
    8490 
     91            } 
    8592 
    86         if (tableSeries.size() > 0) { 
    87             for (Row row : tableSeries.get(0).getRows()) { 
    88                 ManyRow manyRow = new ManyRow(); 
    89                 manyRow.setGroupLabel(row.getGroup()); 
    90                 getRowsForView().add(manyRow); 
     93            for (TableSeries series : tableSeries) { 
     94                for (Row row : series.getRows()) { 
     95                    for (ManyRow mrow : getRowsForView()) { 
     96                        if (mrow.getGroupLabel().equals(row.getGroup())) { 
     97                            mrow.addValue(row.getValue()); 
     98                        } 
     99                    } 
     100                } 
     101            } 
     102            setRowList(new ArrayList<Object[]>()); 
    91103 
    92             } 
    93  
    94             for (TableSeries series : tableSeries) { 
    95                 for (Row row : series.getRows()) { 
    96                     for (ManyRow mrow : getRowsForView()) { 
    97                         if (mrow.getGroupLabel().equals(row.getGroup())) { 
    98                             mrow.addValue(row.getValue()); 
    99                         } 
    100                     } 
    101                 } 
    102             } 
    103             setRowList(new ArrayList<Object[]>()); 
    104  
    105             for (ManyRow mrow : rowsForView) { 
    106                 Object[] completeRow = new Object[series.size()]; 
    107                 for (int i = 0; i < series.size(); i++) { 
    108                     if (i==0){ 
    109                         completeRow[0] = mrow.getGroupLabel(); 
    110                     } 
    111                     else if (mrow.getValues().size() >= i) { 
    112                         completeRow[i] = mrow.getValues().get(i-1); 
    113                     } else { 
    114                         completeRow[i] = ""; 
    115                     } 
    116                 } 
    117                 rowList.add(completeRow); 
    118             } 
    119         } 
     104            for (ManyRow mrow : rowsForView) { 
     105                Object[] completeRow = new Object[series.size()]; 
     106                for (int i = 0; i < series.size(); i++) { 
     107                    if (i == 0) { 
     108                        completeRow[0] = mrow.getGroupLabel(); 
     109                    } else if (mrow.getValues().size() >= i) { 
     110                        completeRow[i] = mrow.getValues().get(i - 1); 
     111                    } else { 
     112                        completeRow[i] = ""; 
     113                    } 
     114                } 
     115                rowList.add(completeRow); 
     116            } 
     117        } 
    120118 
    121119    } 
     
    126124     */ 
    127125    private int maxNoRows() { 
    128         int maxRows = 0; 
    129         for (TableSeries tseries : tableSeries) { 
    130             if (tseries.getRows().size() > maxRows) 
    131                 maxRows = tseries.getRows().size(); 
    132         } 
    133         return maxRows; 
     126        int maxRows = 0; 
     127        for (TableSeries tseries : tableSeries) { 
     128            if (tseries.getRows().size() > maxRows) 
     129                maxRows = tseries.getRows().size(); 
     130        } 
     131        return maxRows; 
    134132    } 
    135133 
    136134    public void setRowsForView(List<ManyRow> rowsForView) { 
    137         this.rowsForView = rowsForView; 
     135        this.rowsForView = rowsForView; 
    138136    } 
    139137 
    140138    public List<ManyRow> getRowsForView() { 
    141         return rowsForView; 
     139        return rowsForView; 
    142140    } 
    143141 
    144142    public void setSeries(List<String> series) { 
    145         this.series = series; 
     143        this.series = series; 
    146144    } 
    147145 
    148146    public List<String> getSeries() { 
    149         return series; 
     147        return series; 
    150148    } 
    151149 
    152150    public void setRowList(List<Object[]> rowList) { 
    153         this.rowList = rowList; 
     151        this.rowList = rowList; 
    154152    } 
    155153 
    156154    public List<Object[]> getRowList() { 
    157         return rowList; 
     155        return rowList; 
    158156    } 
    159157 
  • raptor-web/trunk/src/main/java/uk/ac/cardiff/raptorweb/model/TableSeries.java

    r899 r1491  
    1717 * 
    1818 */ 
     19 
    1920package uk.ac.cardiff.raptorweb.model; 
    2021 
     
    2627import org.slf4j.LoggerFactory; 
    2728 
    28 import uk.ac.cardiff.raptorweb.engine.ChartProcessor; 
    2929import uk.ac.cardiff.raptorweb.model.records.Row; 
    3030 
    3131/** 
    3232 * @author philsmart 
    33  * 
     33 *  
    3434 */ 
    35 public class TableSeries implements Serializable{ 
     35public class TableSeries implements Serializable { 
     36 
     37    /** 
     38     * Serial UID. 
     39     */ 
     40    private static final long serialVersionUID = 6708316462135569267L; 
    3641 
    3742    static Logger log = LoggerFactory.getLogger(TableSeries.class); 
    3843 
    3944    private List<Row> rows; 
     45 
    4046    private String seriesLabel; 
    4147 
    42     public TableSeries(){ 
    43         rows = new ArrayList<Row>(); 
     48    public TableSeries() { 
     49        rows = new ArrayList<Row>(); 
    4450    } 
    4551 
    4652    public void setRows(List<Row> rows) { 
    47         this.rows = rows; 
     53        this.rows = rows; 
    4854    } 
    4955 
    5056    public List<Row> getRows() { 
    51         return rows; 
     57        return rows; 
    5258    } 
    5359 
    5460    public void addRow(Row row) { 
    55         getRows().add(row); 
     61        getRows().add(row); 
    5662    } 
    5763 
    5864    public void setSeriesLabel(String seriesLabel) { 
    59         this.seriesLabel = seriesLabel; 
     65        this.seriesLabel = seriesLabel; 
    6066    } 
    6167 
    6268    public String getSeriesLabel() { 
    63         return seriesLabel; 
     69        return seriesLabel; 
    6470    } 
    6571 
  • raptor-web/trunk/src/main/java/uk/ac/cardiff/raptorweb/model/WebSession.java

    r1371 r1491  
    1414 * limitations under the License. 
    1515 */ 
     16 
    1617package uk.ac.cardiff.raptorweb.model; 
    1718 
     
    2122 
    2223/** 
    23  * The Web Session class holds all view specific state information e.g. about the user, the startmodel, the graphmodel etc. Hence any call to these must come 
    24  * through the flowscope.webuser context. 
     24 * The Web Session class holds all view specific state information e.g. about the user, the startmodel, the graphmodel 
     25 * etc. Hence any call to these must come through the flowscope.webuser context. 
    2526 *  
    2627 * @author philsmart 
     
    3536 
    3637    private Authentication user; 
     38 
    3739    private StartModel startmodel; 
     40 
    3841    private GraphModel graphmodel; 
     42 
    3943    private ReportModel reportmodel; 
     44 
    4045    private SetupModel setupmodel; 
    4146 
     
    5055    public void setUser(Authentication user) { 
    5156        this.user = user; 
     57 
    5258    } 
    5359 
  • raptor-web/trunk/src/main/java/uk/ac/cardiff/raptorweb/model/dashboard/DashboardStatisticsSet.java

    r1390 r1491  
    1414 * limitations under the License. 
    1515 */ 
     16 
    1617package uk.ac.cardiff.raptorweb.model.dashboard; 
    1718 
     
    3334 
    3435    public enum TimeRange { 
    35         TODAY, LASTWEEK, LASTMONTH, LASTYEAR 
     36        TODAY, LASTWEEK, LASTMONTH, LASTYEAR, SCONULYEAR, PREVIOUSMONTH 
    3637    } 
    3738 
     
    3940 
    4041    /** 
    41      * @param computedOverTimeRanges 
    42      *            the computedOverTimeRanges to set 
     42     * @param computedOverTimeRanges the computedOverTimeRanges to set 
    4343     */ 
    4444    public void setComputedOverTimeRanges(List<TimeRange> computedOverTimeRanges) { 
     
    5454 
    5555    /** 
    56      * @param resourceCategorys 
    57      *            the resourceCategorys to set 
     56     * @param resourceCategorys the resourceCategorys to set 
    5857     */ 
    5958    public void setResourceCategorys(List<StatisticParameters.ResourceCategory> resourceCategorys) { 
  • raptor-web/trunk/src/main/java/uk/ac/cardiff/raptorweb/sei/ServiceEndpointClient.java

    r1011 r1491  
    1414 * limitations under the License. 
    1515 */ 
     16 
    1617package uk.ac.cardiff.raptorweb.sei; 
    1718 
    18 import java.io.File; 
    19 import java.io.FileInputStream; 
    2019import java.io.FileNotFoundException; 
    2120import java.io.IOException; 
    22 import java.security.KeyStore; 
    2321import java.security.KeyStoreException; 
    2422import java.security.NoSuchAlgorithmException; 
     
    2826import java.util.List; 
    2927 
    30 import javax.net.ssl.TrustManager; 
    31 import javax.net.ssl.TrustManagerFactory; 
    32  
    3328import org.apache.cxf.aegis.databinding.AegisDatabinding; 
    3429import org.apache.cxf.binding.soap.SoapFault; 
    35 import org.apache.cxf.configuration.jsse.TLSClientParameters; 
    3630import org.apache.cxf.frontend.ClientProxy; 
    3731import org.apache.cxf.frontend.ClientProxyFactoryBean; 
     
    4539import uk.ac.cardiff.model.resource.ResourceMetadata; 
    4640import uk.ac.cardiff.model.wsmodel.Capabilities; 
     41import uk.ac.cardiff.model.wsmodel.DynamicStatisticalUnitInformation; 
    4742import uk.ac.cardiff.model.wsmodel.LogFileUpload; 
    4843import uk.ac.cardiff.model.wsmodel.LogFileUploadResult; 
     44import uk.ac.cardiff.model.wsmodel.StatisticFunctionType; 
    4945import uk.ac.cardiff.model.wsmodel.StatisticalUnitInformation; 
    5046import uk.ac.cardiff.raptor.remoting.client.sei.impl.ClientTLSParameters; 
     
    5349 
    5450/** 
    55  * 
    56  * 
     51 *  
     52 *  
    5753 * @author philsmart 
    58  * 
    59  *         Instances of this class are responsible for retrieving data from a service endpoint. This class should not be static and should not recreate the 
    60  *         Client for every request. 
    61  * 
     54 *  
     55 *         Instances of this class are responsible for retrieving data from a service endpoint. This class should not be 
     56 *         static and should not recreate the Client for every request. 
     57 *  
    6258 */ 
    6359public class ServiceEndpointClient { 
     
    6864    /** Raptor specific TLS parameters class, that can return cxf TLSParameters */ 
    6965    private ClientTLSParameters tlsParameters; 
    70      
    71     /** How long to wait, in ms, before the connection attempt times out.*/ 
     66 
     67    /** How long to wait, in ms, before the connection attempt times out. */ 
    7268    private int connectionTimeout; 
    73      
     69 
    7470    /** How long to wait, in ms, for the web service call to respond before failing */ 
    7571    private int receiveTimeout; 
    7672 
    77     public MultiUnitAggregator getEndpointConnection(MUAEntry endpoint) throws UnrecoverableKeyException, KeyStoreException, NoSuchAlgorithmException, CertificateException, FileNotFoundException, IOException { 
    78         ClientProxyFactoryBean factory = new ClientProxyFactoryBean(); 
    79         factory.setServiceClass(MultiUnitAggregator.class); 
    80         AegisDatabinding databinding = new AegisDatabinding(); 
    81         factory.setAddress(endpoint.getServiceEndpoint()); 
    82         factory.getServiceFactory().setDataBinding(databinding); 
    83  
    84         MultiUnitAggregator client = (MultiUnitAggregator) factory.create(); 
    85         org.apache.cxf.endpoint.Client cl = ClientProxy.getClient(client); 
    86         HTTPConduit httpConduit = (HTTPConduit) cl.getConduit(); 
    87         HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy(); 
    88         httpClientPolicy.setConnectionTimeout(connectionTimeout); 
    89         httpClientPolicy.setReceiveTimeout(receiveTimeout); 
    90         httpConduit.setClient(httpClientPolicy); 
    91  
    92         if (tlsParameters != null) 
    93             httpConduit.setTlsClientParameters(tlsParameters.getTlsClientParameters()); 
    94  
    95         return client; 
    96     } 
    97  
    98     /** 
    99      * Method to determine and return the <code>Capabilities</code> of a MultiUnitAggregator. This method uses a hard set connection timeout of 10 miliseconds, 
    100      * and a receive timeout of 20 smilieconds, under the assumption that the capabilities of a MultiUnitAggregator can be sent inside small XML documents. 
    101      * 
     73    public MultiUnitAggregator getEndpointConnection(MUAEntry endpoint) throws UnrecoverableKeyException, 
     74            KeyStoreException, NoSuchAlgorithmException, CertificateException, FileNotFoundException, IOException { 
     75        ClientProxyFactoryBean factory = new ClientProxyFactoryBean(); 
     76        factory.setServiceClass(MultiUnitAggregator.class); 
     77        AegisDatabinding databinding = new AegisDatabinding(); 
     78        factory.setAddress(endpoint.getServiceEndpoint()); 
     79        factory.getServiceFactory().setDataBinding(databinding); 
     80 
     81        MultiUnitAggregator client = (MultiUnitAggregator) factory.create(); 
     82        org.apache.cxf.endpoint.Client cl = ClientProxy.getClient(client); 
     83        HTTPConduit httpConduit = (HTTPConduit) cl.getConduit(); 
     84        HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy(); 
     85        httpClientPolicy.setConnectionTimeout(connectionTimeout); 
     86        httpClientPolicy.setReceiveTimeout(receiveTimeout); 
     87        httpConduit.setClient(httpClientPolicy); 
     88 
     89        if (tlsParameters != null) 
     90            httpConduit.setTlsClientParameters(tlsParameters.getTlsClientParameters()); 
     91 
     92        return client; 
     93    } 
     94 
     95    /** 
     96     * Method to determine and return the <code>Capabilities</code> of a MultiUnitAggregator. This method uses a hard 
     97     * set connection timeout of 10 miliseconds, and a receive timeout of 20 smilieconds, under the assumption that the 
     98     * capabilities of a MultiUnitAggregator can be sent inside small XML documents. 
     99     *  
    102100     * @param endpoint 
    103101     * @return 
    104102     */ 
    105103    public Capabilities discoverMUACapabilities(MUAEntry endpoint) { 
    106         Capabilities capabilities = null; 
    107         try { 
    108             MultiUnitAggregator client = getEndpointConnection(endpoint); 
    109             log.debug("Accessing the MUA version " + client.getVersion()); 
    110             capabilities = client.getCapabilities(); 
    111             log.debug("Retrieved capabilities from the MUA [{}]", endpoint); 
    112         } catch (SoapFault e) { 
    113             log.error("SOAP Fault, Problem trying to retrieving capabilities from MUA [{}]", new Object[] { endpoint},e); 
    114             capabilities = new Capabilities(); 
    115             capabilities.setError(true); 
    116             capabilities.setErrorMessage(e.getMessage()); 
    117              e.printStackTrace(); 
    118         } catch (Exception e) { 
    119             log.error("Problem trying to retrieving capabilities from MUA [{}]", new Object[] { endpoint},e); 
    120             capabilities = new Capabilities(); 
    121             capabilities.setError(true); 
    122             capabilities.setErrorMessage(e.getMessage()); 
    123              e.printStackTrace(); 
    124         } 
    125         return capabilities; 
    126  
    127     } 
    128  
    129     /** 
    130      * This method sends a <code>StatisticalUnitInformaiton</code> instance to the MultiUnitAggregator <code>endpoint</code> The 
    131      * <code>StatisicalUnitInformation</code> instance encapsulates the parameters for a single statistical unit. Allowing the values to be sent back and 
    132      * changed on the MultiUnitAggregator 
    133      * 
     104        Capabilities capabilities = null; 
     105        try { 
     106            MultiUnitAggregator client = getEndpointConnection(endpoint); 
     107            log.debug("Accessing the MUA version " + client.getVersion()); 
     108            capabilities = client.getCapabilities(); 
     109            log.debug("Retrieved capabilities from the MUA [{}]", endpoint); 
     110        } catch (SoapFault e) { 
     111            log.error("SOAP Fault, Problem trying to retrieving capabilities from MUA [{}]", new Object[] {endpoint}, e); 
     112            capabilities = new Capabilities(); 
     113            capabilities.setError(true); 
     114            capabilities.setErrorMessage(e.getMessage()); 
     115            e.printStackTrace(); 
     116        } catch (Exception e) { 
     117            log.error("Problem trying to retrieving capabilities from MUA [{}]", new Object[] {endpoint}, e); 
     118            capabilities = new Capabilities(); 
     119            capabilities.setError(true); 
     120            capabilities.setErrorMessage(e.getMessage()); 
     121            e.printStackTrace(); 
     122        } 
     123        return capabilities; 
     124 
     125    } 
     126 
     127    /** 
     128     * @param selectedStatisticFunctionType 
     129     * @return 
     130     */ 
     131    public StatisticalUnitInformation lookupStatisticalUnitInformation(MUAEntry endpoint, 
     132            StatisticFunctionType selectedStatisticFunctionType) { 
     133        StatisticalUnitInformation statisticalInformation = null; 
     134        try { 
     135            MultiUnitAggregator client = getEndpointConnection(endpoint); 
     136            log.debug("Accessing the MUA version " + client.getVersion()); 
     137            statisticalInformation = client.getStatisticalUnitInformation(selectedStatisticFunctionType); 
     138            log.debug("Retrieved statistical unit information from the MUA [{}]", endpoint); 
     139        } catch (SoapFault e) { 
     140            log.error("SOAP Fault, Problem retrieving statistical unit information from MUA [{}]", 
     141                    new Object[] {endpoint}, e); 
     142            e.printStackTrace(); 
     143        } catch (Exception e) { 
     144            log.error("Problem retrieving statistical unit information from MUA [{}]", new Object[] {endpoint}, e); 
     145            e.printStackTrace(); 
     146        } 
     147        return statisticalInformation; 
     148    } 
     149 
     150    /** 
     151     * This method sends a <code>StatisticalUnitInformaiton</code> instance to the MultiUnitAggregator 
     152     * <code>endpoint</code> The <code>StatisicalUnitInformation</code> instance encapsulates the parameters for a 
     153     * single statistical unit. Allowing the values to be sent back and changed on the MultiUnitAggregator 
     154     *  
    134155     * @param endpoint 
    135156     * @param statisticalUnitInformation 
     
    137158     */ 
    138159    public Capabilities updateStatisticalUnit(MUAEntry endpoint, StatisticalUnitInformation statisticalUnitInformation) { 
    139         Capabilities capabilities = null; 
    140         try { 
    141             MultiUnitAggregator client = getEndpointConnection(endpoint); 
    142             log.debug("Accessing the MUA version {}", client.getVersion()); 
    143             log.debug("Updating statistic {} from the MUA {}", statisticalUnitInformation.getStatisticParameters().getUnitName(), endpoint); 
    144             client.updateStatisticalUnit(statisticalUnitInformation); 
    145  
    146         } catch (SoapFault e) { 
    147             log.error("SOAP Fault, Problem trying to update statistical unit {} on MUA [{}] -> {}", new Object[] { statisticalUnitInformation.getStatisticParameters().getUnitName(), endpoint, e.getMessage() }); 
    148             capabilities = new Capabilities(); 
    149             capabilities.setError(true); 
    150             capabilities.setErrorMessage(e.getMessage()); 
    151             // e.printStackTrace(); 
    152         } catch (Exception e) { 
    153             log.error("Problem trying to update statistical unit {} on MUA [{}] -> {}", new Object[] { statisticalUnitInformation.getStatisticParameters().getUnitName(), endpoint, e.getMessage() }); 
    154             capabilities = new Capabilities(); 
    155             capabilities.setError(true); 
    156             capabilities.setErrorMessage(e.getMessage()); 
    157             // e.printStackTrace(); 
    158         } 
    159         return capabilities; 
     160        Capabilities capabilities = null; 
     161        try { 
     162            MultiUnitAggregator client = getEndpointConnection(endpoint); 
     163            log.debug("Accessing the MUA version {}", client.getVersion()); 
     164            log.debug("Updating statistic {} from the MUA {}", statisticalUnitInformation.getStatisticParameters() 
     165                    .getUnitName(), endpoint); 
     166            client.updateStatisticalUnit(statisticalUnitInformation); 
     167 
     168        } catch (SoapFault e) { 
     169            log.error("SOAP Fault, Problem trying to update statistical unit {} on MUA [{}] -> {}", new Object[] { 
     170                    statisticalUnitInformation.getStatisticParameters().getUnitName(), endpoint, e.getMessage()}); 
     171            capabilities = new Capabilities(); 
     172            capabilities.setError(true); 
     173            capabilities.setErrorMessage(e.getMessage()); 
     174            // e.printStackTrace(); 
     175        } catch (Exception e) { 
     176            log.error("Problem trying to update statistical unit {} on MUA [{}] -> {}", new Object[] { 
     177                    statisticalUnitInformation.getStatisticParameters().getUnitName(), endpoint, e.getMessage()}); 
     178            capabilities = new Capabilities(); 
     179            capabilities.setError(true); 
     180            capabilities.setErrorMessage(e.getMessage()); 
     181            // e.printStackTrace(); 
     182        } 
     183        return capabilities; 
    160184 
    161185    } 
     
    165189     */ 
    166190    public AggregatorGraphModel invokeStatisticalUnit(MUAEntry endpoint, String selectedStatisticalUnit) { 
    167         try { 
    168             MultiUnitAggregator client = getEndpointConnection(endpoint); 
    169             log.debug("Accessing the MUA version " + client.getVersion()); 
    170             AggregatorGraphModel gmodel = client.invokeStatisticalUnit(selectedStatisticalUnit); 
    171             log.debug("Retrieved Graph Model from the MUA [" + endpoint + "]"); 
    172             return gmodel; 
    173         } catch (SoapFault e) { 
    174             log.error("SOAP Fault, Problem trying to invoke statistical unit {} on MUA [{}] -> {}", new Object[] { selectedStatisticalUnit, endpoint, e.getMessage() }); 
    175         } catch (Exception e) { 
    176             // catching general errors, e.g. no connection to endpoint 
    177             log.error("Problem trying to invoke statistical unit {} on MUA [{}] -> {}", new Object[] { selectedStatisticalUnit, endpoint, e.getMessage() }); 
    178         } 
    179  
    180         return null; 
     191        try { 
     192            MultiUnitAggregator client = getEndpointConnection(endpoint); 
     193            log.debug("Accessing the MUA version " + client.getVersion()); 
     194            AggregatorGraphModel gmodel = client.invokeStatisticalUnit(selectedStatisticalUnit); 
     195            log.debug("Retrieved Graph Model from the MUA [" + endpoint + "]"); 
     196            return gmodel; 
     197        } catch (SoapFault e) { 
     198            log.error("SOAP Fault, Problem trying to invoke statistical unit {} on MUA [{}] -> {}", new Object[] { 
     199                    selectedStatisticalUnit, endpoint, e.getMessage()}); 
     200        } catch (Exception e) { 
     201            // catching general errors, e.g. no connection to endpoint 
     202            log.error("Problem trying to invoke statistical unit {} on MUA [{}] -> {}", new Object[] { 
     203                    selectedStatisticalUnit, endpoint, e.getMessage()}); 
     204        } 
     205 
     206        return null; 
    181207    } 
    182208 
     
    186212     */ 
    187213    public boolean invokeAdministrativeFunction(MUAEntry endpoint, AdministrativeFunction function) { 
    188         try { 
    189             MultiUnitAggregator client = getEndpointConnection(endpoint); 
    190             log.debug("Accessing the MUA version {}", client.getVersion()); 
    191             boolean success = client.performAdministrativeFunction(function); 
    192  
    193             return success; 
    194         } catch (SoapFault e) { 
    195             log.error("SOAP Fault, Problem trying to perform administrative function {} on MUA {} -> {}  ", new Object[] { function.getAdministrativeFunction().toString(), endpoint, e.getMessage() }); 
    196             return false; 
    197         } catch (Exception e) { 
    198             log.error("Problem trying to perform administrative function {} on MUA {} -> {} ", new Object[] { function.getAdministrativeFunction().toString(), endpoint, e.getMessage() }); 
    199             log.error("Details, {}", e); 
    200             return false; 
    201         } 
    202  
    203     } 
    204  
    205     public List<LogFileUploadResult>  sendBatch(ArrayList<LogFileUpload> uploadFiles, MUAEntry endpoint) { 
     214        try { 
     215            MultiUnitAggregator client = getEndpointConnection(endpoint); 
     216            log.debug("Accessing the MUA version {}", client.getVersion()); 
     217            boolean success = client.performAdministrativeFunction(function); 
     218 
     219            return success; 
     220        } catch (SoapFault e) { 
     221            log.error("SOAP Fault, Problem trying to perform administrative function {} on MUA {} -> {}  ", 
     222                    new Object[] {function.getAdministrativeFunction().toString(), endpoint, e.getMessage()}); 
     223            return false; 
     224        } catch (Exception e) { 
     225            log.error("Problem trying to perform administrative function {} on MUA {} -> {} ", new Object[] { 
     226                    function.getAdministrativeFunction().toString(), endpoint, e.getMessage()}); 
     227            log.error("Details, {}", e); 
     228            return false; 
     229        } 
     230 
     231    } 
     232 
     233    public List<LogFileUploadResult> sendBatch(ArrayList<LogFileUpload> uploadFiles, MUAEntry endpoint) { 
    206234        try { 
    207235            MultiUnitAggregator client = getEndpointConnection(endpoint); 
     
    210238 
    211239        } catch (SoapFault e) { 
    212             log.error("SOAP Fault, Problem trying to send batch log files to MUA {} -> {}  ", new Object[] {endpoint, e.getMessage() }); 
     240            log.error("SOAP Fault, Problem trying to send batch log files to MUA {} -> {}  ", 
     241                    new Object[] {endpoint, e.getMessage()}); 
    213242            return null; 
    214243        } catch (Exception e) { 
    215             log.error("Problem trying to send batch log files to MUA {} -> {} ", new Object[] {endpoint, e.getMessage() }); 
     244            log.error("Problem trying to send batch log files to MUA {} -> {} ", 
     245                    new Object[] {endpoint, e.getMessage()}); 
    216246            log.error("Details, {}", e); 
    217247            return null; 
     
    219249 
    220250    } 
    221      
     251 
     252    /** 
     253     * @param statisticalUnitInformations 
     254     */ 
     255    public AggregatorGraphModel invokeStatisticalUnitDynamic(MUAEntry endpoint, 
     256            DynamicStatisticalUnitInformation statisticalUnitInformations) { 
     257        try { 
     258            MultiUnitAggregator client = getEndpointConnection(endpoint); 
     259            log.debug("Accessing the MUA version {}", client.getVersion()); 
     260            AggregatorGraphModel model = client.invokeStatisticalUnitDynamically(statisticalUnitInformations); 
     261            return model; 
     262        } catch (SoapFault e) { 
     263            log.error("Problem trying to invoke a statistic dynamically on MUA {} -> {}  ", 
     264                    new Object[] {endpoint, e.getMessage()}); 
     265 
     266        } catch (Exception e) { 
     267            log.error("Problem trying to invoke a statistic dynamically on MUA {} -> {} ", 
     268                    new Object[] {endpoint, e.getMessage()}); 
     269            log.error("Details, {}", e); 
     270 
     271        } 
     272        return null; 
     273    } 
    222274 
    223275    public void sendResourceMetadata(List<ResourceMetadata> resourceMetadata, MUAEntry endpoint) { 
     
    230282            log.error("Problem trying to send resource metadata to MUA with error {}", e.getMessage()); 
    231283        } catch (Exception e) { 
    232             log.error("Problem trying to send resource metadata to MUA with error {} ",e.getMessage()); 
    233         } 
    234  
    235     } 
    236  
    237  
    238     public AggregatorGraphModel updateAndinvokeStatisticalUnit(MUAEntry endpoint, StatisticalUnitInformation statisticalUnit) { 
    239         try { 
    240             MultiUnitAggregator client = getEndpointConnection(endpoint); 
    241             log.debug("Accessing the MUA version " + client.getVersion()); 
    242             AggregatorGraphModel gmodel = client.updateAndInvokeStatisticalUnit(statisticalUnit); 
    243             log.debug("Retrieved Graph Model from the MUA [" + endpoint.getServiceEndpoint() + "]"); 
    244             return gmodel; 
    245         } catch (SoapFault e) { 
    246             log.error("Problem trying to update and invoke statistical unit {} on MUA with error {}", statisticalUnit.getStatisticParameters().getUnitName(), e.getMessage()); 
    247         } catch (Exception e) { 
    248             log.error("Problem trying to update and invoke statistical unit {} on MUA {} ", statisticalUnit.getStatisticParameters().getUnitName(), e.getMessage()); 
    249         } 
    250         return null; 
    251     } 
    252  
    253     /** 
    254      * @param tlsParameters 
    255      *            the tlsParameters to set 
     284            log.error("Problem trying to send resource metadata to MUA with error {} ", e.getMessage()); 
     285        } 
     286 
     287    } 
     288 
     289    public AggregatorGraphModel updateAndinvokeStatisticalUnit(MUAEntry endpoint, 
     290            StatisticalUnitInformation statisticalUnit) { 
     291        try { 
     292            MultiUnitAggregator client = getEndpointConnection(endpoint); 
     293            log.debug("Accessing the MUA version " + client.getVersion()); 
     294            AggregatorGraphModel gmodel = client.updateAndInvokeStatisticalUnit(statisticalUnit); 
     295            log.debug("Retrieved Graph Model from the MUA [" + endpoint.getServiceEndpoint() + "]"); 
     296            return gmodel; 
     297        } catch (SoapFault e) { 
     298            log.error("Problem trying to update and invoke statistical unit {} on MUA with error {}", statisticalUnit 
     299                    .getStatisticParameters().getUnitName(), e.getMessage()); 
     300        } catch (Exception e) { 
     301            log.error("Problem trying to update and invoke statistical unit {} on MUA {} ", statisticalUnit 
     302                    .getStatisticParameters().getUnitName(), e.getMessage()); 
     303        } 
     304        return null; 
     305    } 
     306 
     307    /** 
     308     * @param tlsParameters the tlsParameters to set 
    256309     */ 
    257310    public void setTlsParameters(ClientTLSParameters tlsParameters) { 
    258         this.tlsParameters = tlsParameters; 
     311        this.tlsParameters = tlsParameters; 
    259312    } 
    260313 
     
    263316     */ 
    264317    public ClientTLSParameters getTlsParameters() { 
    265         return tlsParameters; 
     318        return tlsParameters; 
    266319    } 
    267320 
     
    294347    } 
    295348 
    296  
    297  
    298349} 
  • raptor-web/trunk/src/main/java/uk/ac/cardiff/raptorweb/service/impl/EventTypeServiceImpl.java

    r1483 r1491  
    1414 * limitations under the License. 
    1515 */ 
     16 
    1617package uk.ac.cardiff.raptorweb.service.impl; 
    1718 
     
    4142 
    4243    /** 
    43      * Gets a list of event types from the attached MUA's capabilities, and places them inside SelectItems for the UI.The label is not the event type class name 
    44      * but a friendly name from the <code>eventTypeToDisplayMapper</code>. Importantly, if the event type is not in the <code>eventTypeToDisplayMapper</code> 
    45      * list, it is not returned. Consequently, the set of event types to display are only those specified in the <code>eventTypeToDisplayMapper</code>. 
     44     * Gets a list of event types from the attached MUA's capabilities, and places them inside SelectItems for the 
     45     * UI.The label is not the event type class name but a friendly name from the <code>eventTypeToDisplayMapper</code>. 
     46     * Importantly, if the event type is not in the <code>eventTypeToDisplayMapper</code> list, it is not returned. 
     47     * Consequently, the set of event types to display are only those specified in the 
     48     * <code>eventTypeToDisplayMapper</code>. 
    4649     */ 
    4750    @Override 
    4851    public List<SelectItem> getEventTypeList() { 
     52        log.debug("Getting event type list as a list of select items"); 
    4953        List<SelectItem> eventTypes = new ArrayList<SelectItem>(); 
    5054 
     
    7074 
    7175    /** 
    72      * @param webEngine 
    73      *            the webEngine to set 
     76     * @param webEngine the webEngine to set 
    7477     */ 
    7578    public void setWebEngine(RaptorWebEngine webEngine) { 
     
    7881 
    7982    /** 
    80      * @param eventTypeToDisplayMapper 
    81      *            the eventTypeToDisplayMapper to set 
     83     * @param eventTypeToDisplayMapper the eventTypeToDisplayMapper to set 
    8284     */ 
    8385    public void setEventTypeToDisplayMapper(EventTypeDisplayMapper eventTypeToDisplayMapper) { 
  • raptor-web/trunk/src/main/java/uk/ac/cardiff/raptorweb/service/impl/GraphServiceImpl.java

    r1483 r1491  
    1717 * 
    1818 */ 
     19 
    1920package uk.ac.cardiff.raptorweb.service.impl; 
    2021 
     
    2930import uk.ac.cardiff.model.wsmodel.MethodParameter; 
    3031import uk.ac.cardiff.model.wsmodel.ProcessorInformation; 
     32import uk.ac.cardiff.model.wsmodel.StatisticFunctionType; 
    3133import uk.ac.cardiff.model.wsmodel.StatisticParameters.StatisticType; 
    3234import uk.ac.cardiff.model.wsmodel.StatisticalUnitInformation; 
     
    7375    @Override 
    7476    public void removePostProcessorFromSelectedStatistic(WebSession websession) { 
    75         websession.getGraphmodel().getSelectedStatisticalUnit().getStatisticalUnitInformation().getPostprocessors().remove(websession.getGraphmodel().getSelectedPostProcessor()); 
     77        websession.getGraphmodel().getSelectedStatisticalUnit().getStatisticalUnitInformation().getPostprocessors() 
     78                .remove(websession.getGraphmodel().getSelectedPostProcessor()); 
    7679    } 
    7780 
     
    7982    public void addProcessorToSelectedStatistic(WebSession websession) { 
    8083        ProcessorInformation processorToAdd = websession.getGraphmodel().getProcessorToAdd(); 
    81         log.debug("Adding processor [{} with parameters {}]", processorToAdd.getFriendlyName(), (processorToAdd.getMethodParameters() != null)); 
     84        log.debug("Adding processor [{} with parameters {}]", processorToAdd.getFriendlyName(), 
     85                (processorToAdd.getMethodParameters() != null)); 
    8286 
    8387        if (processorToAdd.getMethodParameters() != null) { 
    8488            for (MethodParameter methodParameter : processorToAdd.getMethodParameters()) { 
    85                 log.debug("Parameter [{},{},{}]", new Object[] { methodParameter.getParameterName(), methodParameter.getValue(), methodParameter.getValue().getClass() }); 
     89                log.debug("Parameter [{},{},{}]", 
     90                        new Object[] {methodParameter.getParameterName(), methodParameter.getValue(), 
     91                                methodParameter.getValue().getClass()}); 
    8692            } 
    8793        } 
    88         websession.getGraphmodel().getSelectedStatisticalUnit().getStatisticalUnitInformation().getPostprocessors().add(processorToAdd); 
    89     } 
    90  
    91     /** 
    92      * Populates the {@link GraphModel} inside the <code>websesion</code> with the currently set statistical units if they do not already exist. 
     94        websession.getGraphmodel().getSelectedStatisticalUnit().getStatisticalUnitInformation().getPostprocessors() 
     95                .add(processorToAdd); 
     96    } 
     97 
     98    /** 
     99     * Populates the {@link GraphModel} inside the <code>websesion</code> with the currently set statistical units if 
     100     * they do not already exist. 
    93101     */ 
    94102    @Override 
     
    97105            return; 
    98106        } 
    99         ArrayList<StatisticalUnitInformationView> statisticalUnitsForView = new ArrayList<StatisticalUnitInformationView>(); 
     107        ArrayList<StatisticalUnitInformationView> statisticalUnitsForView = 
     108                new ArrayList<StatisticalUnitInformationView>(); 
    100109        List<StatisticalUnitInformation> units = getStatisticalUnits(); 
    101110        for (StatisticalUnitInformation unit : units) { 
     
    113122     * Populates the suggestion values that assist users in selecting certain statistical parameters. 
    114123     *  
    115      * @param websession 
    116      *            the webssesion to set suggestion values on. 
     124     * @param websession the webssesion to set suggestion values on. 
    117125     */ 
    118126    public void populateSuggestionValues(WebSession websession) { 
    119         websession.getGraphmodel().setSuggestionValues(webEngine.getCapabilitiesOfCurrentlyAttachedEndpoint().getSuggestionValues()); 
    120         websession.getGraphmodel().setEventTypes(webEngine.getCapabilitiesOfCurrentlyAttachedEndpoint().getEventsPerType()); 
     127        websession.getGraphmodel().setSuggestionValues( 
     128                webEngine.getCapabilitiesOfCurrentlyAttachedEndpoint().getSuggestionValues()); 
     129        websession.getGraphmodel().setEventTypes( 
     130                webEngine.getCapabilitiesOfCurrentlyAttachedEndpoint().getEventsPerType()); 
    121131 
    122132    } 
     
    138148    } 
    139149 
     150    /** 
     151     * Retrieves the {@link StatisticFunctionType} from the web engine from whatever is currently attached. 
     152     *  
     153     * @return 
     154     */ 
     155    public List<StatisticFunctionType> getStatisticFunctionTypeUnits() { 
     156        return webEngine.getAttachedCapabilities().getStatisticFunctionTypes(); 
     157    } 
     158 
    140159    @Override 
    141160    public void generateExcelReport(WebSession websession) { 
     
    169188    public void invokeStatisticalUnit(WebSession websession) { 
    170189        GraphModel model = websession.getGraphmodel(); 
    171         log.info("Graph Service Invoking {}", model.getSelectedStatisticalUnit().getStatisticalUnitInformation().getStatisticParameters().getUnitName()); 
    172         AggregatorGraphModel gmodel = webEngine.invokeStatisticalUnit(model.getSelectedStatisticalUnit().getStatisticalUnitInformation()); 
     190        log.info("Graph Service Invoking {}", model.getSelectedStatisticalUnit().getStatisticalUnitInformation() 
     191                .getStatisticParameters().getUnitName()); 
     192        AggregatorGraphModel gmodel = 
     193                webEngine.invokeStatisticalUnit(model.getSelectedStatisticalUnit().getStatisticalUnitInformation()); 
    173194        setGraphModel(model, gmodel); 
    174195 
     
    178199    public void updateAndInvokeStatisticalUnit(WebSession websession) { 
    179200        GraphModel model = websession.getGraphmodel(); 
    180         log.info("Graph Service Updating and Invoking {}", model.getSelectedStatisticalUnit().getStatisticalUnitInformation().getStatisticParameters().getUnitName()); 
    181         AggregatorGraphModel gmodel = webEngine.updateAndInvokeStatisticalUnit(websession.getGraphmodel().getSelectedStatisticalUnit().getStatisticalUnitInformation()); 
     201        log.info("Graph Service Updating and Invoking {}", model.getSelectedStatisticalUnit() 
     202                .getStatisticalUnitInformation().getStatisticParameters().getUnitName()); 
     203        AggregatorGraphModel gmodel = 
     204                webEngine.updateAndInvokeStatisticalUnit(websession.getGraphmodel().getSelectedStatisticalUnit() 
     205                        .getStatisticalUnitInformation()); 
    182206        setGraphModel(model, gmodel); 
    183207 
     
    189213            model.setCurrentTableGraph(chartProcessor.constructRaptorTableChartModel(gmodel)); 
    190214            model.setCurrentJFreeGraph(chartProcessor.constructJFreeGraph(gmodel, model.getChartOptions())); 
    191             model.setProcessingResult("Updated [" + uk.ac.cardiff.raptor.runtimeutils.DateUtils.getCurrentTimeFormatted() + "]"); 
     215            model.setProcessingResult("Updated [" 
     216                    + uk.ac.cardiff.raptor.runtimeutils.DateUtils.getCurrentTimeFormatted() + "]"); 
    192217 
    193218        } else { 
     
    195220            model.setCurrentTableGraph(null); 
    196221            model.setCurrentGraph(null); 
    197             model.setProcessingResult("The statistic failed to produce a graphable result [" + uk.ac.cardiff.raptor.runtimeutils.DateUtils.getCurrentTimeFormatted() + "]"); 
     222            model.setProcessingResult("The statistic failed to produce a graphable result [" 
     223                    + uk.ac.cardiff.raptor.runtimeutils.DateUtils.getCurrentTimeFormatted() + "]"); 
    198224        } 
    199225    } 
     
    231257     * (non-Javadoc) 
    232258     *  
    233      * @see uk.ac.cardiff.raptorweb.service.GraphService#removeSeriesFromSelectedStatistic(uk.ac.cardiff.raptorweb.model.WebSession) 
     259     * @see 
     260     * uk.ac.cardiff.raptorweb.service.GraphService#removeSeriesFromSelectedStatistic(uk.ac.cardiff.raptorweb.model. 
     261     * WebSession) 
    234262     */ 
    235263    @Override 
    236264    public void removeSeriesFromSelectedStatistic(WebSession websession) { 
    237         websession.getGraphmodel().getSelectedStatisticalUnit().removeSeries(websession.getGraphmodel().getSelectedSeries()); 
     265        websession.getGraphmodel().getSelectedStatisticalUnit() 
     266                .removeSeries(websession.getGraphmodel().getSelectedSeries()); 
    238267 
    239268    } 
     
    242271     * (non-Javadoc) 
    243272     *  
    244      * @see uk.ac.cardiff.raptorweb.service.GraphService#addSeriesToSelectedStatistic(uk.ac.cardiff.raptorweb.model.WebSession) 
     273     * @see 
     274     * uk.ac.cardiff.raptorweb.service.GraphService#addSeriesToSelectedStatistic(uk.ac.cardiff.raptorweb.model.WebSession 
     275     * ) 
    245276     */ 
    246277    @Override 
     
    252283    @Override 
    253284    public void addFilterToSelectedSeries(WebSession websession) { 
    254         websession.getGraphmodel().getSelectedStatisticalUnit().addFilterToSeries(websession.getGraphmodel().getSelectedSeries()); 
     285        websession.getGraphmodel().getSelectedStatisticalUnit() 
     286                .addFilterToSeries(websession.getGraphmodel().getSelectedSeries()); 
    255287 
    256288    } 
     
    258290    @Override 
    259291    public void removeSelectedFilterFromSelectedStatistic(WebSession websession) { 
    260         websession.getGraphmodel().getSelectedStatisticalUnit().removeFilterFromSeries(websession.getGraphmodel().getSelectedSeries()); 
     292        websession.getGraphmodel().getSelectedStatisticalUnit() 
     293                .removeFilterFromSeries(websession.getGraphmodel().getSelectedSeries()); 
    261294 
    262295    } 
  • raptor-web/trunk/src/main/resources/logback.xml

    r1031 r1491  
    4747    <appender-ref ref="FILE"/> 
    4848  </logger> 
    49   <logger name="uk.ac.cardiff" level="DEBUG"> 
     49  <logger name="uk.ac.cardiff" level="TRACE"> 
    5050    <appender-ref ref="stdout"/> 
    5151    <appender-ref ref="FILE"/> 
  • raptor-web/trunk/src/main/webapp/WEB-INF/config/web-core.xml

    r1483 r1491  
    11<?xml version="1.0" encoding="UTF-8"?> 
    2 <!-- 
    3  
    4     Copyright (C) 2010 Cardiff University, Wales <smartp@cf.ac.uk> 
    5  
    6     Licensed under the Apache License, Version 2.0 (the "License"); 
    7     you may not use this file except in compliance with the License. 
    8     You may obtain a copy of the License at 
    9  
    10             http://www.apache.org/licenses/LICENSE-2.0 
    11  
    12     Unless required by applicable law or agreed to in writing, software 
    13     distributed under the License is distributed on an "AS IS" BASIS, 
    14     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
    15     See the License for the specific language governing permissions and 
    16     limitations under the License. 
    17  
    18 --> 
    19 <beans xmlns="http://www.springframework.org/schema/beans" 
    20        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    21        xsi:schemaLocation=" 
     2<!-- Copyright (C) 2010 Cardiff University, Wales <smartp@cf.ac.uk> Licensed under the Apache License, Version 2.0 (the "License");  
     3    you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0  
     4    Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS  
     5    IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language  
     6    governing permissions and limitations under the License. --> 
     7<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     8    xsi:schemaLocation=" 
    229           http://www.springframework.org/schema/beans 
    2310           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> 
     
    2512 
    2613 
    27         <bean id="webEngine" class="uk.ac.cardiff.raptorweb.engine.RaptorWebEngine" init-method="initialise"> 
    28                 <property name="registry"><ref bean="muaRegistry"></ref></property> 
    29                 <property name="reportHandler"><ref bean="reportHandler"></ref></property> 
    30                 <property name="webMetadata"><ref bean="webMetadata"></ref></property> 
    31         <constructor-arg index="0"><ref bean="serviceEndpointClient"/></constructor-arg> 
    32         </bean> 
    33  
    34  
    35  
    36         <bean id="setupService" class="uk.ac.cardiff.raptorweb.service.impl.SetupServiceImpl"> 
    37                 <property name="webEngine"><ref bean="webEngine"/></property> 
    38         </bean> 
    39  
    40         <bean id="preferenceService" class="uk.ac.cardiff.raptorweb.service.impl.PreferenceServiceImpl"> 
    41  
    42         </bean> 
     14    <bean id="webEngine" class="uk.ac.cardiff.raptorweb.engine.RaptorWebEngine" init-method="initialise"> 
     15        <property name="registry"> 
     16            <ref bean="muaRegistry"></ref> 
     17        </property> 
     18        <property name="reportHandler"> 
     19            <ref bean="reportHandler"></ref> 
     20        </property> 
     21        <property name="webMetadata"> 
     22            <ref bean="webMetadata"></ref> 
     23        </property> 
     24        <constructor-arg index="0"> 
     25            <ref bean="serviceEndpointClient" /> 
     26        </constructor-arg> 
     27    </bean> 
     28 
     29 
     30 
     31    <bean id="setupService" class="uk.ac.cardiff.raptorweb.service.impl.SetupServiceImpl"> 
     32        <property name="webEngine"> 
     33            <ref bean="webEngine" /> 
     34        </property> 
     35    </bean> 
     36 
     37    <bean id="preferenceService" class="uk.ac.cardiff.raptorweb.service.impl.PreferenceServiceImpl"> 
     38 
     39    </bean> 
     40 
     41    <bean id="juspService" class="uk.ac.cardiff.raptorweb.service.impl.JuspServiceImpl"> 
     42 
     43    </bean> 
     44 
     45    <bean id="savedWizardReportsService" class="uk.ac.cardiff.raptorweb.service.impl.SavedWizardReportsServiceImpl"> 
     46        <property name="marshaller" ref="castorMarshaller" /> 
     47        <property name="unmarshaller" ref="castorMarshaller" /> 
     48        <property name="baseDirectory"> 
     49            <value>/</value> 
     50        </property> 
     51        <property name="saveDirectory"> 
     52            <value>/reports/</value> 
     53        </property> 
     54    </bean> 
    4355     
    44     <bean id="juspService" class="uk.ac.cardiff.raptorweb.service.impl.JuspServiceImpl"> 
    45  
    46     </bean> 
    47      
     56    <bean id="castorMarshaller" class="org.springframework.oxm.castor.CastorMarshaller"> 
     57        <property name="mappingLocation" value="classpath:graph-wizard-mapping.xml" /> 
     58        <property name="whitespacePreserve" value="true"/> 
     59    </bean> 
     60 
     61    <bean id=" 
     62            graphWizardService " class="uk.ac.cardiff.raptorweb.service.impl.GraphWizardServiceImpl"> 
     63        <property name="webEngine"> 
     64            <ref bean="webEngine" /> 
     65        </property> 
     66        <property name="chartProcessor"> 
     67            <ref bean="chartProcessor" /> 
     68        </property> 
     69    </bean> 
     70 
    4871    <bean id="eventTypeService" class="uk.ac.cardiff.raptorweb.service.impl.EventTypeServiceImpl"> 
    49         <property name="webEngine"><ref bean="webEngine"/></property> 
    50         <property name="eventTypeToDisplayMapper" ref="eventTypesToDisplayMapper"/> 
    51     </bean> 
    52  
    53         <bean id="startService" class="uk.ac.cardiff.raptorweb.service.impl.StartServiceImpl"> 
    54                 <property name="webEngine"><ref bean="webEngine"/></property> 
    55         <property name="dashboardStatisticSets" ref="dashboardStatisticsList"/>         
    56         </bean> 
    57  
    58         <bean id="graphService" class="uk.ac.cardiff.raptorweb.service.impl.GraphServiceImpl"> 
    59                 <property name="webEngine"><ref bean="webEngine"/></property> 
    60                 <property name="chartProcessor"><ref bean="chartProcessor"/></property> 
    61         </bean> 
    62  
    63         <!--  SET UP the report generators --> 
    64         <bean name="reportHandler" class="uk.ac.cardiff.raptorweb.engine.reports.ReportHandler"> 
    65                 <property name ="reportConstructors"> 
    66                         <list> 
    67                                 <bean name="excelreportConstructorImpl" class="uk.ac.cardiff.raptorweb.engine.reports.ExcelReportGenerator"> 
    68                                         <property name="saveDirectory"><value>/downloads/</value></property> 
    69                                         <property name="baseDirectory"><value>/</value></property> <!-- the above is the absolute path, this is the same but as a relative path--> 
    70                                 </bean> 
    71                                 <bean name="csvreportConstructorImpl" class="uk.ac.cardiff.raptorweb.engine.reports.CSVReportGenerator"> 
    72                                         <property name="saveDirectory"><value>/downloads/</value></property> 
    73                                         <property name="baseDirectory"><value>/</value></property> <!-- the above is the absolute path, this is the same but as a relative path--> 
    74                                 </bean> 
    75                                 <bean name="pdfreportConstructorImpl" class="uk.ac.cardiff.raptorweb.engine.reports.GraphAndChartPDFReportGenerator"> 
    76                                         <property name="saveDirectory"><value>/downloads/</value></property> 
    77                                         <property name="baseDirectory"><value>/</value></property> <!-- the above is the absolute path, this is the same but as a relative path--> 
    78                                         <property name="reportBean"><ref bean="genericReportBean"/></property> 
    79                                         <property name="reportXMLFile"><value>generic-report.xml</value></property> 
    80                     <property name="eventTypeMapper"><ref bean="eventTypesToDisplayMapper"/></property> 
    81                                 </bean> 
    82                         </list> 
    83                 </property> 
    84         </bean> 
    85  
    86         <bean name="genericReportBean" class="uk.ac.cardiff.raptorweb.engine.reports.beans.GenericReportBean"/> 
     72        <property name="webEngine"> 
     73            <ref bean="webEngine" /> 
     74        </property> 
     75        <property name="eventTypeToDisplayMapper" ref="eventTypesToDisplayMapper" /> 
     76    </bean> 
     77 
     78    <bean id="startService" class="uk.ac.cardiff.raptorweb.service.impl.StartServiceImpl"> 
     79        <property name="webEngine"> 
     80            <ref bean="webEngine" /> 
     81        </property> 
     82        <property name="dashboardStatisticSets" ref="dashboardStatisticsList" /> 
     83    </bean> 
     84 
     85    <bean id="graphService" class="uk.ac.cardiff.raptorweb.service.impl.GraphServiceImpl"> 
     86        <property name="webEngine"> 
     87            <ref bean="webEngine" /> 
     88        </property> 
     89        <property name="chartProcessor"> 
     90            <ref bean="chartProcessor" /> 
     91        </property> 
     92    </bean> 
     93 
     94    <!-- SET UP the report generators --> 
     95    <bean name="reportHandler" class="uk.ac.cardiff.raptorweb.engine.reports.ReportHandler"> 
     96        <property name="reportConstructors"> 
     97            <list> 
     98                <bean name="excelreportConstructorImpl" class="uk.ac.cardiff.raptorweb.engine.reports.ExcelReportGenerator"> 
     99                    <property name="saveDirectory"> 
     100                        <value>/downloads/</value> 
     101                    </property> 
     102                    <property name="baseDirectory"> 
     103                        <value>/</value> 
     104                    </property> <!-- the above is the absolute path, this is the same but as a relative path --> 
     105                </bean> 
     106                <bean name="csvreportConstructorImpl" class="uk.ac.cardiff.raptorweb.engine.reports.CSVReportGenerator"> 
     107                    <property name="saveDirectory"> 
     108                        <value>/downloads/</value> 
     109                    </property> 
     110                    <property name="baseDirectory"> 
     111                        <value>/</value> 
     112                    </property> <!-- the above is the absolute path, this is the same but as a relative path --> 
     113                </bean> 
     114                <bean name="pdfreportConstructorImpl" class="uk.ac.cardiff.raptorweb.engine.reports.GraphAndChartPDFReportGenerator"> 
     115                    <property name="saveDirectory"> 
     116                        <value>/downloads/</value> 
     117                    </property> 
     118                    <property name="baseDirectory"> 
     119                        <value>/</value> 
     120                    </property> <!-- the above is the absolute path, this is the same but as a relative path --> 
     121                    <property name="reportBean"> 
     122                        <ref bean="genericReportBean" /> 
     123                    </property> 
     124                    <property name="reportXMLFile"> 
     125                        <value>generic-report.xml</value> 
     126                    </property> 
     127                    <property name="eventTypeMapper"> 
     128                        <ref bean="eventTypesToDisplayMapper" /> 
     129                    </property> 
     130                </bean> 
     131            </list> 
     132        </property> 
     133    </bean> 
     134 
     135    <bean name="genericReportBean" class="uk.ac.cardiff.raptorweb.engine.reports.beans.GenericReportBean" /> 
    87136 
    88137    <!-- Set up the chart processor --> 
    89138    <bean name="chartProcessor" class="uk.ac.cardiff.raptorweb.engine.ChartProcessor"> 
    90             <property name="saveDirectory"><value>/graphs/</value></property> 
    91             <property name="baseDirectory"><value>/</value></property> <!-- the above is the absolute path, this is the same but as a relative path--> 
    92     </bean> 
    93      
     139        <property name="saveDirectory"> 
     140            <value>/graphs/</value> 
     141        </property> 
     142        <property name="baseDirectory"> 
     143            <value>/</value> 
     144        </property> <!-- the above is the absolute path, this is the same but as a relative path --> 
     145    </bean> 
     146 
    94147    <!-- Set up a background task that removes old graphs used for display only (not saved reports e.g. PDFs) --> 
    95148    <bean id="garbageCollectionService" class="uk.ac.cardiff.raptorweb.service.impl.GarbageCollectionServiceImpl"> 
    96         <property name="graphDirectoryCleaner" ref="graphCleaner"/> 
    97     </bean> 
    98      
     149        <property name="graphDirectoryCleaner" ref="graphCleaner" /> 
     150    </bean> 
     151 
    99152    <bean id="graphCleaner" class="uk.ac.cardiff.raptorweb.engine.garbage.GraphDirectoryCleaner"> 
    100         <property name="graphsDirectoryToClean" value="/graphs/"/> 
    101         <property name="daysBehindToRemoveFrom" value="7"/> 
    102     </bean> 
    103      
     153        <property name="graphsDirectoryToClean" value="/graphs/" /> 
     154        <property name="daysBehindToRemoveFrom" value="7" /> 
     155    </bean> 
     156 
    104157    <bean id="garbageCollectionScheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> 
    105158        <property name="triggers"> 
    106159            <list> 
    107                <ref local="cleanOldGraphsQuickTrigger"/> 
     160                <ref local="cleanOldGraphsQuickTrigger" /> 
    108161            </list> 
    109162        </property> 
     
    114167            <ref local="cleanOldGraphsJobDetail" /> 
    115168        </property> 
    116         <property name="startDelay" value="10000"/> 
    117         <property name="repeatInterval" value="18000000"/> 
    118     </bean> 
    119  
    120     <bean id="cleanOldGraphsJobDetail" 
    121         class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> 
     169        <property name="startDelay" value="10000" /> 
     170        <property name="repeatInterval" value="18000000" /> 
     171    </bean> 
     172 
     173    <bean id="cleanOldGraphsJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> 
    122174        <property name="targetObject"> 
    123175            <ref bean="garbageCollectionService" /> 
     
    132184 
    133185 
    134         <!-- Set up the start page background stats generator --> 
    135         <bean id="statsSchedular" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> 
    136                 <property name="triggers"> 
    137                         <list> 
    138                          <!-- <ref local="SystemStatsQuickTrigger"/>--> 
    139                         </list> 
    140                 </property> 
    141         </bean> 
    142  
    143         <bean id="SystemStatsQuickTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean"> 
    144                 <property name="jobDetail"> 
    145                         <ref local="SystemStatsJobDetail" /> 
    146                 </property> 
    147                 <property name="startDelay" value="10000"/> 
    148                 <property name="repeatInterval" value="18000000"/> 
    149         </bean> 
    150  
    151         <bean id="SystemStatsJobDetail" 
    152                 class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> 
    153                 <property name="targetObject"> 
    154                         <ref bean="startService" /> 
    155                 </property> 
    156                 <property name="targetMethod"> 
    157                         <value>generateStatisticsBackground</value> 
    158                 </property> 
    159                 <property name="concurrent"> 
    160                         <value>false</value> 
    161                 </property> 
    162         </bean> 
    163      
    164     <!--  handles mapping between event types (Class names) and friendly names to display --> 
     186    <!-- Set up the start page background stats generator --> 
     187    <bean id="statsSchedular" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> 
     188        <property name="triggers"> 
     189            <list> 
     190                <!-- <ref local="SystemStatsQuickTrigger"/> --> 
     191            </list> 
     192        </property> 
     193    </bean> 
     194 
     195    <bean id="SystemStatsQuickTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean"> 
     196        <property name="jobDetail"> 
     197            <ref local="SystemStatsJobDetail" /> 
     198        </property> 
     199        <property name="startDelay" value="10000" /> 
     200        <property name="repeatInterval" value="18000000" /> 
     201    </bean> 
     202 
     203    <bean id="SystemStatsJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> 
     204        <property name="targetObject"> 
     205            <ref bean="startService" /> 
     206        </property> 
     207        <property name="targetMethod"> 
     208            <value>generateStatisticsBackground</value> 
     209        </property> 
     210        <property name="concurrent"> 
     211            <value>false</value> 
     212        </property> 
     213    </bean> 
     214 
     215    <!-- handles mapping between event types (Class names) and friendly names to display --> 
    165216    <bean id="eventTypesToDisplayMapper" class="uk.ac.cardiff.raptorweb.model.EventTypeDisplayMapper"> 
    166217        <property name="eventTypeFriendlyNameMap"> 
    167218            <map> 
    168                 <entry value="ShibbolethIdP" key="uk.ac.cardiff.model.event.ShibbolethIdpAuthenticationEvent"/> 
    169                 <entry value="EZproxy" key="uk.ac.cardiff.model.event.EzproxyAuthenticationEvent"/> 
    170                 <entry value="ShibbolethSP" key="uk.ac.cardiff.model.event.ShibbolethSpAuthenticationEvent"/> 
    171                 <entry value="Jusp Monthly" key="uk.ac.cardiff.model.event.JuspAggregatedEvent"/> 
     219                <entry value="ShibbolethIdP" key="uk.ac.cardiff.model.event.ShibbolethIdpAuthenticationEvent" /> 
     220                <entry value="EZproxy" key="uk.ac.cardiff.model.event.EzproxyAuthenticationEvent" /> 
     221                <entry value="ShibbolethSP" key="uk.ac.cardiff.model.event.ShibbolethSpAuthenticationEvent" /> 
     222                <entry value="Jusp Monthly" key="uk.ac.cardiff.model.event.JuspAggregatedEvent" /> 
    172223            </map> 
    173224        </property> 
    174      
     225 
    175226    </bean> 
    176227 
  • raptor-web/trunk/src/main/webapp/WEB-INF/config/webflow-config.xml

    r1207 r1491  
    3838        <webflow:flow-location path="/WEB-INF/flows/reports/main-flow.xml" 
    3939            id="reports" /> 
     40            <webflow:flow-location path="/WEB-INF/flows/reports/graph-wizard-subflow.xml" 
     41            id="report-wizard-subflow" /> 
    4042    </webflow:flow-registry> 
    4143 
  • raptor-web/trunk/src/main/webapp/WEB-INF/flows/reports/global-flow.xml

    r1483 r1491  
    2222     <global-transitions> 
    2323              <transition on="graphTrans" to="graphicalReports" /> 
     24              <transition on="wizardTrans" to="reportWizard" /> 
    2425        <transition on="setupTrans" to="setupRaptorWeb" /> 
    2526        <transition on="aboutTrans" to="about" /> 
  • raptor-web/trunk/src/main/webapp/WEB-INF/flows/reports/main-flow.xml

    r1483 r1491  
    1 <!-- 
    2  
    3     Copyright (C) 2010 Cardiff University, Wales <smartp@cf.ac.uk> 
    4  
    5     Licensed under the Apache License, Version 2.0 (the "License"); 
    6     you may not use this file except in compliance with the License. 
    7     You may obtain a copy of the License at 
    8  
    9             http://www.apache.org/licenses/LICENSE-2.0 
    10  
    11     Unless required by applicable law or agreed to in writing, software 
    12     distributed under the License is distributed on an "AS IS" BASIS, 
    13     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
    14     See the License for the specific language governing permissions and 
    15     limitations under the License. 
    16  
    17 --> 
    18 <flow parent="globalflow" xmlns="http://www.springframework.org/schema/webflow" 
    19         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    20         xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"> 
     1<!-- Copyright (C) 2010 Cardiff University, Wales <smartp@cf.ac.uk> Licensed under the Apache License, Version 2.0 (the "License");  
     2    you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0  
     3    Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS  
     4    IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language  
     5    governing permissions and limitations under the License. --> 
     6<flow parent="globalflow" xmlns="http://www.springframework.org/schema/webflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     7    xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"> 
    218 
    229 
    23         <var name="common" class="uk.ac.cardiff.raptorweb.model.CommonModel" /> 
     10    <var name="common" class="uk.ac.cardiff.raptorweb.model.CommonModel" /> 
    2411 
    2512 
    26         <on-start> 
    27            <!-- websession holds all variables for a particualar user, for a particular instance--> 
    28                 <!-- load the user preferences --> 
    29                 <evaluate expression="preferenceService.loadUserPrefs()" result="flowScope.websession" /> 
    30                 <!-- load saved reports for that user, although could be added to the preferences service --> 
    31                 <evaluate expression="graphService.loadSavedReports(flowScope.websession)"/> 
     13    <on-start> 
     14        <!-- websession holds all variables for a particualar user, for a particular instance --> 
     15        <!-- load the user preferences --> 
     16        <evaluate expression="preferenceService.loadUserPrefs()" result="flowScope.websession" /> 
     17        <!-- load saved reports for that user, although could be added to the preferences service --> 
     18        <evaluate expression="graphService.loadSavedReports(flowScope.websession)" /> 
    3219 
    33         </on-start> 
    34      
     20    </on-start> 
    3521 
    3622 
    37         <view-state id="startReport" view="dashboard.xhtml"> 
    3823 
    39                 <on-entry> 
    40                         <evaluate expression="startService.generateStatistics(flowScope.websession)" /> 
    41                 </on-entry> 
     24    <view-state id="startReport" view="dashboard.xhtml"> 
    4225 
    43                 <transition on="refreshStartStats"> 
    44                         <evaluate expression="startService.generateStatistics(flowScope.websession)" /> 
    45                 </transition> 
     26        <on-entry> 
     27            <evaluate expression="startService.generateStatistics(flowScope.websession)" /> 
     28        </on-entry> 
     29 
     30        <transition on="refreshStartStats"> 
     31            <evaluate expression="startService.generateStatistics(flowScope.websession)" /> 
     32        </transition> 
    4633 
    4734 
    48         </view-state> 
     35    </view-state> 
    4936 
    50         <view-state id="about" view="about.xhtml"> 
     37    <view-state id="reportWizard" view="reportWizard.xhtml"> 
     38        <var name="savedReports" class="uk.ac.cardiff.raptorweb.model.wizard.GraphWizardReports" /> 
     39        <on-entry> 
     40             <evaluate expression="savedWizardReportsService.load(savedReports,flowScope.websession.user.name)" /> 
     41        </on-entry> 
     42        <transition on="startReportWizard" to="graphWizardSubflow" /> 
     43    </view-state> 
    5144 
    52         </view-state> 
     45        <subflow-state id="graphWizardSubflow" subflow="report-wizard-subflow"> 
     46        <transition on="cancelWizard" to="reportWizard"/> 
     47    </subflow-state> 
    5348 
    54         <view-state id="graphicalReports" view="graphicalReports.xhtml"> 
    55      
    56         <var name="processorToAdd" class="uk.ac.cardiff.model.wsmodel.ProcessorInformation"/> 
     49    <view-state id="about" view="about.xhtml"> 
    5750 
    58                 <!-- populate the statisticalunit list --> 
    59                 <on-entry> 
     51    </view-state> 
     52 
     53    <view-state id="graphicalReports" view="graphicalReports.xhtml"> 
     54 
     55        <var name="processorToAdd" class="uk.ac.cardiff.model.wsmodel.ProcessorInformation" /> 
     56 
     57        <!-- populate the statisticalunit list --> 
     58        <on-entry> 
    6059            <evaluate expression="graphService.populateStatisticalUnits(flowScope.websession)" /> 
    61             <evaluate expression="graphService.populateSuggestionValues(flowScope.websession)"/> 
     60            <evaluate expression="graphService.populateSuggestionValues(flowScope.websession)" /> 
    6261        </on-entry> 
    6362 
    64                 <transition on="invokeStatisticalUnit"> 
    65                         <evaluate expression="graphService.invokeStatisticalUnit(flowScope.websession)" /> 
    66                 </transition> 
     63        <transition on="invokeStatisticalUnit"> 
     64            <evaluate expression="graphService.invokeStatisticalUnit(flowScope.websession)" /> 
     65        </transition> 
    6766 
    68                 <transition on="updateMUAStatistic"> 
    69                         <evaluate expression="graphService.updateAndInvokeStatisticalUnit(flowScope.websession)" />                      
    70                 </transition> 
     67        <transition on="updateMUAStatistic"> 
     68            <evaluate expression="graphService.updateAndInvokeStatisticalUnit(flowScope.websession)" /> 
     69        </transition> 
    7170 
    72                 <transition on="removeReport"> 
    73                         <evaluate expression="graphService.removeReport(flowScope.websession)" /> 
    74                 </transition> 
     71        <transition on="removeReport"> 
     72            <evaluate expression="graphService.removeReport(flowScope.websession)" /> 
     73        </transition> 
    7574 
    76                 <transition on="generateExcelReport"> 
    77                         <evaluate expression="graphService.generateExcelReport(flowScope.websession)" /> 
    78                 </transition> 
     75        <transition on="generateExcelReport"> 
     76            <evaluate expression="graphService.generateExcelReport(flowScope.websession)" /> 
     77        </transition> 
    7978 
    80                 <transition on="generateCSVReport"> 
    81                         <evaluate expression="graphService.generateCSVReport(flowScope.websession)" /> 
    82                 </transition> 
    83                  
    84                 <transition on="generatePDFReport"> 
    85                         <evaluate expression="graphService.generatePDFReport(flowScope.websession)"/> 
    86                 </transition> 
    87          
     79        <transition on="generateCSVReport"> 
     80            <evaluate expression="graphService.generateCSVReport(flowScope.websession)" /> 
     81        </transition> 
     82 
     83        <transition on="generatePDFReport"> 
     84            <evaluate expression="graphService.generatePDFReport(flowScope.websession)" /> 
     85        </transition> 
     86 
    8887        <transition on="initialiseNewProcessorAdd"> 
    89             <evaluate expression="flowScope.websession.graphmodel.initialiseNewProcessorAdd()"/> 
     88            <evaluate expression="flowScope.websession.graphmodel.initialiseNewProcessorAdd()" /> 
    9089        </transition> 
    91          
     90 
    9291        <transition on="setupProcessorToAdd"> 
    93             <evaluate expression="flowScope.websession.graphmodel.setupProcessorToAdd()"/> 
     92            <evaluate expression="flowScope.websession.graphmodel.setupProcessorToAdd()" /> 
    9493        </transition> 
    95          
    9694 
    97                 <transition on="removeSeriesFromSelectedStatistic"> 
    98                       <evaluate expression="graphService.removeSeriesFromSelectedStatistic(flowScope.websession)"/> 
    99                 </transition> 
    100                  
    101                 <transition on="removeSelectedFilterFromSelectedStatistic"> 
    102                       <evaluate expression="graphService.removeSelectedFilterFromSelectedStatistic(flowScope.websession)"/> 
    103                 </transition> 
    10495 
    105                 <transition on="addSeriesToSelectedStatistic"> 
    106                   <evaluate expression="graphService.addSeriesToSelectedStatistic(flowScope.websession)"></evaluate> 
    107                 </transition> 
    108          
     96        <transition on="removeSeriesFromSelectedStatistic"> 
     97            <evaluate expression="graphService.removeSeriesFromSelectedStatistic(flowScope.websession)" /> 
     98        </transition> 
     99 
     100        <transition on="removeSelectedFilterFromSelectedStatistic"> 
     101            <evaluate expression="graphService.removeSelectedFilterFromSelectedStatistic(flowScope.websession)" /> 
     102        </transition> 
     103 
     104        <transition on="addSeriesToSelectedStatistic"> 
     105            <evaluate expression="graphService.addSeriesToSelectedStatistic(flowScope.websession)"></evaluate> 
     106        </transition> 
     107 
    109108        <transition on="addProcessorToSelectedStatistic"> 
    110109            <evaluate expression="graphService.addProcessorToSelectedStatistic(flowScope.websession)"></evaluate> 
    111110        </transition> 
    112          
     111 
    113112        <transition on="removePostProcessorFromSelectedStatistic"> 
    114113            <evaluate expression="graphService.removePostProcessorFromSelectedStatistic(flowScope.websession)"></evaluate> 
    115114        </transition> 
    116                  
    117                 <transition on="addFilterToSelectedSeries"> 
    118                         <evaluate expression="graphService.addFilterToSelectedSeries(flowScope.websession)"></evaluate> 
    119                 </transition> 
    120                  
    121                 <transition on="rerenderGraph"> 
    122                         <evaluate expression="graphService.rerenderGraph(flowScope.websession)"/> 
    123                 </transition> 
     115 
     116        <transition on="addFilterToSelectedSeries"> 
     117            <evaluate expression="graphService.addFilterToSelectedSeries(flowScope.websession)"></evaluate> 
     118        </transition> 
     119 
     120        <transition on="rerenderGraph"> 
     121            <evaluate expression="graphService.rerenderGraph(flowScope.websession)" /> 
     122        </transition> 
    124123 
    125124 
    126         </view-state> 
    127  
    128  
    129     <view-state id="justReport" view="juspReport.xhtml"> 
    130      
    131125    </view-state> 
    132126 
    133127 
    134         <view-state id="setupRaptorWeb" view="setupRaptorWeb.xhtml"> 
    135     
     128 
     129 
     130 
     131 
     132 
     133 
     134    <view-state id="setupRaptorWeb" view="setupRaptorWeb.xhtml"> 
     135 
    136136        <on-entry> 
    137137            <!-- get capabilities every time the web page is rendered, hence resource classification is up to date --> 
    138138            <evaluate expression="setupService.getCapabilitiesOfCurrentlyAttachedEndpoint(flowScope.websession)" /> 
    139139        </on-entry> 
    140          
    141        
     140 
     141 
    142142 
    143143        <!-- force update of capabilities --> 
    144                 <transition on="getAggregatorCapabilities"> 
    145                         <evaluate expression="setupService.getCapabilities(flowScope.websession)" /> 
    146                 </transition> 
     144        <transition on="getAggregatorCapabilities"> 
     145            <evaluate expression="setupService.getCapabilities(flowScope.websession)" /> 
     146        </transition> 
    147147 
    148                 <transition on="deleteAllEntriesFromAttachedMUA"> 
    149                         <evaluate expression="setupService.deleteAllEntriesFromAttachedMUA(flowScope.websession)" /> 
    150                 </transition> 
     148        <transition on="deleteAllEntriesFromAttachedMUA"> 
     149            <evaluate expression="setupService.deleteAllEntriesFromAttachedMUA(flowScope.websession)" /> 
     150        </transition> 
    151151 
    152                 <transition on="attachMUA"> 
    153                         <evaluate expression="setupService.setAttachedEndpoint(flowScope.websession)" /> 
    154                 </transition> 
    155          
     152        <transition on="attachMUA"> 
     153            <evaluate expression="setupService.setAttachedEndpoint(flowScope.websession)" /> 
     154        </transition> 
     155 
    156156        <transition on="batchUpload"> 
    157157            <evaluate expression="setupService.batchUpload(flowScope.websession)" /> 
     
    162162        </transition> 
    163163 
    164         </view-state> 
     164    </view-state> 
    165165 
    166166 
  • raptor-web/trunk/src/main/webapp/WEB-INF/web.xml

    r995 r1491  
    142142    <context-param> 
    143143        <param-name>org.richfaces.SKIN</param-name> 
    144         <param-value>darkX</param-value> 
     144        <param-value>glassX</param-value> 
    145145    </context-param> 
    146146 
  • raptor-web/trunk/src/main/webapp/templates/raptor/css/common.css

    r1483 r1491  
    1414 * limitations under the License. 
    1515 */ 
    16 * { margin: 0px; padding: 0px; } 
    17 html            { min-height: 100%; } 
    18  
    19 body { text-align: center; font-family: arial, verdana, sans-serif; font-size: 12px; color: #333;  line-height:18px; } 
    20 p, h1, h2, h3, ol, ul, dl { padding:2px 6px 8px; } 
     16* { 
     17        margin: 0px; 
     18        padding: 0px; 
     19} 
     20 
     21html { 
     22        min-height: 100%; 
     23} 
     24 
     25body { 
     26        text-align: center; 
     27        font-family: arial, verdana, sans-serif; 
     28        font-size: 12px; 
     29        color: #333; 
     30        line-height: 18px; 
     31} 
     32 
     33p,h1,h2,h3,ol,ul,dl { 
     34        padding: 2px 6px 8px; 
     35} 
     36 
    2137ol,ul,dl 
    22 h1, h2, h3, ol, ul, dl { padding:8px 6px 3px; } 
    23 table, th, td { font-family: arial, verdana, sans-serif; font-size: 12px; color: #333; } 
    24 ol, ul, dir, menu, dd                   { margin-left: 40px } 
    25 ol                                                      { list-style-type: decimal } 
    26 ol ul, ul ol, ul ul, ol ol              { margin-top: 0; margin-bottom: 0 } 
    27 blockquote { width:80%; margin:10px auto; padding:0 26px;  background:#FFF url(../images/bg_blockquote_side.gif) no-repeat 0 50%; } 
    28 #skip                           { display: none; } 
    29 a img, :link img, :visited img { border: none; } 
    30 img                             { display: block; } 
    31 a:link                          { color: #C74848; text-decoration: underline; } 
    32 a:visited                       { color: #333; text-decoration: underline; } 
    33 a:hover, a:active       { color: #DB7C7C; } 
    34  
    35 .alignright             { text-align: right !important; } 
    36 .floatright             { float: right; } 
    37 .inline                 { display: inline; } 
    38  
    39 .clear  { clear: both;} 
    40  
    41 .clearfix:after { content:"."; display:block; height:0; clear:both; visibility:hidden; } 
    42 .clearfix               { display:inline-block; } 
    43 /*\*/ .clearfix { display:block; } /**/ 
    44  
    45 h1              { font-size: 20px; line-height: 18px;  } 
    46 h2              { font-size:18px; } 
    47 h3              { font-size: 16px; color: #666; } 
    48  
    49 #wrapper                { width:100%; margin:0 auto; } 
    50 header          { position:relative; display:block; width:100%; height:50px; background:#FFF } 
    51 #header .logo   { position:absolute; left:10px; top:5px; } 
    52  
    53 #nav                    { display:block; width:100%; height:26px; margin:0; padding:0; list-style:none; text-align:center; background:#A13D3D url(../images/bg_nav.gif) repeat-x; } 
    54 #nav li                 { float:left; width:120px;  } 
    55 #nav li a               { text-decoration:none; display:block; padding:0; padding:0; height:1%; line-height:26px; color:#000000; } 
    56 #nav li.on              { display:block; padding:0; width:120px; height:26px; line-height:26px; background:url(../images/bg_nav_on_3.gif) no-repeat 50% 0; color:#EFEFEF; } 
    57 #nav li a:hover {  color:#0099CC; background:url(../images/bg_nav_on_3.gif) no-repeat 50% 0; } 
    58  
    59 #content { width:100%; padding:1px 0px 0; min-height:543px; text-align:left;  } 
    60 * html #content, * html #content #col_1 { height:543px; } 
    61  
    62 #content #col_1 { width:100%; float:left; min-height:543px; background:url(../images/bg_left.gif) no-repeat 100% 50%; } 
    63 #content #col_1 h2 { color:#999999; font-size:14px; font-weight:normal; } 
    64 #subnav, #subnav ul { margin:0; padding:0; list-style:none; } 
    65 #subnav li { } 
    66 #subnav li a { display:block; padding:5px 10px 5px 10px; height:1%; background:url(../images/bg_subnav.gif) no-repeat 100% 100%; text-decoration:none } 
    67 #subnav li a:hover { background:#E9D1D1 url(../images/bg_left_nav_on.gif) no-repeat 100% 0; text-decoration:none; } 
    68 #content #col_2 { width:100%; float:left; } 
    69  
    70 footer { border-width:1px; border-top-style:solid; display:block; width:98%; padding: 5px 5px; margin:0 auto; background:#FFF; -moz-border-radius:6px; } 
    71 #footer small {  } 
    72  
    73 .t_form { margin:20px; } 
    74 .t_form th { background:#efefef; } 
    75 .t_form td, .t_form th { padding:5px; border-bottom:1px solid #666; } 
     38h1,h2,h3,ol,ul,dl { 
     39        padding: 8px 6px 3px; 
     40} 
     41 
     42table,th,td { 
     43        font-family: arial, verdana, sans-serif; 
     44        font-size: 12px; 
     45        color: #333; 
     46} 
     47 
     48ol,ul,dir,menu,dd { 
     49        margin-left: 40px 
     50} 
     51 
     52ol { 
     53        list-style-type: decimal 
     54} 
     55 
     56ol ul,ul ol,ul ul,ol ol { 
     57        margin-top: 0; 
     58        margin-bottom: 0 
     59} 
     60 
     61blockquote { 
     62        width: 80%; 
     63        margin: 10px auto; 
     64        padding: 0 26px; 
     65        background: #FFF url(../images/bg_blockquote_side.gif) no-repeat 0 50%; 
     66} 
     67 
     68#skip { 
     69        display: none; 
     70} 
     71 
     72a img,:link img,:visited img { 
     73        border: none; 
     74} 
     75 
     76img { 
     77        display: block; 
     78} 
     79 
     80a:link { 
     81        color: #C74848; 
     82        text-decoration: underline; 
     83} 
     84 
     85a:visited { 
     86        color: #333; 
     87        text-decoration: underline; 
     88} 
     89 
     90a:hover,a:active { 
     91        color: #DB7C7C; 
     92} 
     93 
     94.alignright { 
     95        text-align: right !important; 
     96} 
     97 
     98.floatright { 
     99        float: right; 
     100} 
     101 
     102.inline { 
     103        display: inline; 
     104} 
     105 
     106.clear { 
     107        clear: both; 
     108} 
     109 
     110.clearfix:after { 
     111        content: "."; 
     112        display: block; 
     113        height: 0; 
     114        clear: both; 
     115        visibility: hidden; 
     116} 
     117 
     118.clearfix { 
     119        display: inline-block; 
     120} 
     121/*\*/ 
     122.clearfix { 
     123        display: block; 
     124} /**/ 
     125h1 { 
     126        font-size: 20px; 
     127        line-height: 18px; 
     128} 
     129 
     130h2 { 
     131        font-size: 18px; 
     132} 
     133 
     134h3 { 
     135        font-size: 16px; 
     136        color: #666; 
     137} 
     138 
     139#wrapper { 
     140        width: 100%; 
     141        margin: 0 auto; 
     142} 
     143 
     144header { 
     145        position: relative; 
     146        display: block; 
     147        width: 100%; 
     148        height: 50px; 
     149        background: #FFF 
     150} 
     151 
     152#header .logo { 
     153        position: absolute; 
     154        left: 10px; 
     155        top: 5px; 
     156} 
     157 
     158#nav { 
     159        display: block; 
     160        width: 100%; 
     161        height: 26px; 
     162        margin: 0; 
     163        padding: 0; 
     164        list-style: none; 
     165        text-align: center; 
     166        background: #A13D3D url(../images/bg_nav.gif) repeat-x; 
     167} 
     168 
     169#nav li { 
     170        float: left; 
     171        width: 120px; 
     172} 
     173 
     174#nav li a { 
     175        text-decoration: none; 
     176        display: block; 
     177        padding: 0; 
     178        padding: 0; 
     179        height: 1%; 
     180        line-height: 26px; 
     181        color: #000000; 
     182} 
     183 
     184#nav li.on { 
     185        display: block; 
     186        padding: 0; 
     187        width: 120px; 
     188        height: 26px; 
     189        line-height: 26px; 
     190        background: url(../images/bg_nav_on_3.gif) no-repeat 50% 0; 
     191        color: #EFEFEF; 
     192} 
     193 
     194#nav li a:hover { 
     195        color: #0099CC; 
     196        background: url(../images/bg_nav_on_3.gif) no-repeat 50% 0; 
     197} 
     198 
     199#content { 
     200        width: 100%; 
     201        padding: 1px 0px 0; 
     202        min-height: 543px; 
     203        text-align: left; 
     204} 
     205 
     206* html #content,* html #content #col_1 { 
     207        height: 543px; 
     208} 
     209 
     210#content #col_1 { 
     211        width: 100%; 
     212        float: left; 
     213        min-height: 543px; 
     214        background: url(../images/bg_left.gif) no-repeat 100% 50%; 
     215} 
     216 
     217#content #col_1 h2 { 
     218        color: #999999; 
     219        font-size: 14px; 
     220        font-weight: normal; 
     221} 
     222 
     223#subnav,#subnav ul { 
     224        margin: 0; 
     225        padding: 0; 
     226        list-style: none; 
     227} 
     228 
     229#subnav li { 
     230         
     231} 
     232 
     233#subnav li a { 
     234        display: block; 
     235        padding: 5px 10px 5px 10px; 
     236        height: 1%; 
     237        background: url(../images/bg_subnav.gif) no-repeat 100% 100%; 
     238        text-decoration: none 
     239} 
     240 
     241#subnav li a:hover { 
     242        background: #E9D1D1 url(../images/bg_left_nav_on.gif) no-repeat 100% 0; 
     243        text-decoration: none; 
     244} 
     245 
     246#content #col_2 { 
     247        width: 100%; 
     248        float: left; 
     249} 
     250 
     251footer { 
     252        border-width: 1px; 
     253        border-top-style: solid; 
     254        display: block; 
     255        width: 98%; 
     256        padding: 5px 5px; 
     257        margin: 0 auto; 
     258        background: #FFF; 
     259        -moz-border-radius: 6px; 
     260} 
     261 
     262#footer small { 
     263         
     264} 
     265 
     266.simpleTable { 
     267        border: 1px solid; 
     268        background-color: transparent; 
     269} 
     270 
     271.lowerBorderTable { 
     272        border-style: solid; 
     273        border-bottom: 10px solid rgb(192, 192, 192); 
     274        border-top:solid 0px #C0C0C0; 
     275        border-left:solid 0px #C0C0C0; 
     276        border-right:solid 0px #C0C0C0; 
     277} 
     278 
     279.stepbystep { 
     280        border: 1px solid; 
     281        align: center; 
     282        margin: 10px 0px; 
     283        -moz-border-radius: 2px; 
     284        border-radius: 2px; 
     285        padding: 2px 3px 8px 8px; 
     286        -moz-box-shadow: 10px 10px 5px #888; 
     287        -webkit-box-shadow: 10px 10px 5px #888; 
     288        box-shadow: 10px 10px 5px #888; 
     289        background-repeat: no-repeat; 
     290        font-weight: bold; 
     291        display: inline-block; 
     292        /* IE10 Consumer Preview */ 
     293        background-image: -ms-radial-gradient(center top, ellipse farthest-corner, #FCFFFF 0%, 
     294                #C1C9D9 100%); 
     295        /* Mozilla Firefox */ 
     296        background-image: -moz-radial-gradient(center top, ellipse farthest-corner, #FCFFFF 0%, 
     297                #C1C9D9 100%); 
     298        /* Opera */ 
     299        background-image: -o-radial-gradient(center top, ellipse farthest-corner, #FCFFFF 0%, 
     300                #C1C9D9 100%); 
     301        /* Webkit (Safari/Chrome 10) */ 
     302        background-image: -webkit-gradient(radial, center top, 0, center top, 553, color-stop(0, 
     303                #FCFFFF), color-stop(1, #C1C9D9)); 
     304        /* Webkit (Chrome 11+) */ 
     305        background-image: -webkit-radial-gradient(center top, ellipse farthest-corner, #FCFFFF 0%, 
     306                #C1C9D9 100%); 
     307        /* W3C Markup, IE10 Release Preview */ 
     308        background-image: radial-gradient(ellipse farthest-corner at center top, #FCFFFF 0%, 
     309                #C1C9D9 100%); 
     310} 
     311 
     312.t_form { 
     313        margin: 20px; 
     314} 
     315 
     316.t_form th { 
     317        background: #efefef; 
     318} 
     319 
     320.t_form td,.t_form th { 
     321        padding: 5px; 
     322        border-bottom: 1px solid #666; 
     323} 
  • raptor-web/trunk/src/main/webapp/templates/raptor/full.xhtml

    r1483 r1491  
    5151                <li><a4j:commandLink value="Home" action="homeTrans"/></li> 
    5252                <li><a4j:commandLink value="Graphs" action="graphTrans"/></li> 
    53                 <li><a4j:commandLink value="Wizard" action="setupTrans"/></li> 
     53                <li><a4j:commandLink value="Wizard" action="wizardTrans"/></li> 
    5454                <li><a4j:commandLink value="Setup" action="setupTrans"/></li> 
    5555                <li><a4j:commandLink value="About" action="aboutTrans"/></li> 
    5656                <li><a href="http://iam.cf.ac.uk/trac/RAPTOR/wiki">User Guide</a></li> 
    5757                <li><a href="#{contextPath}/j_spring_security_logout">Logout</a></li>            
    58                 <li><a style="color:#6E6E6E; font-size:90%" href="https://iam.cf.ac.uk/trac/RAPTOR/wiki/Software/Versions">Raptor-web v1.1.0</a></li> 
     58                <li><a style="color:#6E6E6E; font-size:90%" href="https://iam.cf.ac.uk/trac/RAPTOR/wiki/Software/Versions">Raptor-web v1.1.1</a></li> 
    5959        </ul> 
    6060        </a4j:form> 
Note: See TracChangeset for help on using the changeset viewer.