Github user kevdoran commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi/pull/120#discussion_r177824172
  
    --- Diff: 
minifi-c2/minifi-c2-framework/src/main/java/org/apache/nifi/minifi/c2/api/provider/device/DevicePersistenceProvider.java
 ---
    @@ -0,0 +1,78 @@
    +/*
    + * 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.minifi.c2.api.provider.device;
    +
    +import org.apache.nifi.minifi.c2.api.provider.Provider;
    +import org.apache.nifi.minifi.c2.model.Device;
    +
    +import java.util.List;
    +import java.util.Optional;
    +
    +/**
    + * NOTE: Although this interface is intended to be an extension point, it 
is not yet considered stable and thus may
    + * change across releases until the the C2 Server APIs mature.
    + *
    + * TODO, we may want to consider creating a separate entity model rather 
than reusing the REST API object model.
    + * Currently, this design assumes the Provider implementation will do that 
translation.
    + * This requires adding a dependency on minifi-c2-commons here for the 
data model.
    + */
    +public interface DevicePersistenceProvider extends Provider {
    --- End diff --
    
    > Would it make sense to have a base interface kind of like the Spring Data 
repositories
    
    I think this makes a lot of sense. I'm going to create this base interface 
type as you suggested. Are there any other methods you can think of that should 
be included the base interface? (It has everything needed for the current 
framework invocations, but expecting third-parties might provide an 
implementation, is there anything else we can anticipate wanting provided?)
    
    > So the only pluggable provider is the top-level AgentPersistenceProvider, 
but then it is up to that provider to provider implementations of the 
sub-providers.
    
    Yeah I like this approach. Going to do that for now and we can refine it 
(if needed) as these provider interfaces mature a bit.



---

Reply via email to