NIFI-108: - Starting to add support for endpoints that will listing flowfiles in a queue.
Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/867acbdf Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/867acbdf Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/867acbdf Branch: refs/heads/NIFI-108 Commit: 867acbdf50e40571745c874ce79fc63c2a1d0ec4 Parents: 4cc1fa8 Author: Matt Gilman <[email protected]> Authored: Thu Dec 17 16:07:10 2015 -0500 Committer: Matt Gilman <[email protected]> Committed: Thu Dec 17 16:07:10 2015 -0500 ---------------------------------------------------------------------- .../apache/nifi/web/api/dto/FlowFileDTO.java | 40 ++++++++++++++++++ .../nifi/web/api/entity/FlowFileEntity.java | 44 ++++++++++++++++++++ 2 files changed, 84 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi/blob/867acbdf/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/FlowFileDTO.java ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/FlowFileDTO.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/FlowFileDTO.java new file mode 100644 index 0000000..ec64e3f --- /dev/null +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/FlowFileDTO.java @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.nifi.web.api.dto; + +import com.wordnik.swagger.annotations.ApiModelProperty; + +import java.util.Map; + +public class FlowFileDTO extends FlowFileSummaryDTO { + + private Map<String, String> attributes; + + /** + * @return the FlowFile attributes + */ + @ApiModelProperty( + value = "The FlowFile attributes." + ) + public Map<String, String> getAttributes() { + return attributes; + } + + public void setAttributes(Map<String, String> attributes) { + this.attributes = attributes; + } +} http://git-wip-us.apache.org/repos/asf/nifi/blob/867acbdf/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/FlowFileEntity.java ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/FlowFileEntity.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/FlowFileEntity.java new file mode 100644 index 0000000..639cc85 --- /dev/null +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/FlowFileEntity.java @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.nifi.web.api.entity; + +import org.apache.nifi.web.api.dto.FlowFileDTO; + +import javax.xml.bind.annotation.XmlRootElement; + +/** + * A serialized representation of this class can be placed in the entity body of a request or response to or from the API. This particular entity holds a reference to a FlowFileDTO. + */ +@XmlRootElement(name = "listingRequestEntity") +public class FlowFileEntity extends Entity { + + private FlowFileDTO flowFile; + + /** + * The FlowFileDTO that is being serialized. + * + * @return The FlowFileDTO object + */ + public FlowFileDTO getFlowFile() { + return flowFile; + } + + public void setFlowFile(FlowFileDTO flowFile) { + this.flowFile = flowFile; + } + +}
