2 * ============LICENSE_START====================================================
4 * ===========================================================================
5 * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
6 * ===========================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END====================================================
21 package org.onap.aaf.auth.batch.approvalsets;
23 import java.util.List;
25 import org.onap.aaf.auth.dao.cass.ApprovalDAO;
26 import org.onap.aaf.auth.dao.cass.FutureDAO;
27 import org.onap.aaf.auth.dao.cass.NsDAO;
28 import org.onap.aaf.auth.dao.cass.RoleDAO;
29 import org.onap.aaf.auth.dao.cass.UserRoleDAO;
30 import org.onap.aaf.auth.env.AuthzTrans;
31 import org.onap.aaf.auth.layer.Result;
34 * I have become convinced that Data for Apps is modeled by abstract access methods against multiple data
35 * sources. With the insistence of JUnits, it becomes much more paramount to create a model which can
36 * 1) be easily loaded from Disk "Test Data" without resorting to complex "mokito" schemes
38 * 3) combined for REAL time by running Cached Memory
44 * 5) persisted Globally through a store like Cassandra
46 * But in the end, it looks like:
48 * 2) Find the Data Structures by various means, accounting for
49 * a) Multiple Responses
50 * b) Errors from the deepest level, made available through the call stack
53 * @author jonathan.gathman
56 public interface DataView {
58 public Result<NsDAO.Data> ns(final AuthzTrans trans, final String id);
59 public Result<RoleDAO.Data> roleByName(final AuthzTrans trans, final String name);
60 public Result<List<UserRoleDAO.Data>> ursByRole(final AuthzTrans trans, final String role);
61 public Result<List<UserRoleDAO.Data>> ursByUser(final AuthzTrans trans, final String user);
64 public Result<ApprovalDAO.Data> insert(final AuthzTrans trans, final ApprovalDAO.Data add);
65 public Result<FutureDAO.Data> insert(final AuthzTrans trans, final FutureDAO.Data add);
68 public Result<ApprovalDAO.Data> delete(final AuthzTrans trans, final ApprovalDAO.Data add);
69 public Result<FutureDAO.Data> delete(final AuthzTrans trans, final FutureDAO.Data add);