00001
00002
00003 #ifndef PRIVILEGE_H
00004 #define PRIVILEGE_H
00005
00006 #include <string>
00007
00008 namespace Yosokumo
00009 {
00010
00011
00012
00013
00014
00015
00016
00017 class Privilege
00018 {
00019 public:
00020
00021 enum { NUMBER_OF_PRIVILEGES = 13 };
00022
00023
00024
00025
00026
00027 enum Type
00028 {
00029 GET_STUDY = 1,
00030 DELETE_STUDY = 2,
00031 GET_ROSTER = 3,
00032 POST_ROSTER = 4,
00033 GET_ROLE = 5,
00034 PUT_ROLE = 6,
00035 DELETE_ROLE = 7,
00036 GET_PANEL = 8,
00037 GET_CONTROL = 9,
00038 PUT_CONTROL = 10,
00039 POST_TABLE = 11,
00040 GET_MODEL = 12,
00041 POST_MODEL = 13,
00042
00043 GET_CATALOG = 14,
00044 POST_CATALOG = 15
00045 };
00046
00047 private:
00048
00049 int value;
00050
00051 public:
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062 Privilege(int value);
00063
00064
00065
00066
00067
00068
00069 int getNumber() const;
00070
00071
00072
00073
00074
00075
00076 std::string getName() const;
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087 static Type valueOf(int value) ;
00088
00089 };
00090
00091 }
00092
00093 #endif // PRIVILEGE_H
00094
00095