diff options
author | Charles E. Rolke <chug@apache.org> | 2012-03-01 15:25:33 +0000 |
---|---|---|
committer | Charles E. Rolke <chug@apache.org> | 2012-03-01 15:25:33 +0000 |
commit | a2cfd7de28cc3deae1481c7018c162fed2c3eef6 (patch) | |
tree | 7c2d45ef4244546fbb27dd9bda32d29b6774c5ef /cpp/src/qpid/acl/AclValidator.cpp | |
parent | 5e47b4c0bd930bd3d672290a04f7b38fb98283be (diff) | |
download | qpid-python-a2cfd7de28cc3deae1481c7018c162fed2c3eef6.tar.gz |
QPID-3799-acl acl fixup - whitespaceQPID-3799-acl
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/QPID-3799-acl@1295616 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/acl/AclValidator.cpp')
-rw-r--r-- | cpp/src/qpid/acl/AclValidator.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/cpp/src/qpid/acl/AclValidator.cpp b/cpp/src/qpid/acl/AclValidator.cpp index d9ce3734ea..49bb65db4b 100644 --- a/cpp/src/qpid/acl/AclValidator.cpp +++ b/cpp/src/qpid/acl/AclValidator.cpp @@ -29,7 +29,7 @@ namespace qpid { namespace acl { - AclValidator::IntPropertyType::IntPropertyType(int64_t i,int64_t j) : min(i), max(j){ + AclValidator::IntPropertyType::IntPropertyType(int64_t i,int64_t j) : min(i), max(j){ } bool AclValidator::IntPropertyType::validate(const std::string& val) { @@ -49,12 +49,12 @@ namespace acl { } std::string AclValidator::IntPropertyType::allowedValues() { - return "values should be between " + + return "values should be between " + boost::lexical_cast<std::string>(min) + " and " + boost::lexical_cast<std::string>(max); } - AclValidator::EnumPropertyType::EnumPropertyType(std::vector<std::string>& allowed): values(allowed){ + AclValidator::EnumPropertyType::EnumPropertyType(std::vector<std::string>& allowed): values(allowed){ } bool AclValidator::EnumPropertyType::validate(const std::string& val) { @@ -89,11 +89,11 @@ namespace acl { validators.insert(Validator(acl::SPECPROP_MAXQUEUECOUNTLOWERLIMIT, boost::shared_ptr<PropertyType>( new IntPropertyType(0,std::numeric_limits<int64_t>::max())))); - + validators.insert(Validator(acl::SPECPROP_MAXQUEUECOUNTUPPERLIMIT, boost::shared_ptr<PropertyType>( new IntPropertyType(0,std::numeric_limits<int64_t>::max())))); - + std::string policyTypes[] = {"ring", "ring_strict", "flow_to_disk", "reject"}; std::vector<std::string> v(policyTypes, policyTypes + sizeof(policyTypes) / sizeof(std::string)); validators.insert(Validator(acl::SPECPROP_POLICYTYPE, @@ -118,8 +118,8 @@ namespace acl { std::for_each(d->actionList[cnt][cnt1]->begin(), d->actionList[cnt][cnt1]->end(), - boost::bind(&AclValidator::validateRuleSet, this, _1)); - }//if + boost::bind(&AclValidator::validateRuleSet, this, _1)); + }//if }//for }//if }//for @@ -128,13 +128,13 @@ namespace acl { void AclValidator::validateRuleSet(std::pair<const std::string, qpid::acl::AclData::ruleSet>& rules){ std::for_each(rules.second.begin(), rules.second.end(), - boost::bind(&AclValidator::validateRule, this, _1)); + boost::bind(&AclValidator::validateRule, this, _1)); } void AclValidator::validateRule(qpid::acl::AclData::rule& rule){ std::for_each(rule.props.begin(), rule.props.end(), - boost::bind(&AclValidator::validateProperty, this, _1)); + boost::bind(&AclValidator::validateProperty, this, _1)); } void AclValidator::validateProperty(std::pair<const qpid::acl::SpecProperty, std::string>& prop){ @@ -146,11 +146,11 @@ namespace acl { if (!itr->second->validate(prop.second)){ QPID_LOG(debug, "ACL: Property failed validation. '" << prop.second << "' is not a valid value for '" << AclHelper::getPropertyStr(prop.first) << "'"); - - throw Exception( prop.second + " is not a valid value for '" + + + throw Exception( prop.second + " is not a valid value for '" + AclHelper::getPropertyStr(prop.first) + "', " + itr->second->allowedValues()); - } + } } } |