Add PolicyBucketId validation 31/28431/10
authorPawel Wieczorek <p.wieczorek2@samsung.com>
Mon, 6 Oct 2014 17:08:25 +0000 (19:08 +0200)
committerPawel Wieczorek <p.wieczorek2@samsung.com>
Fri, 24 Oct 2014 13:29:20 +0000 (15:29 +0200)
commit5907debce03abecb8fa799e807dfa123fec116a2
treef0fd3dd735392ca098bcf2fd9301322989e5eee7
parent94c676f6a67966566072093dadf217ddd20849a1
Add PolicyBucketId validation

This patch introduces mechanism for checking whether new PolicyBucketId
contains forbidden characters. Now only alphanumeric characters, hyphen
and underscore can be used in PolicyBucketId. InvalidBucketIdException
is thrown and OPERATION_NOT_ALLOWED error code is returned otherwise.

Change-Id: I48b6e14d20cb62adc17560929055553df0ce1077
src/common/exceptions/InvalidBucketIdException.h [new file with mode: 0644]
src/common/types/PolicyBucket.cpp
src/common/types/PolicyBucket.h
src/service/logic/Logic.cpp
test/common/types/policybucket.cpp