Ejemplo n.º 1
0
 def validatesite(self, sitename):
     if lexicon.anstr(sitename) & (sitename == 'summary'):
         return True
     if lexicon.tier(sitename):
         sitelist = popCommonDB.getSitesList(DBUSER)
         if sitename in sitelist:
             return True
     raise Paramvalidationexception('sitename', 'param must be a valid site name')
Ejemplo n.º 2
0
 def validatesite(self, sitename):
     if lexicon.anstr(sitename) & (sitename == 'summary'):
         return True
     if lexicon.tier(sitename):
         sitelist = popCommonDB.getSitesList(DBUSER)
         if sitename in sitelist:
             return True
     raise Paramvalidationexception('sitename',
                                    'param must be a valid site name')
Ejemplo n.º 3
0
 def validateorder(self, order):
     if lexicon.anstr(order) & (order in self.ordervalues):
         return True
     raise Paramvalidationexception('order', 'param must be a value in %s' % self.ordervalues)
Ejemplo n.º 4
0
 def validateaggregation(self, aggr):
     if lexicon.anstr(aggr) & (aggr in self.aggregationvalues):
         return True
     raise Paramvalidationexception('aggr', 'param must be value in %s' % self.aggregationvalues)
Ejemplo n.º 5
0
 def validateorder(self, order):
     if lexicon.anstr(order) & (order in self.ordervalues):
         return True
     raise Paramvalidationexception(
         'order', 'param must be a value in %s' % self.ordervalues)
Ejemplo n.º 6
0
 def validateaggregation(self, aggr):
     if lexicon.anstr(aggr) & (aggr in self.aggregationvalues):
         return True
     raise Paramvalidationexception(
         'aggr', 'param must be value in %s' % self.aggregationvalues)