public static function CreateInstance2($restrictionType)
 {
     if ($restrictionType->IsRole()) {
         $restriction = ServiceRoleRestriction::getInstance();
         return $restriction;
     } else {
         if ($restrictionType->IsHost()) {
             $restriction = ServiceHostRestriction::getInstance();
             return $restriction;
         } else {
             if ($restrictionType->IsIPRange()) {
                 $restriction = ServiceIPRangeRestriction::getInstance();
                 return $restriction;
             } else {
                 if ($restrictionType->IsIP()) {
                     $restriction = ServiceIPRestriction::getInstance();
                     return $restriction;
                 }
             }
         }
     }
 }