NIFI-8374 Refactor readOnly to accessMode in ApiModelProperty usages

This closes #4945

Signed-off-by: Mike Thomsen <mthomsen@apache.org>
This commit is contained in:
Jose Luis Pedrosa 2021-03-29 15:47:28 +01:00 committed by Mike Thomsen
parent 87b561f026
commit f21c1be60f
No known key found for this signature in database
GPG Key ID: 88511C3D4CAD246F
40 changed files with 93 additions and 88 deletions

View File

@ -109,7 +109,7 @@ public class AboutDTO {
@XmlJavaTypeAdapter(TimezoneAdapter.class)
@ApiModelProperty(
value = "The timezone of the NiFi instance.",
readOnly = true,
accessMode = ApiModelProperty.AccessMode.READ_ONLY,
dataType = "string"
)
public Date getTimezone() {

View File

@ -33,7 +33,7 @@ public class AccessConfigurationDTO {
*/
@ApiModelProperty(
value = "Indicates whether or not this NiFi supports user login.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public Boolean getSupportsLogin() {
return supportsLogin;

View File

@ -42,7 +42,7 @@ public class AccessStatusDTO {
*/
@ApiModelProperty(
value = "The user identity.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public String getIdentity() {
return identity;
@ -57,7 +57,7 @@ public class AccessStatusDTO {
*/
@ApiModelProperty(
value = "The user access status.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public String getStatus() {
return status;
@ -72,7 +72,7 @@ public class AccessStatusDTO {
*/
@ApiModelProperty(
value = "Additional details about the user access status.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public String getMessage() {
return message;

View File

@ -35,7 +35,7 @@ public abstract class AsynchronousRequestDTO<T extends UpdateStepDTO> {
private List<T> updateSteps;
@ApiModelProperty(value = "The ID of the request", readOnly = true)
@ApiModelProperty(value = "The ID of the request", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public String getRequestId() {
return requestId;
}
@ -44,7 +44,7 @@ public abstract class AsynchronousRequestDTO<T extends UpdateStepDTO> {
this.requestId = requestId;
}
@ApiModelProperty(value = "The URI for the request", readOnly = true)
@ApiModelProperty(value = "The URI for the request", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public String getUri() {
return uri;
}
@ -54,7 +54,7 @@ public abstract class AsynchronousRequestDTO<T extends UpdateStepDTO> {
}
@XmlJavaTypeAdapter(TimestampAdapter.class)
@ApiModelProperty(value = "The timestamp of when the request was submitted", readOnly = true)
@ApiModelProperty(value = "The timestamp of when the request was submitted", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public Date getSubmissionTime() {
return submissionTime;
}
@ -64,7 +64,7 @@ public abstract class AsynchronousRequestDTO<T extends UpdateStepDTO> {
}
@XmlJavaTypeAdapter(TimestampAdapter.class)
@ApiModelProperty(value = "The timestamp of when the request was last updated", readOnly = true)
@ApiModelProperty(value = "The timestamp of when the request was last updated", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public Date getLastUpdated() {
return lastUpdated;
}
@ -73,7 +73,7 @@ public abstract class AsynchronousRequestDTO<T extends UpdateStepDTO> {
this.lastUpdated = lastUpdated;
}
@ApiModelProperty(value = "Whether or not the request is completed", readOnly = true)
@ApiModelProperty(value = "Whether or not the request is completed", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public boolean isComplete() {
return complete;
}
@ -82,7 +82,7 @@ public abstract class AsynchronousRequestDTO<T extends UpdateStepDTO> {
this.complete = complete;
}
@ApiModelProperty(value = "The reason for the request failing, or null if the request has not failed", readOnly = true)
@ApiModelProperty(value = "The reason for the request failing, or null if the request has not failed", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public String getFailureReason() {
return failureReason;
}
@ -91,7 +91,7 @@ public abstract class AsynchronousRequestDTO<T extends UpdateStepDTO> {
this.failureReason = failureReason;
}
@ApiModelProperty(value = "A value between 0 and 100 (inclusive) indicating how close the request is to completion", readOnly = true)
@ApiModelProperty(value = "A value between 0 and 100 (inclusive) indicating how close the request is to completion", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public int getPercentCompleted() {
return percentCompleted;
}
@ -100,7 +100,7 @@ public abstract class AsynchronousRequestDTO<T extends UpdateStepDTO> {
this.percentCompleted = percentCompleted;
}
@ApiModelProperty(value = "A description of the current state of the request", readOnly = true)
@ApiModelProperty(value = "A description of the current state of the request", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public String getState() {
return state;
}
@ -109,7 +109,7 @@ public abstract class AsynchronousRequestDTO<T extends UpdateStepDTO> {
this.state = state;
}
@ApiModelProperty(value = "The steps that are required in order to complete the request, along with the status of each", readOnly = true)
@ApiModelProperty(value = "The steps that are required in order to complete the request, along with the status of each", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public List<T> getUpdateSteps() {
return updateSteps;
}

View File

@ -159,7 +159,7 @@ public class ConnectionDTO extends ComponentDTO {
*/
@ApiModelProperty(
value = "The relationships that the source of the connection currently supports.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public Set<String> getAvailableRelationships() {
return availableRelationships;
@ -271,7 +271,7 @@ public class ConnectionDTO extends ComponentDTO {
@ApiModelProperty(value = "The current status of the Connection's Load Balancing Activities. Status can indicate that Load Balancing is not configured for the connection, that Load Balancing " +
"is configured but inactive (not currently transferring data to another node), or that Load Balancing is configured and actively transferring data to another node.",
allowableValues = LOAD_BALANCE_NOT_CONFIGURED + ", " + LOAD_BALANCE_INACTIVE + ", " + LOAD_BALANCE_ACTIVE,
readOnly = true)
accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public String getLoadBalanceStatus() {
return loadBalanceStatus;
}

View File

@ -303,7 +303,7 @@ public class ControllerServiceDTO extends ComponentDTO {
}
@ApiModelProperty(value = "Indicates whether the ControllerService is valid, invalid, or still in the process of validating (i.e., it is unknown whether or not the ControllerService is valid)",
readOnly = true,
accessMode = ApiModelProperty.AccessMode.READ_ONLY,
allowableValues = VALID + ", " + INVALID + ", " + VALIDATING)
public String getValidationStatus() {
return validationStatus;

View File

@ -45,7 +45,7 @@ public class FlowConfigurationDTO {
*/
@ApiModelProperty(
value = "The interval in seconds between the automatic NiFi refresh requests.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public Long getAutoRefreshIntervalSeconds() {
return autoRefreshIntervalSeconds;
@ -61,7 +61,7 @@ public class FlowConfigurationDTO {
*/
@ApiModelProperty(
value = "Whether this NiFi supports a managed authorizer. Managed authorizers can visualize users, groups, and policies in the UI.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public Boolean getSupportsManagedAuthorizer() {
return supportsManagedAuthorizer;
@ -76,7 +76,7 @@ public class FlowConfigurationDTO {
*/
@ApiModelProperty(
value = "Whether this NiFi supports configurable users and groups.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public Boolean getSupportsConfigurableUsersAndGroups() {
return supportsConfigurableUsersAndGroups;
@ -91,7 +91,7 @@ public class FlowConfigurationDTO {
*/
@ApiModelProperty(
value = "Whether this NiFi supports a configurable authorizer.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public Boolean getSupportsConfigurableAuthorizer() {
return supportsConfigurableAuthorizer;

View File

@ -42,7 +42,7 @@ public abstract class FlowUpdateRequestDTO {
this.processGroupId = processGroupId;
}
@ApiModelProperty(value = "The unique ID of this request.", readOnly = true)
@ApiModelProperty(value = "The unique ID of this request.", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public String getRequestId() {
return requestId;
}
@ -51,7 +51,7 @@ public abstract class FlowUpdateRequestDTO {
this.requestId = requestId;
}
@ApiModelProperty(value = "The URI for future requests to this drop request.", readOnly = true)
@ApiModelProperty(value = "The URI for future requests to this drop request.", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public String getUri() {
return uri;
}
@ -61,7 +61,7 @@ public abstract class FlowUpdateRequestDTO {
}
@XmlJavaTypeAdapter(TimestampAdapter.class)
@ApiModelProperty(value = "The last time this request was updated.", dataType = "string", readOnly = true)
@ApiModelProperty(value = "The last time this request was updated.", dataType = "string", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public Date getLastUpdated() {
return lastUpdated;
}
@ -70,7 +70,7 @@ public abstract class FlowUpdateRequestDTO {
this.lastUpdated = lastUpdated;
}
@ApiModelProperty(value = "Whether or not this request has completed", readOnly = true)
@ApiModelProperty(value = "Whether or not this request has completed", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public boolean isComplete() {
return complete;
}
@ -79,7 +79,7 @@ public abstract class FlowUpdateRequestDTO {
this.complete = complete;
}
@ApiModelProperty(value = "An explanation of why this request failed, or null if this request has not failed", readOnly = true)
@ApiModelProperty(value = "An explanation of why this request failed, or null if this request has not failed", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public String getFailureReason() {
return failureReason;
}
@ -88,7 +88,7 @@ public abstract class FlowUpdateRequestDTO {
this.failureReason = reason;
}
@ApiModelProperty(value = "The state of the request", readOnly = true)
@ApiModelProperty(value = "The state of the request", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public String getState() {
return state;
}
@ -97,7 +97,7 @@ public abstract class FlowUpdateRequestDTO {
this.state = state;
}
@ApiModelProperty(value = "The percentage complete for the request, between 0 and 100", readOnly = true)
@ApiModelProperty(value = "The percentage complete for the request, between 0 and 100", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public int getPercentCompleted() {
return percentCompleted;
}

View File

@ -49,7 +49,7 @@ public class NodeDTO {
@XmlJavaTypeAdapter(DateTimeAdapter.class)
@ApiModelProperty(
value = "the time of the nodes's last heartbeat.",
readOnly = true,
accessMode = ApiModelProperty.AccessMode.READ_ONLY,
dataType = "string"
)
public Date getHeartbeat() {
@ -66,7 +66,7 @@ public class NodeDTO {
@XmlJavaTypeAdapter(DateTimeAdapter.class)
@ApiModelProperty(
value = "The time of the node's last connection request.",
readOnly = true,
accessMode = ApiModelProperty.AccessMode.READ_ONLY,
dataType = "string"
)
public Date getConnectionRequested() {
@ -84,7 +84,7 @@ public class NodeDTO {
*/
@ApiModelProperty(
value = "The active threads for the NiFi on the node.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public Integer getActiveThreadCount() {
return activeThreadCount;
@ -99,7 +99,7 @@ public class NodeDTO {
*/
@ApiModelProperty(
value = "The queue the NiFi on the node.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public String getQueued() {
return queued;
@ -114,7 +114,7 @@ public class NodeDTO {
*/
@ApiModelProperty(
value = "The node's host/ip address.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public String getAddress() {
return address;
@ -129,7 +129,7 @@ public class NodeDTO {
*/
@ApiModelProperty(
value = "The id of the node.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public String getNodeId() {
return nodeId;
@ -144,7 +144,7 @@ public class NodeDTO {
*/
@ApiModelProperty(
value = "The port the node is listening for API requests.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public Integer getApiPort() {
return apiPort;
@ -173,7 +173,7 @@ public class NodeDTO {
*/
@ApiModelProperty(
value = "The node's events.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public List<NodeEventDTO> getEvents() {
return events;
@ -188,7 +188,7 @@ public class NodeDTO {
*/
@ApiModelProperty(
value = "The roles of this node.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public Set<String> getRoles() {
return roles;
@ -204,7 +204,7 @@ public class NodeDTO {
@XmlJavaTypeAdapter(DateTimeAdapter.class)
@ApiModelProperty(
value = "The time at which this Node was last refreshed.",
readOnly = true,
accessMode = ApiModelProperty.AccessMode.READ_ONLY,
dataType = "string"
)
public Date getNodeStartTime() {

View File

@ -35,7 +35,7 @@ public class ParameterContextDTO {
this.identifier = id;
}
@ApiModelProperty(value = "The ID the Parameter Context.", readOnly = true)
@ApiModelProperty(value = "The ID the Parameter Context.", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public String getId() {
return identifier;
}
@ -71,7 +71,7 @@ public class ParameterContextDTO {
this.boundProcessGroups = boundProcessGroups;
}
@ApiModelProperty(value = "The Process Groups that are bound to this Parameter Context", readOnly = true)
@ApiModelProperty(value = "The Process Groups that are bound to this Parameter Context", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public Set<ProcessGroupEntity> getBoundProcessGroups() {
return boundProcessGroups;
}

View File

@ -27,7 +27,8 @@ public class ParameterContextUpdateRequestDTO extends AsynchronousRequestDTO<Par
private ParameterContextDTO parameterContext;
private Set<AffectedComponentEntity> referencingComponents;
@ApiModelProperty(value = "The Parameter Context that is being operated on. This may not be populated until the request has successfully completed.", readOnly = true)
@ApiModelProperty(value = "The Parameter Context that is being operated on. This may not be populated until the request has successfully completed.",
accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public ParameterContextDTO getParameterContext() {
return parameterContext;
}
@ -36,7 +37,7 @@ public class ParameterContextUpdateRequestDTO extends AsynchronousRequestDTO<Par
this.parameterContext = parameterContext;
}
@ApiModelProperty(value = "The components that are referenced by the update.", readOnly = true)
@ApiModelProperty(value = "The components that are referenced by the update.", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public Set<AffectedComponentEntity> getReferencingComponents() {
return referencingComponents;
}

View File

@ -26,7 +26,8 @@ public class ParameterContextValidationRequestDTO extends AsynchronousRequestDTO
private ParameterContextDTO parameterContext;
private ComponentValidationResultsEntity componentValidationResults;
@ApiModelProperty(value = "The Validation Results that were calculated for each component. This value may not be set until the request completes.", readOnly = true)
@ApiModelProperty(value = "The Validation Results that were calculated for each component. This value may not be set until the request completes.",
accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public ComponentValidationResultsEntity getComponentValidationResults() {
return componentValidationResults;
}

View File

@ -34,7 +34,7 @@ public class PermissionsDTO implements ReadablePermission, WritablePermission {
*/
@ApiModelProperty(
value = "Indicates whether the user can read a given resource.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
@Override
public Boolean getCanRead() {
@ -51,7 +51,7 @@ public class PermissionsDTO implements ReadablePermission, WritablePermission {
*/
@ApiModelProperty(
value = "Indicates whether the user can write a given resource.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
@Override
public Boolean getCanWrite() {

View File

@ -111,7 +111,7 @@ public class ProcessGroupDTO extends ComponentDTO {
*/
@ApiModelProperty(
value = "The number of input ports in the process group.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public Integer getInputPortCount() {
return NumberUtil.sumNullableIntegers(localInputPortCount, publicInputPortCount);
@ -171,7 +171,7 @@ public class ProcessGroupDTO extends ComponentDTO {
*/
@ApiModelProperty(
value = "The number of output ports in the process group.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public Integer getOutputPortCount() {
return NumberUtil.sumNullableIntegers(localOutputPortCount, publicOutputPortCount);
@ -327,7 +327,7 @@ public class ProcessGroupDTO extends ComponentDTO {
@ApiModelProperty(value = "The variables that are configured for the Process Group. Note that this map contains only "
+ "those variables that are defined on this Process Group and not any variables that are defined in the parent "
+ "Process Group, etc. I.e., this Map will not contain all variables that are accessible by components in this "
+ "Process Group by rather only the variables that are defined for this Process Group itself.", readOnly = true)
+ "Process Group by rather only the variables that are defined for this Process Group itself.", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public Map<String, String> getVariables() {
return variables;
}

View File

@ -269,7 +269,7 @@ public class ProcessorDTO extends ComponentDTO {
*/
@ApiModelProperty(
value = "The available relationships that the processor currently supports.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public List<RelationshipDTO> getRelationships() {
return relationships;
@ -312,7 +312,7 @@ public class ProcessorDTO extends ComponentDTO {
}
@ApiModelProperty(value = "Indicates whether the Processor is valid, invalid, or still in the process of validating (i.e., it is unknown whether or not the Processor is valid)",
readOnly = true,
accessMode = ApiModelProperty.AccessMode.READ_ONLY,
allowableValues = VALID + ", " + INVALID + ", " + VALIDATING)
public String getValidationStatus() {
return validationStatus;

View File

@ -21,7 +21,7 @@ import io.swagger.annotations.ApiModelProperty;
public interface ReadablePermission {
@ApiModelProperty(
value = "Indicates whether the user can read a given resource.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
Boolean getCanRead();

View File

@ -303,7 +303,7 @@ public class ReportingTaskDTO extends ComponentDTO {
}
@ApiModelProperty(value = "Indicates whether the Processor is valid, invalid, or still in the process of validating (i.e., it is unknown whether or not the Processor is valid)",
readOnly = true,
accessMode = ApiModelProperty.AccessMode.READ_ONLY,
allowableValues = VALID + ", " + INVALID + ", " + VALIDATING)
public String getValidationStatus() {
return validationStatus;

View File

@ -71,7 +71,7 @@ public class RevisionDTO {
*/
@ApiModelProperty(
value = "The user that last modified the flow.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public String getLastModifier() {
return lastModifier;

View File

@ -23,7 +23,7 @@ public abstract class UpdateStepDTO {
private boolean complete;
private String failureReason;
@ApiModelProperty(value = "Explanation of what happens in this step", readOnly = true)
@ApiModelProperty(value = "Explanation of what happens in this step", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public String getDescription() {
return description;
}
@ -32,7 +32,7 @@ public abstract class UpdateStepDTO {
this.description = description;
}
@ApiModelProperty(value = "Whether or not this step has completed", readOnly = true)
@ApiModelProperty(value = "Whether or not this step has completed", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public boolean isComplete() {
return complete;
}
@ -41,7 +41,7 @@ public abstract class UpdateStepDTO {
this.complete = complete;
}
@ApiModelProperty(value = "An explanation of why this step failed, or null if this step did not fail", readOnly = true)
@ApiModelProperty(value = "An explanation of why this step failed, or null if this step did not fail", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public String getFailureReason() {
return failureReason;
}

View File

@ -37,7 +37,7 @@ public class UserDTO extends TenantDTO {
*/
@ApiModelProperty(
value = "The groups to which the user belongs. This field is read only and it provided for convenience.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public Set<TenantEntity> getUserGroups() {
return userGroups;
@ -52,7 +52,7 @@ public class UserDTO extends TenantDTO {
*/
@ApiModelProperty(
value = "The access policies this user belongs to.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public Set<AccessPolicySummaryEntity> getAccessPolicies() {
return accessPolicies;

View File

@ -51,7 +51,7 @@ public class UserGroupDTO extends TenantDTO {
value = "The access policies this user group belongs to. This field was incorrectly defined as an AccessPolicyEntity. For "
+ "compatibility reasons the field will remain of this type, however only the fields that are present in the "
+ "AccessPolicySummaryEntity will be populated here.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public Set<AccessPolicyEntity> getAccessPolicies() {
return accessPolicies;

View File

@ -48,7 +48,7 @@ public class VariableDTO {
this.value = value;
}
@ApiModelProperty(value = "The ID of the Process Group where this Variable is defined", readOnly = true)
@ApiModelProperty(value = "The ID of the Process Group where this Variable is defined", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public String getProcessGroupId() {
return processGroupId;
}
@ -57,7 +57,7 @@ public class VariableDTO {
this.processGroupId = groupId;
}
@ApiModelProperty(value = "A set of all components that will be affected if the value of this variable is changed", readOnly = true)
@ApiModelProperty(value = "A set of all components that will be affected if the value of this variable is changed", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public Set<AffectedComponentEntity> getAffectedComponents() {
return affectedComponents;
}

View File

@ -37,7 +37,8 @@ public class VariableRegistryUpdateRequestDTO extends AsynchronousRequestDTO<Var
this.processGroupId = processGroupId;
}
@ApiModelProperty(value = "A set of all components that will be affected if the value of this variable is changed", readOnly = true)
@ApiModelProperty(value = "A set of all components that will be affected if the value of this variable is changed",
accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public Set<AffectedComponentEntity> getAffectedComponents() {
return affectedComponents;
}

View File

@ -53,7 +53,7 @@ public class VersionControlInformationDTO {
this.registryId = registryId;
}
@ApiModelProperty(value = "The name of the registry that the flow is stored in", readOnly = true)
@ApiModelProperty(value = "The name of the registry that the flow is stored in", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public String getRegistryName() {
return registryName;
}
@ -71,7 +71,7 @@ public class VersionControlInformationDTO {
this.bucketId = bucketId;
}
@ApiModelProperty(value = "The name of the bucket that the flow is stored in", readOnly = true)
@ApiModelProperty(value = "The name of the bucket that the flow is stored in", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public String getBucketName() {
return bucketName;
}
@ -116,7 +116,7 @@ public class VersionControlInformationDTO {
this.version = version;
}
@ApiModelProperty(readOnly = true,
@ApiModelProperty(accessMode = ApiModelProperty.AccessMode.READ_ONLY,
value = "The current state of the Process Group, as it relates to the Versioned Flow",
allowableValues = "LOCALLY_MODIFIED, STALE, LOCALLY_MODIFIED_AND_STALE, UP_TO_DATE, SYNC_FAILURE")
public String getState() {
@ -127,7 +127,7 @@ public class VersionControlInformationDTO {
this.state = state;
}
@ApiModelProperty(readOnly = true, value = "Explanation of why the group is in the specified state")
@ApiModelProperty(accessMode = ApiModelProperty.AccessMode.READ_ONLY, value = "Explanation of why the group is in the specified state")
public String getStateExplanation() {
return stateExplanation;
}

View File

@ -25,7 +25,8 @@ import javax.xml.bind.annotation.XmlType;
public class VersionedFlowUpdateRequestDTO extends FlowUpdateRequestDTO {
private VersionControlInformationDTO versionControlInformation;
@ApiModelProperty(value = "The VersionControlInformation that describes where the Versioned Flow is located; this may not be populated until the request is completed.", readOnly = true)
@ApiModelProperty(value = "The VersionControlInformation that describes where the Versioned Flow is located; this may not be populated until the request is completed.",
accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public VersionControlInformationDTO getVersionControlInformation() {
return versionControlInformation;
}

View File

@ -21,7 +21,7 @@ import io.swagger.annotations.ApiModelProperty;
public interface WritablePermission {
@ApiModelProperty(
value = "Indicates whether the user can write a given resource.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
Boolean getCanWrite();

View File

@ -28,7 +28,7 @@ public class ConnectionDiagnosticsDTO {
private ConnectionDiagnosticsSnapshotDTO aggregateSnapshot;
private List<ConnectionDiagnosticsSnapshotDTO> nodeSnapshots;
@ApiModelProperty(value = "Details about the connection", readOnly = true)
@ApiModelProperty(value = "Details about the connection", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public ConnectionDTO getConnection() {
return connection;
}
@ -37,7 +37,8 @@ public class ConnectionDiagnosticsDTO {
this.connection = connection;
}
@ApiModelProperty(value = "Aggregate values for all nodes in the cluster, or for this instance if not clustered", readOnly = true)
@ApiModelProperty(value = "Aggregate values for all nodes in the cluster, or for this instance if not clustered",
accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public ConnectionDiagnosticsSnapshotDTO getAggregateSnapshot() {
return aggregateSnapshot;
}
@ -46,7 +47,7 @@ public class ConnectionDiagnosticsDTO {
this.aggregateSnapshot = aggregateSnapshot;
}
@ApiModelProperty(value = "A list of values for each node in the cluster, if clustered.", readOnly = true)
@ApiModelProperty(value = "A list of values for each node in the cluster, if clustered.", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public List<ConnectionDiagnosticsSnapshotDTO> getNodeSnapshots() {
return nodeSnapshots;
}

View File

@ -43,7 +43,7 @@ public class ComponentStatusDTO{
* @return the run status of the component
*/
@ApiModelProperty(value = "The run status of this component",
readOnly = true,
accessMode = ApiModelProperty.AccessMode.READ_ONLY,
allowableValues = "ENABLED, ENABLING, DISABLED, DISABLING")
public String getRunStatus() {
return runStatus;
@ -55,7 +55,7 @@ public class ComponentStatusDTO{
@ApiModelProperty(value = "Indicates whether the component is valid, invalid, or still in the process of validating" +
" (i.e., it is unknown whether or not the component is valid)",
readOnly = true,
accessMode = ApiModelProperty.AccessMode.READ_ONLY,
allowableValues = VALID + ", " + INVALID + ", " + VALIDATING)
public String getValidationStatus() {
return validationStatus;

View File

@ -28,7 +28,7 @@ import javax.xml.bind.annotation.XmlType;
public class ControllerServiceStatusDTO extends ComponentStatusDTO {
@ApiModelProperty(value = "The run status of this ControllerService",
readOnly = true,
accessMode = ApiModelProperty.AccessMode.READ_ONLY,
allowableValues = "ENABLED, ENABLING, DISABLED, DISABLING")
@Override
public String getRunStatus() {

View File

@ -105,7 +105,7 @@ public class ProcessGroupStatusSnapshotDTO implements Cloneable {
this.name = name;
}
@ApiModelProperty(readOnly = true,
@ApiModelProperty(accessMode = ApiModelProperty.AccessMode.READ_ONLY,
value = "The current state of the Process Group, as it relates to the Versioned Flow",
allowableValues = "LOCALLY_MODIFIED, STALE, LOCALLY_MODIFIED_AND_STALE, UP_TO_DATE, SYNC_FAILURE")
public String getVersionedFlowState() {

View File

@ -123,7 +123,7 @@ public class RemoteProcessGroupStatusDTO {
@ApiModelProperty(value = "Indicates whether the component is valid, invalid, or still in the process of validating" +
" (i.e., it is unknown whether or not the component is valid)",
readOnly = true,
accessMode = ApiModelProperty.AccessMode.READ_ONLY,
allowableValues = "VALID, INVALID, VALIDATING")
public String getValidationStatus() {
return validationStatus;

View File

@ -28,7 +28,7 @@ import javax.xml.bind.annotation.XmlType;
public class ReportingTaskStatusDTO extends ComponentStatusDTO {
@ApiModelProperty(value = "The run status of this ReportingTask",
readOnly = true,
accessMode = ApiModelProperty.AccessMode.READ_ONLY,
allowableValues = "RUNNING, STOPPED, DISABLED")
@Override
public String getRunStatus() {

View File

@ -80,7 +80,7 @@ public class ControllerServiceEntity extends ComponentEntity implements Permissi
*/
@ApiModelProperty(
value = "The status for this ControllerService.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public ControllerServiceStatusDTO getStatus() {
return status;

View File

@ -98,7 +98,7 @@ public class FlowBreadcrumbEntity extends Entity {
this.parentBreadcrumb = parentBreadcrumb;
}
@ApiModelProperty(readOnly = true,
@ApiModelProperty(accessMode = ApiModelProperty.AccessMode.READ_ONLY,
value = "The current state of the Process Group, as it relates to the Versioned Flow",
allowableValues = "LOCALLY_MODIFIED, STALE, LOCALLY_MODIFIED_AND_STALE, UP_TO_DATE, SYNC_FAILURE")
public String getVersionedFlowState() {

View File

@ -42,7 +42,7 @@ public class ParameterContextsEntity extends Entity {
@ApiModelProperty(
value = "The current time on the system.",
dataType = "string",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public Date getCurrentTime() {
return currentTime;

View File

@ -37,7 +37,7 @@ public class ParameterEntity extends Entity implements WritablePermission {
}
@Override
@ApiModelProperty(value = "Indicates whether the user can write a given resource.", readOnly = true)
@ApiModelProperty(value = "Indicates whether the user can write a given resource.", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public Boolean getCanWrite() {
return canWrite;
}

View File

@ -90,7 +90,7 @@ public class ProcessGroupEntity extends ComponentEntity implements Permissible<P
*/
@ApiModelProperty(
value = "The number of input ports in the process group.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public Integer getInputPortCount() {
return NumberUtil.sumNullableIntegers(localInputPortCount, publicInputPortCount);
@ -147,7 +147,7 @@ public class ProcessGroupEntity extends ComponentEntity implements Permissible<P
*/
@ApiModelProperty(
value = "The number of output ports in the process group.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public Integer getOutputPortCount() {
return NumberUtil.sumNullableIntegers(localOutputPortCount, publicOutputPortCount);
@ -255,7 +255,7 @@ public class ProcessGroupEntity extends ComponentEntity implements Permissible<P
this.inactiveRemotePortCount = inactiveRemotePortCount;
}
@ApiModelProperty(value = "Returns the Versioned Flow that describes the contents of the Versioned Flow to be imported", readOnly = true)
@ApiModelProperty(value = "Returns the Versioned Flow that describes the contents of the Versioned Flow to be imported", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public VersionedFlowSnapshot getVersionedFlowSnapshot() {
return versionedFlowSnapshot;
}
@ -264,7 +264,7 @@ public class ProcessGroupEntity extends ComponentEntity implements Permissible<P
this.versionedFlowSnapshot = versionedFlowSnapshot;
}
@ApiModelProperty(readOnly = true,
@ApiModelProperty(accessMode = ApiModelProperty.AccessMode.READ_ONLY,
value = "The current state of the Process Group, as it relates to the Versioned Flow",
allowableValues = "LOCALLY_MODIFIED, STALE, LOCALLY_MODIFIED_AND_STALE, UP_TO_DATE, SYNC_FAILURE")
public String getVersionedFlowState() {

View File

@ -30,7 +30,7 @@ import javax.xml.bind.annotation.XmlRootElement;
public class ProcessGroupReplaceRequestEntity extends FlowUpdateRequestEntity<ProcessGroupReplaceRequestDTO> {
private VersionedFlowSnapshot versionedFlowSnapshot;
@ApiModelProperty(value = "Returns the Versioned Flow to replace with", readOnly = true)
@ApiModelProperty(value = "Returns the Versioned Flow to replace with", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public VersionedFlowSnapshot getVersionedFlowSnapshot() {
return versionedFlowSnapshot;
}

View File

@ -68,7 +68,7 @@ public class ReportingTaskEntity extends ComponentEntity implements Permissible<
*/
@ApiModelProperty(
value = "The status for this ReportingTask.",
readOnly = true
accessMode = ApiModelProperty.AccessMode.READ_ONLY
)
public ReportingTaskStatusDTO getStatus() {
return status;

View File

@ -28,7 +28,7 @@ public class VariableEntity extends Entity implements WritablePermission {
private Boolean canWrite;
@Override
@ApiModelProperty(value = "Indicates whether the user can write a given resource.", readOnly = true)
@ApiModelProperty(value = "Indicates whether the user can write a given resource.", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public Boolean getCanWrite() {
return canWrite;
}