Complex classes like Messages often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use Messages, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 12 | class Messages |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * Format message for unterminated string literal error |
||
| 16 | * |
||
| 17 | * @param int $pos Position of unterminated string literal in the text |
||
| 18 | * @param string $text The text with unterminated string literal |
||
| 19 | * |
||
| 20 | * @return string The formatted message |
||
| 21 | */ |
||
| 22 | public static function expressionLexerUnterminatedStringLiteral($pos, $text) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Format message for digit expected error |
||
| 29 | * |
||
| 30 | * @param int $pos Position at which digit is expected |
||
| 31 | * |
||
| 32 | * @return string The formatted message |
||
| 33 | */ |
||
| 34 | public static function expressionLexerDigitExpected($pos) |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Format message for syntax error |
||
| 41 | * |
||
| 42 | * @param int $pos Position at which syntax error found |
||
| 43 | * |
||
| 44 | * @return string The formatted message |
||
| 45 | */ |
||
| 46 | public static function expressionLexerSyntaxError($pos) |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Format message for invalid character error |
||
| 53 | * |
||
| 54 | * @param string $ch The invalid character found |
||
| 55 | * @param int $pos Position at which invalid character found |
||
| 56 | * |
||
| 57 | * @return string The formatted message |
||
| 58 | */ |
||
| 59 | public static function expressionLexerInvalidCharacter($ch, $pos) |
||
| 63 | |||
| 64 | /** |
||
| 65 | * Format message for an operator's incompatible operands types |
||
| 66 | * |
||
| 67 | * @param string $operator The operator |
||
| 68 | * @param string $str The operand list separated by comma |
||
| 69 | * @param string $pos Position at which operator with incompatible operands found |
||
| 70 | * |
||
| 71 | * |
||
| 72 | * @return string The formatted message |
||
| 73 | */ |
||
| 74 | public static function expressionParserInCompatibleTypes($operator, $str, $pos) |
||
| 78 | |||
| 79 | /** |
||
| 80 | * Format message for an unsupported null operation |
||
| 81 | * |
||
| 82 | * @param string $operator The operator |
||
| 83 | * @param int $pos Position at which operator with null operands found |
||
| 84 | * |
||
| 85 | * @return string The formatted message |
||
| 86 | */ |
||
| 87 | public static function expressionParserOperatorNotSupportNull($operator, $pos) |
||
| 91 | |||
| 92 | /** |
||
| 93 | * Format message for an unsupported guid operation |
||
| 94 | * |
||
| 95 | * @param string $operator The operator |
||
| 96 | * @param int $pos Position at which operator with guid operands found |
||
| 97 | * |
||
| 98 | * @return string The formatted message |
||
| 99 | */ |
||
| 100 | public static function expressionParserOperatorNotSupportGuid($operator, $pos) |
||
| 104 | |||
| 105 | /** |
||
| 106 | * Format message for an unsupported binary operation |
||
| 107 | * |
||
| 108 | * @param string $operator The operator |
||
| 109 | * @param int $pos Position at which operator with binary operands found |
||
| 110 | * |
||
| 111 | * @return string The formatted message |
||
| 112 | */ |
||
| 113 | public static function expressionParserOperatorNotSupportBinary($operator, $pos) |
||
| 117 | |||
| 118 | /** |
||
| 119 | * Format message for an unrecognized literal |
||
| 120 | * |
||
| 121 | * @param string $type The expected literal type |
||
| 122 | * @param string $literal The malformed literal |
||
| 123 | * @param int $pos Position at which literal found |
||
| 124 | * |
||
| 125 | * @return string The formatted message |
||
| 126 | */ |
||
| 127 | public static function expressionParserUnrecognizedLiteral($type, $literal, $pos) |
||
| 131 | |||
| 132 | /** |
||
| 133 | * Format message for an unknown function-call |
||
| 134 | * |
||
| 135 | * @param string $str The unknown function name |
||
| 136 | * @param int $pos Position at which unknown function-call found |
||
| 137 | * |
||
| 138 | * @return string The formatted message |
||
| 139 | */ |
||
| 140 | public static function expressionParserUnknownFunction($str, $pos) |
||
| 144 | |||
| 145 | /** |
||
| 146 | * Format message for non-boolean filter expression |
||
| 147 | * |
||
| 148 | * @return string The formatted message |
||
| 149 | */ |
||
| 150 | public static function expressionParser2BooleanRequired() |
||
| 154 | |||
| 155 | /** |
||
| 156 | * Format message for unexpected expression |
||
| 157 | * |
||
| 158 | * @param string $expressionClassName Name of the unexpected expression |
||
| 159 | * |
||
| 160 | * @return string The formatted message |
||
| 161 | */ |
||
| 162 | public static function expressionParser2UnexpectedExpression($expressionClassName) |
||
| 166 | |||
| 167 | /** |
||
| 168 | * Format a message to show error when expression contains sub-property access of non-primitive property. |
||
| 169 | * |
||
| 170 | * @return string The message |
||
| 171 | */ |
||
| 172 | public static function expressionParser2NonPrimitivePropertyNotAllowed() |
||
| 176 | |||
| 177 | /** |
||
| 178 | * Format message for not applicable function error |
||
| 179 | * |
||
| 180 | * @param string $functionName The name of the function called |
||
| 181 | * @param string $protoTypes Prototype of the functions considered |
||
| 182 | * @param int $position Position at which function-call found |
||
| 183 | * |
||
| 184 | * @return string The formatted message |
||
| 185 | */ |
||
| 186 | public static function expressionLexerNoApplicableFunctionsFound($functionName, |
||
| 192 | |||
| 193 | /** |
||
| 194 | * Format message for property not found error |
||
| 195 | * |
||
| 196 | * @param string $property The name of the property |
||
| 197 | * @param string $type The parent type in which property searched for |
||
| 198 | * @param int $position Position at which property mentioned |
||
| 199 | * |
||
| 200 | * @return string The formatted message |
||
| 201 | */ |
||
| 202 | public static function expressionLexerNoPropertyInType($property, $type, $position) |
||
| 206 | |||
| 207 | |||
| 208 | /** |
||
| 209 | * Format a message to show error when target resource property |
||
| 210 | * argument is not null or instance of ResourceProperty |
||
| 211 | * |
||
| 212 | * @param string $argumentName The name of the target resource property argument |
||
| 213 | * |
||
| 214 | * @return string The formatted message |
||
| 215 | */ |
||
| 216 | public static function resourceAssociationSetPropertyMustBeNullOrInstanceofResourceProperty($argumentName) |
||
| 220 | |||
| 221 | /** |
||
| 222 | * Format a message when a property is used as |
||
| 223 | * navigation property of a resource type which is actually not |
||
| 224 | * |
||
| 225 | * @param string $propertyName Property |
||
| 226 | * @param string $resourceTypeName Resource type |
||
| 227 | * |
||
| 228 | * @return string The formatted message |
||
| 229 | */ |
||
| 230 | public static function resourceAssociationSetEndPropertyMustBeNavigationProperty($propertyName, $resourceTypeName) |
||
| 234 | |||
| 235 | /** |
||
| 236 | * Format a message for showing the error when a resource type is |
||
| 237 | * not assignable to resource set |
||
| 238 | * |
||
| 239 | * @param string $resourceTypeName Resource type |
||
| 240 | * @param string $resourceSetName Resource set name |
||
| 241 | * |
||
| 242 | * @return string The formatted message |
||
| 243 | */ |
||
| 244 | public static function resourceAssociationSetEndResourceTypeMustBeAssignableToResourceSet($resourceTypeName, $resourceSetName) |
||
| 248 | |||
| 249 | /** |
||
| 250 | * Format a message for showing the error when trying to |
||
| 251 | * create an association set with both null resource property |
||
| 252 | * |
||
| 253 | * @return string The formatted message |
||
| 254 | */ |
||
| 255 | public static function resourceAssociationSetResourcePropertyCannotBeBothNull() |
||
| 259 | |||
| 260 | /** |
||
| 261 | * Format a message for showing the error when trying to |
||
| 262 | * create a self referencing bidirectional association |
||
| 263 | * |
||
| 264 | * @return string The formatted message |
||
| 265 | */ |
||
| 266 | public static function resourceAssociationSetSelfReferencingAssociationCannotBeBiDirectional() |
||
| 270 | |||
| 271 | /** |
||
| 272 | * Format a message to show error when target resource property argument is |
||
| 273 | * not null or instance of ResourceProperty |
||
| 274 | * |
||
| 275 | * @param string $argumentName The name of the target resource property argument |
||
| 276 | * |
||
| 277 | * @return string The formatted message |
||
| 278 | */ |
||
| 279 | public static function resourceAssociationTypeEndPropertyMustBeNullOrInstanceofResourceProperty($argumentName) |
||
| 283 | |||
| 284 | /** |
||
| 285 | * Error message to show when both from and to property arguments are null |
||
| 286 | * |
||
| 287 | * @return string The error message |
||
| 288 | */ |
||
| 289 | public static function resourceAssociationTypeEndBothPropertyCannotBeNull() |
||
| 293 | |||
| 294 | /** |
||
| 295 | * Format a message to show error when resourceset reference is |
||
| 296 | * used in $filter query option |
||
| 297 | * |
||
| 298 | * @param string $property The resourceset property used in query |
||
| 299 | * @param string $parentProperty The parent resource of property |
||
| 300 | * @param int $pos Postion at which resource set has been used |
||
| 301 | * |
||
| 302 | * @return string The formatted message |
||
| 303 | */ |
||
| 304 | public static function expressionParserEntityCollectionNotAllowedInFilter($property, $parentProperty, $pos) |
||
| 308 | |||
| 309 | /** |
||
| 310 | * Format a message to show error when a non-integer value passed to |
||
| 311 | * a function, which expects integer parameter |
||
| 312 | * |
||
| 313 | * @param mixed $argument The non-integer argument |
||
| 314 | * @param string $functionName The name of function |
||
| 315 | * |
||
| 316 | * @return string The formatted message |
||
| 317 | */ |
||
| 318 | public static function commonArgumentShouldBeInteger($argument, $functionName) |
||
| 322 | |||
| 323 | /** |
||
| 324 | * Format a message to show error when a negative value passed to a |
||
| 325 | * function, which expects non-negative parameter |
||
| 326 | * |
||
| 327 | * @param mixed $argument The negative argument |
||
| 328 | * @param string $functionName The name of function |
||
| 329 | * |
||
| 330 | * @return string The formatted message |
||
| 331 | */ |
||
| 332 | public static function commonArgumentShouldBeNonNegative($argument, $functionName) |
||
| 336 | |||
| 337 | /** |
||
| 338 | * Format a message to show error when a function expect a |
||
| 339 | * valid EdmPrimitiveType enum value, but it is not |
||
| 340 | * |
||
| 341 | * @param string $argumentName The argument name |
||
| 342 | * @param string $functionName The function name |
||
| 343 | * |
||
| 344 | * @return string The formatted message |
||
| 345 | */ |
||
| 346 | public static function commonNotValidPrimitiveEDMType($argumentName, $functionName) |
||
| 350 | /** |
||
| 351 | * Error message to show when both page size and |
||
| 352 | * result collection size are specified |
||
| 353 | * |
||
| 354 | * @return string The message |
||
| 355 | */ |
||
| 356 | public static function configurationMaxResultAndPageSizeMutuallyExclusive() |
||
| 360 | |||
| 361 | /** |
||
| 362 | * Format a message to show error when configuration expects a |
||
| 363 | * name as resource set name but it is not |
||
| 364 | * |
||
| 365 | * @param string $name The unresolved name |
||
| 366 | * |
||
| 367 | * @return string The formatted message |
||
| 368 | */ |
||
| 369 | public static function configurationResourceSetNameNotFound($name) |
||
| 373 | |||
| 374 | /** |
||
| 375 | * Format a message to show error when a function argument expected to |
||
| 376 | * EntitySetRights enum value but it is not |
||
| 377 | * |
||
| 378 | * @param string $argument The argument name |
||
| 379 | * @param string $functionName The function name |
||
| 380 | * |
||
| 381 | * @return string The formatted message |
||
| 382 | */ |
||
| 383 | public static function configurationRightsAreNotInRange($argument, $functionName) |
||
| 387 | |||
| 388 | |||
| 389 | |||
| 390 | /** |
||
| 391 | * A message to show error when service developer disabled count request and |
||
| 392 | * client requested for count. |
||
| 393 | * |
||
| 394 | * @return string The message |
||
| 395 | */ |
||
| 396 | public static function configurationCountNotAccepted() |
||
| 400 | |||
| 401 | /** |
||
| 402 | * Format a message to show error when a tyring to set a |
||
| 403 | * base class for primitive type |
||
| 404 | * |
||
| 405 | * @return string The message |
||
| 406 | */ |
||
| 407 | public static function resourceTypeNoBaseTypeForPrimitive() |
||
| 411 | |||
| 412 | /** |
||
| 413 | * Format a message to show error when tyring to |
||
| 414 | * set a primitive type as abstract |
||
| 415 | * |
||
| 416 | * @return string The message |
||
| 417 | */ |
||
| 418 | public static function resourceTypeNoAbstractForPrimitive() |
||
| 422 | |||
| 423 | /** |
||
| 424 | * Format a message to show error when a primitive instance type |
||
| 425 | * is not IType implementation |
||
| 426 | * |
||
| 427 | * @param string $argument The name of instance type argument |
||
| 428 | * |
||
| 429 | * @return string The message |
||
| 430 | */ |
||
| 431 | public static function resourceTypeTypeShouldImplementIType($argument) |
||
| 435 | |||
| 436 | /** |
||
| 437 | * Format a message to show error when instance type of a |
||
| 438 | * complex or entity type is not instance of ReflectionClass |
||
| 439 | * |
||
| 440 | * @param string $argument The name of instance type argument |
||
| 441 | * |
||
| 442 | * @return string The message |
||
| 443 | */ |
||
| 444 | public static function resourceTypeTypeShouldReflectionClass($argument) |
||
| 448 | |||
| 449 | /** |
||
| 450 | * Format a message to show error when an entity type missing key properties |
||
| 451 | * |
||
| 452 | * @param string $entityName The name of instance type argument |
||
| 453 | * |
||
| 454 | * @return string The formatted message |
||
| 455 | */ |
||
| 456 | public static function resourceTypeMissingKeyPropertiesForEntity($entityName) |
||
| 460 | |||
| 461 | /** |
||
| 462 | * The message to show error when trying to add |
||
| 463 | * property to 'Primitive' resource type |
||
| 464 | * |
||
| 465 | * @return string The message |
||
| 466 | */ |
||
| 467 | public static function resourceTypeNoAddPropertyForPrimitive() |
||
| 471 | |||
| 472 | /** |
||
| 473 | * The message to show error when trying to |
||
| 474 | * add key property to non-entity resource type |
||
| 475 | * |
||
| 476 | * @return string The message |
||
| 477 | */ |
||
| 478 | public static function resourceTypeKeyPropertiesOnlyOnEntityTypes() |
||
| 482 | |||
| 483 | /** |
||
| 484 | * The message to show error when trying to add an |
||
| 485 | * etag property to non-entity resource type |
||
| 486 | * |
||
| 487 | * @return string The message |
||
| 488 | */ |
||
| 489 | public static function resourceTypeETagPropertiesOnlyOnEntityTypes() |
||
| 493 | |||
| 494 | /** |
||
| 495 | * Format a message to show error for |
||
| 496 | * duplication of resource property on resource type |
||
| 497 | * |
||
| 498 | * @param string $propertyName The property name |
||
| 499 | * @param string $resourceTypeName The rtesource type name |
||
| 500 | * |
||
| 501 | * @return string The formatted message |
||
| 502 | */ |
||
| 503 | public static function resourceTypePropertyWithSameNameAlreadyExists($propertyName, $resourceTypeName) |
||
| 507 | |||
| 508 | /** |
||
| 509 | * The message to show error when trying to add a key property to derived type |
||
| 510 | * |
||
| 511 | * @return string The message |
||
| 512 | */ |
||
| 513 | public static function resourceTypeNoKeysInDerivedTypes() |
||
| 517 | |||
| 518 | /** |
||
| 519 | * The message to show error when trying to set a non-entity resource type as MLE |
||
| 520 | * |
||
| 521 | * @return string The message |
||
| 522 | */ |
||
| 523 | public static function resourceTypeHasStreamAttributeOnlyAppliesToEntityType() |
||
| 527 | |||
| 528 | /** |
||
| 529 | * The message to show error when trying to add a named stream on non-entity type |
||
| 530 | * |
||
| 531 | * @return string The message |
||
| 532 | */ |
||
| 533 | public static function resourceTypeNamedStreamsOnlyApplyToEntityType() |
||
| 537 | |||
| 538 | /** |
||
| 539 | * Format a message to show error for |
||
| 540 | * duplication of named stream property on resource type |
||
| 541 | * |
||
| 542 | * @param string $namedStreamName The named stream name |
||
| 543 | * @param string $resourceTypeName The resource Property |
||
| 544 | * |
||
| 545 | * @return string The formatted message |
||
| 546 | */ |
||
| 547 | public static function resourceTypeNamedStreamWithSameNameAlreadyExists($namedStreamName, $resourceTypeName) |
||
| 551 | |||
| 552 | /** |
||
| 553 | * Format a message to show error for invalid ResourcePropertyKind enum argument |
||
| 554 | * |
||
| 555 | * @param string $argumentName The argument name |
||
| 556 | * |
||
| 557 | * @return string The formatted message |
||
| 558 | */ |
||
| 559 | public static function resourcePropertyInvalidKindParameter($argumentName) |
||
| 563 | |||
| 564 | /** |
||
| 565 | * Format a message to show error when ResourcePropertyKind and ResourceType's ResourceTypeKind mismatches |
||
| 566 | * |
||
| 567 | * @param string $resourcePropertyKindArgName The ResourcePropertyKind argument name |
||
| 568 | * @param string $resourceTypeArgName The ResourceType argument name |
||
| 569 | * |
||
| 570 | * @return string The formatted message |
||
| 571 | */ |
||
| 572 | public static function resourcePropertyPropertyKindAndResourceTypeKindMismatch($resourcePropertyKindArgName, $resourceTypeArgName) |
||
| 576 | |||
| 577 | /** |
||
| 578 | * The error message to show when tyring to |
||
| 579 | * associate resource set with non-entity |
||
| 580 | * |
||
| 581 | * @return string The message |
||
| 582 | */ |
||
| 583 | public static function resourceSetContainerMustBeAssociatedWithEntityType() |
||
| 587 | |||
| 588 | /** |
||
| 589 | * The error message to show when IQueryProvider::getExpressionProvider |
||
| 590 | * method returns empty or null |
||
| 591 | * |
||
| 592 | * @return string The message |
||
| 593 | */ |
||
| 594 | public static function providersWrapperExpressionProviderMustNotBeNullOrEmpty() |
||
| 598 | |||
| 599 | /** |
||
| 600 | * The error message to show when IQueryProvider::getExpressionProvider |
||
| 601 | * method returns non-object or an object which does not implement IExpressionProvider |
||
| 602 | * |
||
| 603 | * @return string The message |
||
| 604 | */ |
||
| 605 | public static function providersWrapperInvalidExpressionProviderInstance() |
||
| 609 | |||
| 610 | /** |
||
| 611 | * The error message to show when IMetadataProvider::getContainerName |
||
| 612 | * method returns empty container name |
||
| 613 | * |
||
| 614 | * @return string The message |
||
| 615 | */ |
||
| 616 | public static function providersWrapperContainerNameMustNotBeNullOrEmpty() |
||
| 620 | |||
| 621 | /** |
||
| 622 | * The error message to show when |
||
| 623 | * IMetadataProvider::getContainerNamespace |
||
| 624 | * method returns empty container name |
||
| 625 | * |
||
| 626 | * @return string The message |
||
| 627 | */ |
||
| 628 | public static function providersWrapperContainerNamespaceMustNotBeNullOrEmpty() |
||
| 632 | |||
| 633 | /** |
||
| 634 | * Format a message to show error when |
||
| 635 | * more than one entity set with the same name found |
||
| 636 | * |
||
| 637 | * @param string $entitySetName The name of the entity set |
||
| 638 | * |
||
| 639 | * @return string The formatted message |
||
| 640 | */ |
||
| 641 | public static function providersWrapperEntitySetNameShouldBeUnique($entitySetName) |
||
| 645 | |||
| 646 | /** |
||
| 647 | * Format a message to show error when |
||
| 648 | * more than one entity type with the same name found |
||
| 649 | * |
||
| 650 | * @param string $entityTypeName The name of the entity type |
||
| 651 | * |
||
| 652 | * @return string The formatted message |
||
| 653 | */ |
||
| 654 | public static function providersWrapperEntityTypeNameShouldBeUnique($entityTypeName) |
||
| 658 | |||
| 659 | /** |
||
| 660 | * Format a message to show error when IDSMP::getResourceSet |
||
| 661 | * returns inconsistent instance of ResourceSet |
||
| 662 | * |
||
| 663 | * @param string $resourceSetName Name of the resource set |
||
| 664 | * @param string $resourceTypeName Name of the resource type |
||
| 665 | * @param string $resourcePropertyName Name of the navigation property |
||
| 666 | * |
||
| 667 | * @return string The formatted message |
||
| 668 | */ |
||
| 669 | public static function providersWrapperIDSMPGetResourceSetReturnsInvalidResourceSet($resourceSetName, $resourceTypeName, $resourcePropertyName) |
||
| 673 | |||
| 674 | /** |
||
| 675 | * |
||
| 676 | * @param string $methodName method name |
||
| 677 | * |
||
| 678 | * @return string The message |
||
| 679 | */ |
||
| 680 | public static function queryProviderReturnsNonQueryResult($methodName) |
||
| 684 | |||
| 685 | |||
| 686 | /** |
||
| 687 | * |
||
| 688 | * @param string $methodName method name |
||
| 689 | * @param QueryType $queryType |
||
| 690 | * |
||
| 691 | * @return string The message |
||
| 692 | */ |
||
| 693 | public static function queryProviderResultCountMissing($methodName, QueryType $queryType) |
||
| 697 | |||
| 698 | |||
| 699 | /** |
||
| 700 | * |
||
| 701 | * @param string $methodName method name |
||
| 702 | * @param QueryType $queryType |
||
| 703 | * |
||
| 704 | * @return string The message |
||
| 705 | */ |
||
| 706 | public static function queryProviderResultsMissing($methodName, QueryType $queryType) |
||
| 710 | |||
| 711 | /** |
||
| 712 | * Format a message to show error when IDSMP::getResourceFromResourceSet |
||
| 713 | * returns an instnce which is not an instance of expected entity instance. |
||
| 714 | * |
||
| 715 | * @param string $entityTypeName The name of expected entity type. |
||
| 716 | * @param string $methodName Method name |
||
| 717 | * |
||
| 718 | * @return string The formatted message |
||
| 719 | */ |
||
| 720 | public static function providersWrapperIDSQPMethodReturnsUnExpectedType($entityTypeName, $methodName) |
||
| 724 | |||
| 725 | /** |
||
| 726 | * A message to show error when IDSQP::getResourceFromResourceSet |
||
| 727 | * returns an entity instance with null key properties. |
||
| 728 | * |
||
| 729 | * @param string $methodName Method name |
||
| 730 | * |
||
| 731 | * @return string The message |
||
| 732 | */ |
||
| 733 | public static function providersWrapperIDSQPMethodReturnsInstanceWithNullKeyProperties($methodName) |
||
| 737 | |||
| 738 | /** |
||
| 739 | * A message to show error when IDSQP::getResourceFromResourceSet |
||
| 740 | * returns an entity instance with keys |
||
| 741 | * not matching with the expected keys in the uri predicate. |
||
| 742 | * |
||
| 743 | * @param string $methodName Method name |
||
| 744 | * |
||
| 745 | * @return string The message |
||
| 746 | */ |
||
| 747 | public static function providersWrapperIDSQPMethodReturnsInstanceWithNonMatchingKeys($methodName) |
||
| 751 | |||
| 752 | /** |
||
| 753 | * The error message to show for invalid navigation resource type |
||
| 754 | * |
||
| 755 | * @return string The message |
||
| 756 | */ |
||
| 757 | public static function navigationInvalidResourceType() |
||
| 761 | |||
| 762 | /** |
||
| 763 | * Format a message to show error when actual number of key values given |
||
| 764 | * in the key predicate is not matching with the expected number of key values |
||
| 765 | * |
||
| 766 | * @param string $segment The segment with key predicate in question |
||
| 767 | * @param int $expectedCount The expected number of key values |
||
| 768 | * @param int $actualCount The actual number of key values |
||
| 769 | * |
||
| 770 | * @return string The formatted message |
||
| 771 | */ |
||
| 772 | public static function keyDescriptorKeyCountNotMatching($segment, $expectedCount, $actualCount) |
||
| 776 | |||
| 777 | /** |
||
| 778 | * Format a message to show error when a required key is |
||
| 779 | * missing from key predicate of a segment |
||
| 780 | * |
||
| 781 | * @param string $segment The segment with key predicate in question |
||
| 782 | * @param string $expectedKeys The keys expected by the predicate |
||
| 783 | * |
||
| 784 | * @return string The formatted message |
||
| 785 | */ |
||
| 786 | public static function keyDescriptorMissingKeys($segment, $expectedKeys) |
||
| 790 | |||
| 791 | /** |
||
| 792 | * Format a message to show error when type of a key given in the |
||
| 793 | * predicate with named key values does not compatible with the expected type |
||
| 794 | * |
||
| 795 | * @param string $segment The segment with key predicate in question |
||
| 796 | * @param string $keyProperty Name of the key in question |
||
| 797 | * @param string $expectedType Expected type of the key |
||
| 798 | * @param string $actualType Actual type of the key |
||
| 799 | * |
||
| 800 | * @return string The formatted message |
||
| 801 | */ |
||
| 802 | public static function keyDescriptorInCompatibleKeyType($segment, $keyProperty, $expectedType, $actualType) |
||
| 806 | |||
| 807 | /** |
||
| 808 | * Format a message to show error when type of a key given in the predicate |
||
| 809 | * with positional key values does not compatible with the expected type |
||
| 810 | * |
||
| 811 | * @param String $segment The segment with key predicate in question |
||
| 812 | * @param String $keyProperty The Key property |
||
| 813 | * @param Int $position The position of key |
||
| 814 | * @param String $expectedType Expected type of the key |
||
| 815 | * @param String $actualType Actual type of the key |
||
| 816 | * |
||
| 817 | * @return string The formatted message |
||
| 818 | */ |
||
| 819 | public static function keyDescriptorInCompatibleKeyTypeAtPosition($segment, $keyProperty, $position, $expectedType, $actualType) |
||
| 823 | |||
| 824 | /** |
||
| 825 | * Format a message to show error when trying to access |
||
| 826 | * KeyDescriptor::_validatedNamedValues before |
||
| 827 | * invoking KeyDescriptor::validate function |
||
| 828 | * |
||
| 829 | * @return string The message |
||
| 830 | */ |
||
| 831 | public static function keyDescriptorValidateNotCalled() |
||
| 835 | |||
| 836 | /** |
||
| 837 | * Message to show error when there is a syntax error in the query |
||
| 838 | * |
||
| 839 | * @return string The message |
||
| 840 | */ |
||
| 841 | public static function syntaxError() |
||
| 845 | |||
| 846 | /** |
||
| 847 | * Format a message to show error when given url is malformed |
||
| 848 | * |
||
| 849 | * @param string $url The malformed url |
||
| 850 | * |
||
| 851 | * @return string The formatted message |
||
| 852 | */ |
||
| 853 | public static function urlMalformedUrl($url) |
||
| 857 | |||
| 858 | /** |
||
| 859 | * Format a message to show error when segment with |
||
| 860 | * multiple positional keys present in the request uri |
||
| 861 | * |
||
| 862 | * @param string $segment The segment with multiple positional keys |
||
| 863 | * |
||
| 864 | * @return string The formatted message |
||
| 865 | */ |
||
| 866 | public static function segmentParserKeysMustBeNamed($segment) |
||
| 870 | |||
| 871 | /** |
||
| 872 | * Format a message to show error when a leaft segment |
||
| 873 | * ($batch, $value, $metadata, $count, a bag property, |
||
| 874 | * a named media resource or void service operation) is followed by a segment |
||
| 875 | * |
||
| 876 | * @param string $leafSegment The leaf segment |
||
| 877 | * |
||
| 878 | * @return string The formatted message |
||
| 879 | */ |
||
| 880 | public static function segmentParserMustBeLeafSegment($leafSegment) |
||
| 884 | |||
| 885 | /** |
||
| 886 | * Format a message to show error when a segment follows a post link segment |
||
| 887 | * |
||
| 888 | * @param string $postPostLinkSegment The segment following post link segment |
||
| 889 | * |
||
| 890 | * @return string The formatted message |
||
| 891 | */ |
||
| 892 | public static function segmentParserNoSegmentAllowedAfterPostLinkSegment($postPostLinkSegment) |
||
| 896 | |||
| 897 | /** |
||
| 898 | * Format a message to show error when a segment otherthan |
||
| 899 | * $value is followed by primitive segment |
||
| 900 | * |
||
| 901 | * @param string $segment The segment follows |
||
| 902 | * primitive property segment |
||
| 903 | * @param string $primitivePropertySegment The primitive property segment |
||
| 904 | * |
||
| 905 | * @return string The formatted message |
||
| 906 | */ |
||
| 907 | public static function segmentParserOnlyValueSegmentAllowedAfterPrimitivePropertySegment($segment, $primitivePropertySegment) |
||
| 911 | |||
| 912 | /** |
||
| 913 | * Format a message to show error when try to query a collection segment |
||
| 914 | * |
||
| 915 | * @param string $collectionSegment The segment representing collection |
||
| 916 | * |
||
| 917 | * @return string The formatted message |
||
| 918 | */ |
||
| 919 | public static function segmentParserCannotQueryCollection($collectionSegment) |
||
| 923 | |||
| 924 | /** |
||
| 925 | * Format a message to show error when a count segment is followed by singleton |
||
| 926 | * |
||
| 927 | * @param string $segment The singleton segment |
||
| 928 | * |
||
| 929 | * @return string The formatted message |
||
| 930 | */ |
||
| 931 | public static function segmentParserCountCannotFollowSingleton($segment) |
||
| 935 | |||
| 936 | /** |
||
| 937 | * Format a message to show error when a link segment is |
||
| 938 | * followed by non-entity segment |
||
| 939 | * |
||
| 940 | * @param string $segment The segment follows primitive property segment |
||
| 941 | * |
||
| 942 | * @return string The formatted message |
||
| 943 | */ |
||
| 944 | public static function segmentParserLinkSegmentMustBeFollowedByEntitySegment($segment) |
||
| 948 | |||
| 949 | /** |
||
| 950 | * A message to show error when no segment follows a link segment |
||
| 951 | * |
||
| 952 | * @return string The message |
||
| 953 | */ |
||
| 954 | public static function segmentParserMissingSegmentAfterLink() |
||
| 958 | |||
| 959 | /** |
||
| 960 | * Format a message to show error when a segment |
||
| 961 | * found on the root which cannot be applied on root |
||
| 962 | * |
||
| 963 | * @param string $segment The segment found |
||
| 964 | * |
||
| 965 | * @return string The formatted message |
||
| 966 | */ |
||
| 967 | public static function segmentParserSegmentNotAllowedOnRoot($segment) |
||
| 971 | |||
| 972 | /** |
||
| 973 | * Message to show error when there is a inconsistency while parsing segments |
||
| 974 | * |
||
| 975 | * @return string The message |
||
| 976 | */ |
||
| 977 | public static function segmentParserInconsistentTargetKindState() |
||
| 981 | |||
| 982 | /** |
||
| 983 | * Format a message to show error when expecting a |
||
| 984 | * property kind not found while paring segments |
||
| 985 | * |
||
| 986 | * @param string $expectedKind The exptected property kind as string |
||
| 987 | * |
||
| 988 | * @return string |
||
| 989 | */ |
||
| 990 | public static function segmentParserUnExpectedPropertyKind($expectedKind) |
||
| 994 | |||
| 995 | /** |
||
| 996 | * Format a message to show error when trying to apply count on non-resource |
||
| 997 | * |
||
| 998 | * @param string $segment The non-resource segment |
||
| 999 | * |
||
| 1000 | * @return string The message |
||
| 1001 | */ |
||
| 1002 | public static function segmentParserCountCannotBeApplied($segment) |
||
| 1006 | |||
| 1007 | /** |
||
| 1008 | * Format a message to show error when a resource not found |
||
| 1009 | * |
||
| 1010 | * @param string $segment The segment follows primitive property segment |
||
| 1011 | * |
||
| 1012 | * @return string The formatted message |
||
| 1013 | */ |
||
| 1014 | public static function uriProcessorResourceNotFound($segment) |
||
| 1018 | |||
| 1019 | /** |
||
| 1020 | * The message to show error when trying to |
||
| 1021 | * access a resourceset which is forbidden |
||
| 1022 | * |
||
| 1023 | * @return string The message |
||
| 1024 | */ |
||
| 1025 | public static function uriProcessorForbidden() |
||
| 1029 | |||
| 1030 | /** |
||
| 1031 | * A message to show error when |
||
| 1032 | * IMetadataProvider::GetResourceAssociationSet() returns different |
||
| 1033 | * AssociationSet when called with 'ResourceAssociationSetEnd' instances that |
||
| 1034 | * are expected to the ends of same association set. |
||
| 1035 | * |
||
| 1036 | * @return string The error message |
||
| 1037 | */ |
||
| 1038 | public static function metadataAssociationTypeSetBidirectionalAssociationMustReturnSameResourceAssociationSetFromBothEnd() |
||
| 1042 | |||
| 1043 | /** |
||
| 1044 | * Format a message to show error when multiple ResourceAssociationSets |
||
| 1045 | * have a ResourceAssociationSetEnd referring to the |
||
| 1046 | * same EntitySet through the same AssociationType. |
||
| 1047 | * |
||
| 1048 | * @param string $resourceSet1Name Name of the first association set |
||
| 1049 | * @param string $resourceSet2Name Name of the second association set |
||
| 1050 | * @param string $entitySetName Name of the entity set |
||
| 1051 | * |
||
| 1052 | * @return string The formatted message |
||
| 1053 | */ |
||
| 1054 | public static function metadataAssociationTypeSetMultipleAssociationSetsForTheSameAssociationTypeMustNotReferToSameEndSets($resourceSet1Name, $resourceSet2Name, $entitySetName) |
||
| 1058 | |||
| 1059 | /** |
||
| 1060 | * Format a message to show error when IDSMP::getDerivedTypes returns a |
||
| 1061 | * type which is not null or array of ResourceType |
||
| 1062 | * |
||
| 1063 | * @param string $resourceTypeName Resource type name |
||
| 1064 | * |
||
| 1065 | * @return string The formatted message |
||
| 1066 | */ |
||
| 1067 | public static function metadataAssociationTypeSetInvalidGetDerivedTypesReturnType($resourceTypeName) |
||
| 1071 | |||
| 1072 | /** |
||
| 1073 | * Format a message to show error when entity type of an entity set has a |
||
| 1074 | * derived type with named stream property(ies). |
||
| 1075 | * |
||
| 1076 | * @param string $entitySetName The entity set name |
||
| 1077 | * @param string $derivedTypeName The full name of the derived type |
||
| 1078 | * |
||
| 1079 | * @return string The formatted message |
||
| 1080 | */ |
||
| 1081 | public static function metadataResourceTypeSetNamedStreamsOnDerivedEntityTypesNotSupported($entitySetName, $derivedTypeName) |
||
| 1085 | |||
| 1086 | /** |
||
| 1087 | * Format a message to show error when complex type having derived type |
||
| 1088 | * is used as item type of a bag property |
||
| 1089 | * |
||
| 1090 | * @param string $complexTypeName The name of the bag's complex type |
||
| 1091 | * having derived type |
||
| 1092 | * |
||
| 1093 | * @return string The formatted message |
||
| 1094 | */ |
||
| 1095 | public static function metadataResourceTypeSetBagOfComplexTypeWithDerivedTypes($complexTypeName) |
||
| 1099 | |||
| 1100 | /** |
||
| 1101 | * Message to show error when expecting entity or |
||
| 1102 | * complex type, but a different type found |
||
| 1103 | * |
||
| 1104 | * @return string The error message |
||
| 1105 | */ |
||
| 1106 | public static function metadataWriterExpectingEntityOrComplexResourceType() |
||
| 1110 | |||
| 1111 | /** |
||
| 1112 | * Format a message to show error when no association set |
||
| 1113 | * found for a navigation property |
||
| 1114 | * |
||
| 1115 | * @param string $navigationPropertyName The name of the navigation property. |
||
| 1116 | * @param string $resourceTypeName The resource type on which the |
||
| 1117 | * navigation property is defined. |
||
| 1118 | * |
||
| 1119 | * @return string The formatted message |
||
| 1120 | */ |
||
| 1121 | public static function metadataWriterNoResourceAssociationSetForNavigationProperty($navigationPropertyName, $resourceTypeName) |
||
| 1125 | |||
| 1126 | /** |
||
| 1127 | * Message to show error when type of 'ExpandedProjectionNode::addNode' |
||
| 1128 | * parameter is neither ProjectionNode nor ExpandedProjectionNode |
||
| 1129 | * |
||
| 1130 | * @return string The error message |
||
| 1131 | */ |
||
| 1132 | public static function expandedProjectionNodeArgumentTypeShouldBeProjection() |
||
| 1136 | |||
| 1137 | /** |
||
| 1138 | * Format a message to show error when parser failed to |
||
| 1139 | * resolve a property in select or expand path |
||
| 1140 | * |
||
| 1141 | * @param string $resourceTypeName The name of resource type |
||
| 1142 | * @param string $propertyName Sub path segment, that comes after |
||
| 1143 | * the segment of type $resourceTypeName |
||
| 1144 | * @param boolean $isSelect True if error found while parsing select |
||
| 1145 | * clause, false for expand |
||
| 1146 | * |
||
| 1147 | * @return string The formatted message |
||
| 1148 | */ |
||
| 1149 | public static function expandProjectionParserPropertyNotFound($resourceTypeName, $propertyName, $isSelect) |
||
| 1154 | |||
| 1155 | /** |
||
| 1156 | * Format a message to show error when expand path |
||
| 1157 | * contain non-navigation property. |
||
| 1158 | * |
||
| 1159 | * @param string $resourceTypeName The resource type name |
||
| 1160 | * @param string $propertyName The proeprty name |
||
| 1161 | * |
||
| 1162 | * @return string The formatted message |
||
| 1163 | */ |
||
| 1164 | public static function expandProjectionParserExpandCanOnlyAppliedToEntity($resourceTypeName, $propertyName) |
||
| 1168 | |||
| 1169 | /** |
||
| 1170 | * Format a message to show error when a primitive property is used as |
||
| 1171 | * navigation property in select clause |
||
| 1172 | * |
||
| 1173 | * @param string $resourceTypeName The resource type on which the |
||
| 1174 | * primitive property defined |
||
| 1175 | * @param string $primitvePropertyName The primitive property used as |
||
| 1176 | * navigation property |
||
| 1177 | * |
||
| 1178 | * @return string The formatted message |
||
| 1179 | */ |
||
| 1180 | public static function expandProjectionParserPrimitivePropertyUsedAsNavigationProperty($resourceTypeName, $primitvePropertyName) |
||
| 1184 | |||
| 1185 | /** |
||
| 1186 | * Format a message to show error when a complex type is used as |
||
| 1187 | * navigation property in select clause |
||
| 1188 | * |
||
| 1189 | * @param string $resourceTypeName The name of the resource type on which |
||
| 1190 | * complex property is defined |
||
| 1191 | * @param string $complextTypeName The name of complex type |
||
| 1192 | * |
||
| 1193 | * @return string The formatted message |
||
| 1194 | */ |
||
| 1195 | public static function expandProjectionParserComplexPropertyAsInnerSelectSegment($resourceTypeName, $complextTypeName) |
||
| 1199 | |||
| 1200 | /** |
||
| 1201 | * Format a message to show error when a bag type is used as |
||
| 1202 | * navigation property in select clause |
||
| 1203 | * |
||
| 1204 | * @param string $resourceTypeName The name of the resource type on which |
||
| 1205 | * bag property is defined |
||
| 1206 | * @param string $bagPropertyName The name of the bag property |
||
| 1207 | * |
||
| 1208 | * @return string The formatted message |
||
| 1209 | */ |
||
| 1210 | public static function expandProjectionParserBagPropertyAsInnerSelectSegment($resourceTypeName, $bagPropertyName) |
||
| 1214 | |||
| 1215 | /** |
||
| 1216 | * Message to show error when parser come across a type which is expected |
||
| 1217 | * to be Entity type, but actually it is not |
||
| 1218 | * |
||
| 1219 | * @return string The message |
||
| 1220 | */ |
||
| 1221 | public static function expandProjectionParserUnexpectedPropertyType() |
||
| 1225 | |||
| 1226 | /** |
||
| 1227 | * Format a message to show error when found selection traversal of a |
||
| 1228 | * navigation property with out expansion |
||
| 1229 | * |
||
| 1230 | * @param string $propertyName The navigation property in select path |
||
| 1231 | * which is not in expand path |
||
| 1232 | * |
||
| 1233 | * @return string The formatted message |
||
| 1234 | */ |
||
| 1235 | public static function expandProjectionParserPropertyWithoutMatchingExpand($propertyName) |
||
| 1239 | |||
| 1240 | /** |
||
| 1241 | * Message to show error when the orderByPathSegments argument found as |
||
| 1242 | * not a non-empty array |
||
| 1243 | * |
||
| 1244 | * @return string The message |
||
| 1245 | */ |
||
| 1246 | public static function orderByInfoPathSegmentsArgumentShouldBeNonEmptyArray() |
||
| 1250 | |||
| 1251 | /** |
||
| 1252 | * Message to show error when the navigationPropertiesUsedInTheOrderByClause |
||
| 1253 | * argument found as neither null or a non-empty array |
||
| 1254 | * |
||
| 1255 | * @return string The message |
||
| 1256 | */ |
||
| 1257 | public static function orderByInfoNaviUsedArgumentShouldBeNullOrNonEmptyArray() |
||
| 1261 | |||
| 1262 | /** |
||
| 1263 | * Message to show error when the orderBySubPathSegments argument found as |
||
| 1264 | * not a non-empty array |
||
| 1265 | * |
||
| 1266 | * @return string The message |
||
| 1267 | */ |
||
| 1268 | public static function orderByPathSegmentOrderBySubPathSegmentArgumentShouldBeNonEmptyArray() |
||
| 1272 | |||
| 1273 | /** |
||
| 1274 | * Format a message to show error when parser failed to resolve a |
||
| 1275 | * property in orderby path |
||
| 1276 | * |
||
| 1277 | * @param string $resourceTypeName The name of resource type |
||
| 1278 | * @param string $propertyName Sub path segment, that comes after the |
||
| 1279 | * segment of type $resourceTypeName |
||
| 1280 | * |
||
| 1281 | * @return string The formatted message |
||
| 1282 | */ |
||
| 1283 | public static function orderByParserPropertyNotFound($resourceTypeName, $propertyName) |
||
| 1287 | |||
| 1288 | /** |
||
| 1289 | * Format a message to show error when found a bag property used |
||
| 1290 | * in orderby clause |
||
| 1291 | * |
||
| 1292 | * @param string $bagPropertyName The name of the bag property |
||
| 1293 | * |
||
| 1294 | * @return string The formatted message |
||
| 1295 | */ |
||
| 1296 | public static function orderByParserBagPropertyNotAllowed($bagPropertyName) |
||
| 1300 | |||
| 1301 | /** |
||
| 1302 | * Format a message to show error when found a primitve property used as |
||
| 1303 | * intermediate segment in orderby clause |
||
| 1304 | * |
||
| 1305 | * @param string $propertyName The name of primitive property |
||
| 1306 | * |
||
| 1307 | * @return string The formatted message |
||
| 1308 | */ |
||
| 1309 | public static function orderByParserPrimitiveAsIntermediateSegment($propertyName) |
||
| 1313 | |||
| 1314 | /** |
||
| 1315 | * Format a message to show error when found binary property used as sort key |
||
| 1316 | * |
||
| 1317 | * @param string $binaryPropertyName The name of binary property |
||
| 1318 | * |
||
| 1319 | * @return string The formatted message |
||
| 1320 | */ |
||
| 1321 | public static function orderByParserSortByBinaryPropertyNotAllowed($binaryPropertyName) |
||
| 1325 | |||
| 1326 | /** |
||
| 1327 | * Format a message to show error when found a resource set reference |
||
| 1328 | * property in the oriderby clause |
||
| 1329 | * |
||
| 1330 | * @param string $propertyName The name of resource set reference property |
||
| 1331 | * @param string $definedType Defined type |
||
| 1332 | * |
||
| 1333 | * @return string The formatted message |
||
| 1334 | */ |
||
| 1335 | public static function orderByParserResourceSetReferenceNotAllowed($propertyName, $definedType) |
||
| 1339 | |||
| 1340 | /** |
||
| 1341 | * Format a message to show error when a navigation property is used as |
||
| 1342 | * sort key in orderby clause |
||
| 1343 | * |
||
| 1344 | * @param string $navigationPropertyName The name of the navigation property |
||
| 1345 | * |
||
| 1346 | * @return string The formatted message |
||
| 1347 | */ |
||
| 1348 | public static function orderByParserSortByNavigationPropertyIsNotAllowed($navigationPropertyName) |
||
| 1352 | |||
| 1353 | /** |
||
| 1354 | * Format a message to show error when a complex property is used as |
||
| 1355 | * sort key in orderby clause |
||
| 1356 | * |
||
| 1357 | * @param string $complexPropertyName The name of the complex property |
||
| 1358 | * |
||
| 1359 | * @return string The formatted message |
||
| 1360 | */ |
||
| 1361 | public static function orderByParserSortByComplexPropertyIsNotAllowed($complexPropertyName) |
||
| 1365 | |||
| 1366 | /** |
||
| 1367 | * Message to show error when orderby parser found unexpected state |
||
| 1368 | * |
||
| 1369 | * @return string The error message |
||
| 1370 | */ |
||
| 1371 | public static function orderByParserUnExpectedState() |
||
| 1375 | |||
| 1376 | /** |
||
| 1377 | * Message to show error when orderby parser come across a type |
||
| 1378 | * which is not expected |
||
| 1379 | * |
||
| 1380 | * @return string The message |
||
| 1381 | */ |
||
| 1382 | public static function orderByParserUnexpectedPropertyType() |
||
| 1386 | |||
| 1387 | /** |
||
| 1388 | * Format a message to show error when the orderby parser fails to |
||
| 1389 | * create an instance of request uri resource type |
||
| 1390 | * |
||
| 1391 | * @return string The formatted message |
||
| 1392 | */ |
||
| 1393 | public static function orderByParserFailedToCreateDummyObject() |
||
| 1397 | |||
| 1398 | /** |
||
| 1399 | * Format a message to show error when orderby parser failed to |
||
| 1400 | * access some of the properties of dummy object |
||
| 1401 | * |
||
| 1402 | * @param string $propertyName Property name |
||
| 1403 | * @param string $parentObjectName Parent object name |
||
| 1404 | * |
||
| 1405 | * @return string The formatted message |
||
| 1406 | */ |
||
| 1407 | public static function orderByParserFailedToAccessOrInitializeProperty($propertyName, $parentObjectName) |
||
| 1411 | |||
| 1412 | /** |
||
| 1413 | * Format a message to show error when data service failed to |
||
| 1414 | * access some of the properties of dummy object |
||
| 1415 | * |
||
| 1416 | * @param string $propertyName Property name |
||
| 1417 | * @param string $parentObjectName Parent object name |
||
| 1418 | * |
||
| 1419 | * @return string The formatted message |
||
| 1420 | */ |
||
| 1421 | public static function failedToAccessProperty($propertyName, $parentObjectName) |
||
| 1425 | |||
| 1426 | /** |
||
| 1427 | * Message to show error when found empty anscestor list. |
||
| 1428 | * |
||
| 1429 | * @return string The message |
||
| 1430 | */ |
||
| 1431 | public static function orderByLeafNodeArgumentShouldBeNonEmptyArray() |
||
| 1435 | |||
| 1436 | /** |
||
| 1437 | * Format a message to show error when found a invalid property name |
||
| 1438 | * |
||
| 1439 | * @param string $resourceTypeName The name of the resource type |
||
| 1440 | * @param string $propertyName The name of the property |
||
| 1441 | * |
||
| 1442 | * @return string The formatted message |
||
| 1443 | */ |
||
| 1444 | public static function badRequestInvalidPropertyNameSpecified($resourceTypeName, $propertyName) |
||
| 1448 | |||
| 1449 | /** |
||
| 1450 | * Message to show error when parameter collection to |
||
| 1451 | * AnonymousFunction constructor includes parameter that does not start with '$' |
||
| 1452 | * |
||
| 1453 | * @return string The message |
||
| 1454 | */ |
||
| 1455 | public static function anonymousFunctionParameterShouldStartWithDollarSymbol() |
||
| 1459 | |||
| 1460 | /** |
||
| 1461 | * Format a message to show error when skiptoken parser fails |
||
| 1462 | * to parse due to syntax error. |
||
| 1463 | * |
||
| 1464 | * @param string $skipToken Skip token |
||
| 1465 | * |
||
| 1466 | * @return string The formatted message |
||
| 1467 | */ |
||
| 1468 | public static function skipTokenParserSyntaxError($skipToken) |
||
| 1472 | |||
| 1473 | /** |
||
| 1474 | * Message to show error when orderByInfo argument to SkipTokenParser is |
||
| 1475 | * non null and not an instance of OrderByInfo |
||
| 1476 | * |
||
| 1477 | * @return string The message |
||
| 1478 | */ |
||
| 1479 | public static function skipTokenParserUnexpectedTypeOfOrderByInfoArg() |
||
| 1483 | |||
| 1484 | /** |
||
| 1485 | * Format a message to show error when number of keys in the |
||
| 1486 | * skiptoken does not matches with the number of keys required for ordering. |
||
| 1487 | * |
||
| 1488 | * @param int $skipTokenValuesCount Number of keys in the skiptoken |
||
| 1489 | * @param string $skipToken The skiptoken as string |
||
| 1490 | * @param int $expectedCount Expected number of skiptoken keys |
||
| 1491 | * |
||
| 1492 | * @return string The formatted message |
||
| 1493 | */ |
||
| 1494 | public static function skipTokenParserSkipTokenNotMatchingOrdering($skipTokenValuesCount, $skipToken, $expectedCount) |
||
| 1498 | |||
| 1499 | /** |
||
| 1500 | * Format a message to show error when skiptoken parser |
||
| 1501 | * found null value for key. |
||
| 1502 | * |
||
| 1503 | * @param string $skipToken The skiptoken as string |
||
| 1504 | * |
||
| 1505 | * @return string The formatted message |
||
| 1506 | */ |
||
| 1507 | public static function skipTokenParserNullNotAllowedForKeys($skipToken) |
||
| 1511 | |||
| 1512 | /** |
||
| 1513 | * Format a message to show error when skiptoken parser found values in |
||
| 1514 | * skiptoken which is not compatible with the |
||
| 1515 | * type of corresponding orderby constraint. |
||
| 1516 | * |
||
| 1517 | * @param string $skipToken Skip token |
||
| 1518 | * @param string $expectedTypeName Expected type name |
||
| 1519 | * @param int $position Position |
||
| 1520 | * @param string $typeProvidedInSkipTokenName The type provided in |
||
| 1521 | * skip token name |
||
| 1522 | * |
||
| 1523 | * @return string The formatted message |
||
| 1524 | */ |
||
| 1525 | public static function skipTokenParserInCompatibleTypeAtPosition($skipToken, $expectedTypeName, $position, $typeProvidedInSkipTokenName) |
||
| 1529 | |||
| 1530 | /** |
||
| 1531 | * Format a message to show error when one of the argument orderByPaths or |
||
| 1532 | * orderByValues is set and not both. |
||
| 1533 | * |
||
| 1534 | * @param string $orderByPathsVarName Name of the argument |
||
| 1535 | * holding orderByPathSegment |
||
| 1536 | * @param string $orderByValuesVarName Name of the argument holding |
||
| 1537 | * skip token values corresponding |
||
| 1538 | * to orderby paths |
||
| 1539 | * |
||
| 1540 | * @return string The formatted message |
||
| 1541 | */ |
||
| 1542 | public static function skipTokenInfoBothOrderByPathAndOrderByValuesShouldBeSetOrNotSet($orderByPathsVarName, $orderByValuesVarName) |
||
| 1546 | |||
| 1547 | /** |
||
| 1548 | * Format a message to show error when internalSkipTokenInfo failed to |
||
| 1549 | * access some of the properties of key object |
||
| 1550 | * |
||
| 1551 | * @param string $propertyName Property name |
||
| 1552 | * |
||
| 1553 | * @return string The formatted message |
||
| 1554 | */ |
||
| 1555 | public static function internalSkipTokenInfoFailedToAccessOrInitializeProperty($propertyName) |
||
| 1559 | |||
| 1560 | /** |
||
| 1561 | * Format a message to show error when found a non-array passed to |
||
| 1562 | * InternalSkipTokenInfo::search function. |
||
| 1563 | * |
||
| 1564 | * @param string $argumentName The name of the argument expected to be array |
||
| 1565 | * |
||
| 1566 | * @return string The formatted message |
||
| 1567 | */ |
||
| 1568 | public static function internalSkipTokenInfoBinarySearchRequireArray($argumentName) |
||
| 1572 | |||
| 1573 | /** |
||
| 1574 | * Format a message to show error when client requested version is |
||
| 1575 | * lower than the version required to intercept the response. |
||
| 1576 | * |
||
| 1577 | * @param string $requestedVersion The client requested version. |
||
| 1578 | * @param string $requiredVersion The minimum version required to |
||
| 1579 | * intercept the response. |
||
| 1580 | * |
||
| 1581 | * @return string The formatted message |
||
| 1582 | */ |
||
| 1583 | public static function requestVersionTooLow($requestedVersion, $requiredVersion) |
||
| 1587 | |||
| 1588 | /** |
||
| 1589 | * Format a message to show error when version required to intercept |
||
| 1590 | * the response is greater than the configured maximum protocol version. |
||
| 1591 | * |
||
| 1592 | * @param string $requiredVersion Required version |
||
| 1593 | * @param string $configuredVersion Configured version |
||
| 1594 | * |
||
| 1595 | * @return string The formatted message |
||
| 1596 | */ |
||
| 1597 | public static function requestVersionIsBiggerThanProtocolVersion($requiredVersion, $configuredVersion) |
||
| 1601 | |||
| 1602 | /** |
||
| 1603 | * Format a message to show error when value of DataServiceVersion or |
||
| 1604 | * MaxDataServiceVersion is invalid. |
||
| 1605 | * |
||
| 1606 | * @param string $versionAsString String value of the version |
||
| 1607 | * @param string $headerName Header name |
||
| 1608 | * |
||
| 1609 | * @return string The formatted message |
||
| 1610 | */ |
||
| 1611 | public static function requestDescriptionInvalidVersionHeader($versionAsString, $headerName) |
||
| 1615 | |||
| 1616 | /** |
||
| 1617 | * Format a message to show error when value of DataServiceVersion or |
||
| 1618 | * MaxDataServiceVersion is invalid. |
||
| 1619 | * |
||
| 1620 | * @param string $requestHeaderName Name of the request header |
||
| 1621 | * @param string $requestedVersion Requested version |
||
| 1622 | * @param string $availableVersions Available versions |
||
| 1623 | * |
||
| 1624 | * @return string The formatted message |
||
| 1625 | */ |
||
| 1626 | public static function requestDescriptionUnSupportedVersion($requestHeaderName, $requestedVersion, $availableVersions) |
||
| 1630 | |||
| 1631 | /** |
||
| 1632 | * Format a message to show error when the requested uri is not |
||
| 1633 | * based on the configured base service uri. |
||
| 1634 | * |
||
| 1635 | * @param string $requestUri The uri requested by the client. |
||
| 1636 | * @param string $serviceUri The base service uri. |
||
| 1637 | * |
||
| 1638 | * @return string The formatted message |
||
| 1639 | */ |
||
| 1640 | public static function uriProcessorRequestUriDoesNotHaveTheRightBaseUri($requestUri, $serviceUri) |
||
| 1644 | |||
| 1645 | /** |
||
| 1646 | * Message to show error when query prcocessor found |
||
| 1647 | * invalid value for $format option. |
||
| 1648 | * |
||
| 1649 | * @return string The message |
||
| 1650 | */ |
||
| 1651 | public static function queryProcessorInvalidValueForFormat() |
||
| 1655 | |||
| 1656 | /** |
||
| 1657 | * Message to show error when query processor found odata query option |
||
| 1658 | * in the request uri which is not applicable for the |
||
| 1659 | * resource targeted by the resource path. |
||
| 1660 | * |
||
| 1661 | * @return string The message |
||
| 1662 | */ |
||
| 1663 | public static function queryProcessorNoQueryOptionsApplicable() |
||
| 1667 | |||
| 1668 | /** |
||
| 1669 | * Message to show error when query processor found $filter option in the |
||
| 1670 | * request uri but is not applicable for the resource targeted by the |
||
| 1671 | * resource path. |
||
| 1672 | * |
||
| 1673 | * @return string The message |
||
| 1674 | */ |
||
| 1675 | public static function queryProcessorQueryFilterOptionNotApplicable() |
||
| 1679 | |||
| 1680 | /** |
||
| 1681 | * Message to show error when query processor found any $orderby, |
||
| 1682 | * $inlinecount, $skip or $top options in the request uri but is not |
||
| 1683 | * applicable for the resource targeted by the resource path. |
||
| 1684 | * |
||
| 1685 | * @return string The message |
||
| 1686 | */ |
||
| 1687 | public static function queryProcessorQuerySetOptionsNotApplicable() |
||
| 1691 | |||
| 1692 | /** |
||
| 1693 | * Message to show error when query processor found skiptoken option in the |
||
| 1694 | * request uri but is not applicable for the resource targeted by the |
||
| 1695 | * resource path. |
||
| 1696 | * |
||
| 1697 | * @return string The message |
||
| 1698 | */ |
||
| 1699 | public static function queryProcessorSkipTokenNotAllowed() |
||
| 1703 | |||
| 1704 | /** |
||
| 1705 | * Message to show error when query processor found $expand option in the |
||
| 1706 | * request uri but is not applicable for the resource targeted by the |
||
| 1707 | * resource path. |
||
| 1708 | * |
||
| 1709 | * @return string The message |
||
| 1710 | */ |
||
| 1711 | public static function queryProcessorQueryExpandOptionNotApplicable() |
||
| 1715 | |||
| 1716 | /** |
||
| 1717 | * Message to show error when query processor found usage of $inline count |
||
| 1718 | * option for a resource path ending with $count |
||
| 1719 | * |
||
| 1720 | * @return string The message |
||
| 1721 | */ |
||
| 1722 | public static function queryProcessorInlineCountWithValueCount() |
||
| 1726 | |||
| 1727 | /** |
||
| 1728 | * Message to show error when value of $inlinecount option found invalid. |
||
| 1729 | * |
||
| 1730 | * @return string The message |
||
| 1731 | */ |
||
| 1732 | public static function queryProcessorInvalidInlineCountOptionError() |
||
| 1736 | |||
| 1737 | /** |
||
| 1738 | * Format a message to show error when query processor found invalid |
||
| 1739 | * value for a query option. |
||
| 1740 | * |
||
| 1741 | * @param string $argName The name of the argument |
||
| 1742 | * @param string $argValue The value of the argument |
||
| 1743 | * |
||
| 1744 | * @return string The formatted message |
||
| 1745 | */ |
||
| 1746 | public static function queryProcessorIncorrectArgumentFormat($argName, $argValue) |
||
| 1750 | |||
| 1751 | /** |
||
| 1752 | * Format a message to show error when query processor found $skiptoken |
||
| 1753 | * in the request uri targetting to a resource for which paging is not |
||
| 1754 | * enabled. |
||
| 1755 | * |
||
| 1756 | * @param string $resourceSetName The name of the resource set. |
||
| 1757 | * |
||
| 1758 | * @return string The formatted message |
||
| 1759 | */ |
||
| 1760 | public static function queryProcessorSkipTokenCannotBeAppliedForNonPagedResourceSet($resourceSetName) |
||
| 1764 | |||
| 1765 | /** |
||
| 1766 | * Format a message to show error when query processor found $select |
||
| 1767 | * or $expand which cannot be applied to resource targeted by the |
||
| 1768 | * request uri. |
||
| 1769 | * |
||
| 1770 | * @param string $queryItem Query item |
||
| 1771 | * |
||
| 1772 | * @return string The formatted message |
||
| 1773 | */ |
||
| 1774 | public static function queryProcessorSelectOrExpandOptionNotApplicable($queryItem) |
||
| 1778 | |||
| 1779 | /** |
||
| 1780 | * Message to show error when query processor found $select clause but which is |
||
| 1781 | * disabled by the service developer. |
||
| 1782 | * |
||
| 1783 | * @return string The message |
||
| 1784 | */ |
||
| 1785 | public static function configurationProjectionsNotAccepted() |
||
| 1789 | |||
| 1790 | |||
| 1791 | /** |
||
| 1792 | * Message to show error service implementation returns null for IMetadataProvider or IQueryProvider. |
||
| 1793 | * |
||
| 1794 | * @return string The message |
||
| 1795 | */ |
||
| 1796 | public static function providersWrapperNull() |
||
| 1800 | |||
| 1801 | /** |
||
| 1802 | * Message to show when service implementation does not provide a valid IMetadataProvider. |
||
| 1803 | * |
||
| 1804 | * @return string The message |
||
| 1805 | */ |
||
| 1806 | public static function invalidMetadataInstance() |
||
| 1810 | |||
| 1811 | /** |
||
| 1812 | * Message to show when service implementation does not provide a valid IQueryProvider. |
||
| 1813 | * |
||
| 1814 | * |
||
| 1815 | * @return string The message |
||
| 1816 | */ |
||
| 1817 | public static function invalidQueryInstance() |
||
| 1821 | |||
| 1822 | /** |
||
| 1823 | * Message to show error when IStreamProvider.GetStreamETag returns invalid etag value. |
||
| 1824 | * |
||
| 1825 | * @return string The message |
||
| 1826 | */ |
||
| 1827 | public static function streamProviderWrapperGetStreamETagReturnedInvalidETagFormat() |
||
| 1831 | |||
| 1832 | /** |
||
| 1833 | * Message to show error when IStreamProvider.GetStreamContentType returns null or empty string. |
||
| 1834 | * |
||
| 1835 | * @return string The message |
||
| 1836 | */ |
||
| 1837 | public static function streamProviderWrapperGetStreamContentTypeReturnsEmptyOrNull() |
||
| 1841 | |||
| 1842 | /** |
||
| 1843 | * Message to show error when IStreamProvider.GetReadStream non stream. |
||
| 1844 | * |
||
| 1845 | * @return string The message |
||
| 1846 | */ |
||
| 1847 | public static function streamProviderWrapperInvalidStreamFromGetReadStream() |
||
| 1851 | |||
| 1852 | /** |
||
| 1853 | * Message to show error when IStreamProvider.GetReadStreamUri returns relative uri. |
||
| 1854 | * |
||
| 1855 | * @return string The message |
||
| 1856 | */ |
||
| 1857 | public static function streamProviderWrapperGetReadStreamUriMustReturnAbsoluteUriOrNull() |
||
| 1861 | |||
| 1862 | /** |
||
| 1863 | * Message to show error when data service does not implement IDSSP or IDSSP2 interfaces. |
||
| 1864 | * |
||
| 1865 | * @return string The message |
||
| 1866 | */ |
||
| 1867 | public static function streamProviderWrapperMustImplementIStreamProviderToSupportStreaming() |
||
| 1871 | |||
| 1872 | /** |
||
| 1873 | * Message to show error when try to configure data service version as 2 for which named stream is defined. |
||
| 1874 | * |
||
| 1875 | * @return string The message |
||
| 1876 | */ |
||
| 1877 | public static function streamProviderWrapperMaxProtocolVersionMustBeV3OrAboveToSupportNamedStreams() |
||
| 1881 | |||
| 1882 | /** |
||
| 1883 | * Message to show error when data service does not provide implementation of IDDSP2 for which named stream is defined. |
||
| 1884 | * |
||
| 1885 | * @return string The message |
||
| 1886 | */ |
||
| 1887 | public static function streamProviderWrapperMustImplementStreamProvider2ToSupportNamedStreams() |
||
| 1891 | |||
| 1892 | /** |
||
| 1893 | * Message to show error when IDSSP/IDSSP2 implementation methods try to set etag or content type. |
||
| 1894 | * |
||
| 1895 | * @param string $methodName Method name |
||
| 1896 | * |
||
| 1897 | * @return string The formatted message |
||
| 1898 | */ |
||
| 1899 | public static function streamProviderWrapperMustNotSetContentTypeAndEtag($methodName) |
||
| 1903 | |||
| 1904 | /** |
||
| 1905 | * Message to show error when IServiceProvider.GetService implementation returns invaild object when request for |
||
| 1906 | * IStreamProvider implementation. |
||
| 1907 | * |
||
| 1908 | * @return string The message |
||
| 1909 | */ |
||
| 1910 | public static function streamProviderWrapperInvalidStreamInstance() |
||
| 1914 | |||
| 1915 | /** |
||
| 1916 | * Message to show error when IServiceProvider.GetService implementation returns invaild object when request for |
||
| 1917 | * IStreamProvider2 implementation. |
||
| 1918 | * |
||
| 1919 | * @return string The message |
||
| 1920 | */ |
||
| 1921 | public static function streamProviderWrapperInvalidStream2Instance() |
||
| 1925 | |||
| 1926 | /** |
||
| 1927 | * Format a message to show error when object model serializer found |
||
| 1928 | * in-inconsistency in resource type and current runtime information. |
||
| 1929 | * |
||
| 1930 | * @param string $typeName The name of the resource type for which |
||
| 1931 | * serializer found inconsistency. |
||
| 1932 | * |
||
| 1933 | * @return string The formatted message. |
||
| 1934 | */ |
||
| 1935 | public static function badProviderInconsistentEntityOrComplexTypeUsage($typeName) |
||
| 1939 | |||
| 1940 | /** |
||
| 1941 | * Format a message to show error when object model serializer |
||
| 1942 | * found null key value. |
||
| 1943 | * |
||
| 1944 | * @param string $resourceTypeName The name of the resource type of the |
||
| 1945 | * instance with null key. |
||
| 1946 | * @param string $keyName Name of the key with null value. |
||
| 1947 | * |
||
| 1948 | * @return string The formatted message. |
||
| 1949 | */ |
||
| 1950 | public static function badQueryNullKeysAreNotSupported($resourceTypeName, $keyName) |
||
| 1954 | |||
| 1955 | /** |
||
| 1956 | * Format a message to show error when object model serializer failed to |
||
| 1957 | * access some of the properties of a type instance. |
||
| 1958 | * |
||
| 1959 | * @param string $propertyName The name of the property in question. |
||
| 1960 | * @param string $parentObjectName The entity instance in question. |
||
| 1961 | * |
||
| 1962 | * @return string The formatted message |
||
| 1963 | */ |
||
| 1964 | public static function objectModelSerializerFailedToAccessProperty($propertyName, $parentObjectName) |
||
| 1968 | |||
| 1969 | /** |
||
| 1970 | * Format a message to show error when object model serializer found loop |
||
| 1971 | * a in complex property instance. |
||
| 1972 | * |
||
| 1973 | * @param string $complexPropertyName The name of the complex property with loop. |
||
| 1974 | * |
||
| 1975 | * @return string The formatted message |
||
| 1976 | */ |
||
| 1977 | public static function objectModelSerializerLoopsNotAllowedInComplexTypes($complexPropertyName) |
||
| 1981 | |||
| 1982 | /** |
||
| 1983 | * Message to show error when the requested resource instance |
||
| 1984 | * cannot be serialized to requested format. |
||
| 1985 | * |
||
| 1986 | * @return string The message |
||
| 1987 | */ |
||
| 1988 | public static function unsupportedMediaType() |
||
| 1992 | |||
| 1993 | /** |
||
| 1994 | * Message to show error when media type header found malformed. |
||
| 1995 | * |
||
| 1996 | * @return string The message |
||
| 1997 | */ |
||
| 1998 | public static function httpProcessUtilityMediaTypeRequiresSemicolonBeforeParameter() |
||
| 2002 | |||
| 2003 | /** |
||
| 2004 | * Message to show error when media header value misses type segment. |
||
| 2005 | * |
||
| 2006 | * @return string The message |
||
| 2007 | */ |
||
| 2008 | public static function httpProcessUtilityMediaTypeUnspecified() |
||
| 2012 | |||
| 2013 | /** |
||
| 2014 | * Message to show error when media header value misses slash after type. |
||
| 2015 | * |
||
| 2016 | * @return string The message |
||
| 2017 | */ |
||
| 2018 | public static function httpProcessUtilityMediaTypeRequiresSlash() |
||
| 2022 | |||
| 2023 | /** |
||
| 2024 | * Message to show error when media header value misses sub-type. |
||
| 2025 | * |
||
| 2026 | * @return string The message |
||
| 2027 | */ |
||
| 2028 | public static function httpProcessUtilityMediaTypeRequiresSubType() |
||
| 2032 | |||
| 2033 | /** |
||
| 2034 | * Message to show error when media type misses parameter value. |
||
| 2035 | * |
||
| 2036 | * @return string The message |
||
| 2037 | */ |
||
| 2038 | public static function httpProcessUtilityMediaTypeMissingValue() |
||
| 2042 | |||
| 2043 | /** |
||
| 2044 | * Format a message to show error when media type parameter value contain escape |
||
| 2045 | * character but the value is not quoted. |
||
| 2046 | * |
||
| 2047 | * @param string $parameterName Name of the parameter |
||
| 2048 | * |
||
| 2049 | * @return string The formatted message. |
||
| 2050 | */ |
||
| 2051 | public static function httpProcessUtilityEscapeCharWithoutQuotes($parameterName) |
||
| 2055 | |||
| 2056 | /** |
||
| 2057 | * Format a message to show error when media type parameter value contain escape |
||
| 2058 | * character but the value at the end. |
||
| 2059 | * |
||
| 2060 | * @param string $parameterName Name of the parameter |
||
| 2061 | * |
||
| 2062 | * @return string The formatted message. |
||
| 2063 | */ |
||
| 2064 | public static function httpProcessUtilityEscapeCharAtEnd($parameterName) |
||
| 2068 | |||
| 2069 | /** |
||
| 2070 | * Format a message to show error when media parameter |
||
| 2071 | * value misses closing bracket. |
||
| 2072 | * |
||
| 2073 | * @param string $parameterName Name of the parameter |
||
| 2074 | * |
||
| 2075 | * @return string The formatted message. |
||
| 2076 | */ |
||
| 2077 | public static function httpProcessUtilityClosingQuoteNotFound($parameterName) |
||
| 2081 | |||
| 2082 | /** |
||
| 2083 | * Message to show error when the header found malformed. |
||
| 2084 | * |
||
| 2085 | * @return string The formatted message. |
||
| 2086 | */ |
||
| 2087 | public static function httpProcessUtilityMalformedHeaderValue() |
||
| 2091 | |||
| 2092 | /** |
||
| 2093 | * Message to show error when request contains eTag headers |
||
| 2094 | * but targeted resource type does not have eTag properties defined. |
||
| 2095 | * |
||
| 2096 | * @return string The message |
||
| 2097 | */ |
||
| 2098 | public static function noETagPropertiesForType() |
||
| 2102 | |||
| 2103 | /** |
||
| 2104 | * Message to show error when data service found the request eTag |
||
| 2105 | * does not match with entry eTag. |
||
| 2106 | * |
||
| 2107 | * @return string The message |
||
| 2108 | */ |
||
| 2109 | public static function eTagValueDoesNotMatch() |
||
| 2113 | |||
| 2114 | /** |
||
| 2115 | * Format a message to show error when request eTag header has been |
||
| 2116 | * specified but eTag is not allowed for the targeted resource. |
||
| 2117 | * |
||
| 2118 | * @param string $uri Url |
||
| 2119 | * |
||
| 2120 | * @return string The formatted message |
||
| 2121 | */ |
||
| 2122 | public static function eTagCannotBeSpecified($uri) |
||
| 2126 | |||
| 2127 | /** |
||
| 2128 | * Message to show error when data service found presence of both |
||
| 2129 | * If-Match and if-None-Match headers. |
||
| 2130 | * |
||
| 2131 | * @return string The message |
||
| 2132 | */ |
||
| 2133 | public static function bothIfMatchAndIfNoneMatchHeaderSpecified() |
||
| 2137 | |||
| 2138 | /** |
||
| 2139 | * Message to show error when data service found eTag |
||
| 2140 | * header for non-existing resource. |
||
| 2141 | * |
||
| 2142 | * @return string The message |
||
| 2143 | */ |
||
| 2144 | public static function eTagNotAllowedForNonExistingResource() |
||
| 2148 | |||
| 2149 | /** |
||
| 2150 | * Message to show error when data service found a request method other than GET. |
||
| 2151 | * |
||
| 2152 | * @param HTTPRequestMethod $method Request method |
||
| 2153 | * |
||
| 2154 | * @return string The formatted message |
||
| 2155 | */ |
||
| 2156 | public static function onlyReadSupport(HTTPRequestMethod $method) |
||
| 2160 | |||
| 2161 | /** |
||
| 2162 | * Format a message to show error when the uri that look like pointing to |
||
| 2163 | * MLE but actaully it is not. |
||
| 2164 | * |
||
| 2165 | * @param string $uri Url pointing to MLE |
||
| 2166 | * |
||
| 2167 | * @return string The formatted message |
||
| 2168 | */ |
||
| 2169 | public static function badRequestInvalidUriForMediaResource($uri) |
||
| 2173 | |||
| 2174 | /** |
||
| 2175 | * Format a message to show error when library found non-odata |
||
| 2176 | * query option begins with $ character. |
||
| 2177 | * |
||
| 2178 | * @param string $optionName Name of the query option |
||
| 2179 | * |
||
| 2180 | * @return string The formatted message. |
||
| 2181 | */ |
||
| 2182 | public static function hostNonODataOptionBeginsWithSystemCharacter($optionName) |
||
| 2186 | |||
| 2187 | /** |
||
| 2188 | * Format a message to show error when library found |
||
| 2189 | * a query option without value. |
||
| 2190 | * |
||
| 2191 | * @param string $optionName Name of the query option |
||
| 2192 | * |
||
| 2193 | * @return string The formatted message. |
||
| 2194 | */ |
||
| 2195 | public static function hostODataQueryOptionFoundWithoutValue($optionName) |
||
| 2199 | |||
| 2200 | /** |
||
| 2201 | * Format a message to show error when library found |
||
| 2202 | * a query option specified multiple times. |
||
| 2203 | * |
||
| 2204 | * @param string $optionName Name of the query option |
||
| 2205 | * |
||
| 2206 | * @return string The formatted message. |
||
| 2207 | */ |
||
| 2208 | public static function hostODataQueryOptionCannotBeSpecifiedMoreThanOnce($optionName) |
||
| 2212 | |||
| 2213 | /** |
||
| 2214 | * Message to show error when baseUrl given in service.config.xml is invalid. |
||
| 2215 | * |
||
| 2216 | * @param boolean $notEndWithSvcOrHasQuery Base url end with svc or not |
||
| 2217 | * |
||
| 2218 | * @return string The message. |
||
| 2219 | */ |
||
| 2220 | public static function hostMalFormedBaseUriInConfig($notEndWithSvcOrHasQuery = false) |
||
| 2228 | |||
| 2229 | /** |
||
| 2230 | * Format a message to show error when request uri is not |
||
| 2231 | * based on configured relative uri. |
||
| 2232 | * |
||
| 2233 | * @param string $requestUri The request uri. |
||
| 2234 | * @param string $relativeUri The relative uri in service.config.xml. |
||
| 2235 | * |
||
| 2236 | * @return string The formatted message. |
||
| 2237 | */ |
||
| 2238 | public static function hostRequestUriIsNotBasedOnRelativeUriInConfig($requestUri, $relativeUri) |
||
| 2242 | |||
| 2243 | |||
| 2244 | |||
| 2245 | } |