Exemplo n.º 1
0
 private Collection<String> validateActions(
     ResourceList actions, Map<String, String> dimensionMap, String name)
     throws CloudWatchException {
   Collection<String> actionsCollection = null;
   if (actions != null) {
     actionsCollection = actions.getMember();
     ;
   }
   if (actionsCollection == null) {
     return actionsCollection;
   }
   if (actionsCollection.size() > 5) {
     throw new InvalidParameterValueException(
         "The collection " + name + " must not have a size greater than 5.");
   }
   int ctr = 1;
   for (String action : actionsCollection) {
     validateAction(action, dimensionMap, name + ".member." + ctr);
     ctr++;
   }
   return actionsCollection;
 }