NIFI-2237:

Extend template handling to read only properties.
* Add read only property handling to type.hbs template.
* Add flag to ProcessorDTO.getRelationships to reflect read only nature of the property.
* Remove explicit "read only" message from ConnectionDTO.getAvailableRelationships to avoid duplicate text.
* This closes #806
This commit is contained in:
Joe Skora 2016-08-07 22:13:13 -04:00 committed by Matt Gilman
parent e2f649cfea
commit d094130a26
3 changed files with 6 additions and 3 deletions

View File

@ -149,7 +149,7 @@ public class ConnectionDTO extends ComponentDTO {
* @return relationships that the source of the connection currently supports. This property is read only
*/
@ApiModelProperty(
value = "The relationships that the source of the connection currently supports. This property is read only.",
value = "The relationships that the source of the connection currently supports.",
readOnly = true
)
public Set<String> getAvailableRelationships() {

View File

@ -185,7 +185,8 @@ public class ProcessorDTO extends ComponentDTO {
* @return The available relationships
*/
@ApiModelProperty(
value = "The available relationships that the processor currently supports."
value = "The available relationships that the processor currently supports.",
readOnly = true
)
public List<RelationshipDTO> getRelationships() {
return relationships;

View File

@ -43,7 +43,9 @@
{{/ifeq}}
</td>
<td>{{#required}}required{{/required}}{{^required}}optional{{/required}}</td>
<td>{{#description}}{{{description}}}{{/description}}{{#if enum}} Allowable values: {{join enum ", "}}{{/if}}</td>
<td>{{#description}}{{{description}}}{{/description}}
{{#if enum}} Allowable values: {{join enum ", "}}{{/if}}
{{#if readOnly}} This property is read only.{{/if}}</td>
</tr>
{{/each}}
</table>