Changeset 743


Ignore:
Timestamp:
05/04/11 22:58:40 (8 years ago)
Author:
philsmart
Message:
 
Location:
raptor-information-model/trunk/src/main/java/uk/ac/cardiff/model/wsmodel
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • raptor-information-model/trunk/src/main/java/uk/ac/cardiff/model/wsmodel/Capabilities.java

    r614 r743  
    1414/** 
    1515 * @author philsmart 
    16  * 
     16 *  
    1717 */ 
    18 public class Capabilities implements Serializable{ 
     18public class Capabilities implements Serializable { 
    1919 
    20         /* Generated Serial UID */ 
    21         private static final long serialVersionUID = -4008642148652388534L; 
     20    /* Generated Serial UID */ 
     21    private static final long serialVersionUID = -4008642148652388534L; 
    2222 
     23    private List<String> attached; 
     24    private List<StatisticalUnitInformation> statisticalServices; 
     25    private String errorMessage; 
     26    private boolean error; 
     27    private ServerMetadata metadata; 
     28    private SuggestionValues suggestionValues; 
    2329 
    24         private List<String> attached; 
    25         private List<StatisticalUnitInformation> statisticalServices; 
    26         private String errorMessage; 
    27         private boolean error; 
    28         private ServerMetadata metadata; 
    29         private SuggestionValues suggestionValues; 
     30    private int numberOfEntries; 
    3031 
     32    public void setStatisticalServices(List<StatisticalUnitInformation> statisticalServices) { 
     33        this.statisticalServices = statisticalServices; 
     34    } 
    3135 
     36    /** 
     37     * Returns all configured statistical units 
     38     *  
     39     * @return 
     40     */ 
     41    public List<StatisticalUnitInformation> getStatisticalServices() { 
     42        return statisticalServices; 
     43    } 
    3244 
    33         public void setStatisticalServices(List<StatisticalUnitInformation> statisticalServices) { 
    34                 this.statisticalServices = statisticalServices; 
    35         } 
    36         /** 
    37          * Returns all configured statistical units 
    38          * @return 
    39          */ 
    40         public List<StatisticalUnitInformation> getStatisticalServices() { 
    41                 return statisticalServices; 
    42         } 
     45    public void setAttached(List<String> attached) { 
     46        this.attached = attached; 
     47    } 
    4348 
    44         public void setAttached(List<String> attached) { 
    45                 this.attached = attached; 
    46         } 
    47         public List<String> getAttached() { 
    48                 return attached; 
    49         } 
    50         /** 
    51          * @param errorMessage the errorMessage to set 
    52          */ 
    53         public void setErrorMessage(String errorMessage) { 
    54                 this.errorMessage = errorMessage; 
    55         } 
    56         /** 
    57          * @return the errorMessage 
    58          */ 
    59         public String getErrorMessage() { 
    60                 return errorMessage; 
    61         } 
    62         /** 
    63          * @param error the error to set 
    64          */ 
    65         public void setError(boolean error) { 
    66                 this.error = error; 
    67         } 
    68         /** 
    69          * @return the error 
    70          */ 
    71         public boolean isError() { 
    72                 return error; 
    73         } 
    74         public void setSuggestionValues(SuggestionValues suggestionValues) { 
    75             this.suggestionValues = suggestionValues; 
    76         } 
    77         public SuggestionValues getSuggestionValues() { 
    78             return suggestionValues; 
    79         } 
    80         public void setMetadata(ServerMetadata metadata) { 
    81             this.metadata = metadata; 
    82         } 
    83         public ServerMetadata getMetadata() { 
    84             return metadata; 
    85         } 
     49    public List<String> getAttached() { 
     50        return attached; 
     51    } 
    8652 
     53    /** 
     54     * @param errorMessage 
     55     *            the errorMessage to set 
     56     */ 
     57    public void setErrorMessage(String errorMessage) { 
     58        this.errorMessage = errorMessage; 
     59    } 
     60 
     61    /** 
     62     * @return the errorMessage 
     63     */ 
     64    public String getErrorMessage() { 
     65        return errorMessage; 
     66    } 
     67 
     68    /** 
     69     * @param error 
     70     *            the error to set 
     71     */ 
     72    public void setError(boolean error) { 
     73        this.error = error; 
     74    } 
     75 
     76    /** 
     77     * @return the error 
     78     */ 
     79    public boolean isError() { 
     80        return error; 
     81    } 
     82 
     83    public void setSuggestionValues(SuggestionValues suggestionValues) { 
     84        this.suggestionValues = suggestionValues; 
     85    } 
     86 
     87    public SuggestionValues getSuggestionValues() { 
     88        return suggestionValues; 
     89    } 
     90 
     91    public void setMetadata(ServerMetadata metadata) { 
     92        this.metadata = metadata; 
     93    } 
     94 
     95    public ServerMetadata getMetadata() { 
     96        return metadata; 
     97    } 
     98 
     99    public void setNumberOfAuthenticationsStored(int numberOfEntries) { 
     100        this.numberOfEntries = numberOfEntries; 
     101         
     102    } 
     103     
     104    public int getNumberOfAuthenticationsStored(){ 
     105        return numberOfEntries; 
     106    } 
     107     
     108  
     109        
    87110 
    88111} 
  • raptor-information-model/trunk/src/main/java/uk/ac/cardiff/model/wsmodel/StatisticParameters.aegis.xml

    r614 r743  
    1616                <property name="startTimeMinute" ignore="true"/> 
    1717                <property name="startTimeSecond" ignore="true"/> 
     18        <property name="eventTypeString" ignore="true"/> 
    1819        </mapping> 
    1920</mappings> 
  • raptor-information-model/trunk/src/main/java/uk/ac/cardiff/model/wsmodel/StatisticParameters.java

    r739 r743  
    7777    public enum EventType{ 
    7878        /** A Shibboleth Authentication Event Type*/ 
    79         SHIBBOLETH_AUTHENTICATION("ShibbolethIdpAuthenticationEvent"), 
     79        SHIBBOLETH_AUTHENTICATION("ShibbolethIdpAuthenticationEvent", new String[]{"uk.ac.cardiff.model.event.ShibbolethIdpAuthenticationEvent","uk.ac.cardiff.model.event.AuthenticationEvent","uk.ac.cardiff.model.event.Event"}), 
    8080        /** An Ezproxy Authentication Event Type */ 
    81         EZPROXY_AUTHENTICATION("EzproxyAuthenticationEvent"); 
     81        EZPROXY_AUTHENTICATION("EzproxyAuthenticationEvent", new String[]{"uk.ac.cardiff.model.event.EzproxyAuthenticationEvent","uk.ac.cardiff.model.event.AuthenticationEvent","uk.ac.cardiff.model.event.Event"}); 
    8282 
    8383        private String hibernateSimpleClassName; 
    84  
    85         private EventType(String hibernateSimpleClassName){ 
     84         
     85        private String[] classHierarchy; 
     86 
     87        private EventType(String hibernateSimpleClassName, String[] classHierarchy){ 
    8688            this.hibernateSimpleClassName = hibernateSimpleClassName; 
     89            this.classHierarchy = classHierarchy; 
    8790        } 
    8891 
    8992        public String getHibernateSimpleClassName(){ 
    9093            return hibernateSimpleClassName; 
     94        } 
     95         
     96        public String[] getClassHierarchy(){ 
     97            return classHierarchy; 
    9198        } 
    9299    } 
  • raptor-information-model/trunk/src/main/java/uk/ac/cardiff/model/wsmodel/StatisticalUnitInformation.java

    r614 r743  
    2222public class StatisticalUnitInformation implements Serializable { 
    2323 
    24     /* generated serial UID for this class */ 
     24    /** generated serial UID for this class */ 
    2525    private static final long serialVersionUID = 4580271084108294958L; 
    2626 
     27    /** Class representing all parameters for this statistical unit */ 
    2728    private StatisticParameters statisticParameters; 
    2829 
    29     /* both these are simple string values (representing names) for the time being*/ 
     30    /** Simple string values (representing names) of the configured pre-processors*/ 
    3031    private List<String> preprocessors; 
     32     
     33    /** Simple string values (representing names) of the configured post-processors*/ 
    3134    private List<String> postprocessors; 
    3235 
  • raptor-information-model/trunk/src/main/java/uk/ac/cardiff/model/wsmodel/SuggestionValues.java

    r739 r743  
    22 
    33import java.io.Serializable; 
     4import java.util.ArrayList; 
     5import java.util.HashMap; 
    46import java.util.List; 
     7import java.util.Map; 
    58 
    69import org.slf4j.Logger; 
    710import org.slf4j.LoggerFactory; 
    811 
    9  
    10 public class SuggestionValues implements Serializable{ 
     12public class SuggestionValues implements Serializable { 
    1113 
    1214    /** 
     
    1517    private static final long serialVersionUID = 7312337340123235532L; 
    1618 
     19    /** Class logger */ 
    1720    private final Logger log = LoggerFactory.getLogger(SuggestionValues.class); 
    1821 
    19     private List<String> possibleFieldNameValues; 
     22    private List<Suggestion> possibleFieldNameValues; 
    2023 
    21  
    22     public void setPossibleFieldNameValues(List<String> possibleFieldNameValues) { 
    23         this.possibleFieldNameValues = possibleFieldNameValues; 
     24    public void setPossibleFieldNameValues(List<Suggestion> possibleFieldNameValues) { 
     25        this.possibleFieldNameValues = possibleFieldNameValues; 
    2426    } 
    2527 
    26     public List<String> getPossibleFieldNameValues() { 
    27         log.debug("There are {} possible fieldname values",possibleFieldNameValues.size()); 
    28         return possibleFieldNameValues; 
     28    public List<Suggestion> getPossibleFieldNameValues() { 
     29        return possibleFieldNameValues; 
     30    } 
     31 
     32    public List<String> getPossibleFieldNameValuesList() { 
     33        ArrayList<String> fields = new ArrayList<String>(); 
     34        if (possibleFieldNameValues == null) 
     35            return fields; 
     36        for (Suggestion entry : possibleFieldNameValues) { 
     37            fields.add(entry.getValue()); 
     38        } 
     39        return fields; 
     40    } 
     41 
     42    public List<String> getPossibleFieldNameValuesList(String[] classFilters) { 
     43        ArrayList<String> fields = new ArrayList<String>(); 
     44        if (possibleFieldNameValues == null) 
     45            return fields; 
     46        for (Suggestion entry : possibleFieldNameValues) { 
     47            for (String filter : classFilters) {                 
     48                if (filter.equals(entry.getBase())) { 
     49                    fields.add(entry.getValue()); 
     50                } 
     51            } 
     52        } 
     53        return fields; 
    2954    } 
    3055 
Note: See TracChangeset for help on using the changeset viewer.