Is this a valid resource data configuration? If not, leave an error message that can be returned by getValidityMessage() .
()
| 359 | * error message that can be returned by <TT>getValidityMessage()</TT>. |
| 360 | */ |
| 361 | public boolean isValid() { |
| 362 | boolean valid = true; |
| 363 | validityMessage = ""; |
| 364 | //****************************** |
| 365 | // here should check that the resource has all mandatory elements, |
| 366 | // e.g. class name, and non-presence of runtime params on LRs and VRs etc. |
| 367 | //****************************** |
| 368 | if(getClassName() == null || getClassName().length() == 0){ |
| 369 | validityMessage += "No class name provided for the resource!"; |
| 370 | valid = false; |
| 371 | } |
| 372 | if(getName() == null || getName().length() == 0){ |
| 373 | //no name provided. |
| 374 | setName(className.substring(className.lastIndexOf('.') + 1)); |
| 375 | } |
| 376 | return valid; |
| 377 | } // isValid() |
| 378 | |
| 379 | /** Status message set by isValid() */ |
| 380 | protected String validityMessage = ""; |
nothing calls this directly
no test coverage detected