/*- * ============LICENSE_START======================================================= * SDC * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed 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. * ============LICENSE_END========================================================= */ package org.openecomp.sdc.be.model.operations.api; import java.util.Map; import org.openecomp.sdc.be.dao.graph.datatype.GraphNode; import org.openecomp.sdc.be.datatypes.elements.InterfaceDataDefinition; import org.openecomp.sdc.be.model.InterfaceDefinition; import org.openecomp.sdc.be.model.Operation; import com.thinkaurelius.titan.core.TitanVertex; import fj.data.Either; public interface IInterfaceLifecycleOperation { public Either createInterfaceOnResource(InterfaceDefinition interf, String resourceId, String interfaceName, boolean failIfExist, boolean inTransaction); public StorageOperationStatus createInterfaceOnResource(InterfaceDefinition interf, String resourceId, String interfaceName, boolean failIfExist, boolean inTransaction, TitanVertex metadataVertex); public Either addInterfaceToResource(InterfaceDefinition interf, String resourceId, String interfaceName); public Either addInterfaceToResource(InterfaceDefinition interf, String resourceId, String interfaceName, boolean inTransaction); // public Either // getInterface(String interfaceId); // // public Either // getInterface(String interfaceId, boolean inTransaction); public Either updateInterfaceOperation(String resourceId, String interfaceName, String operationName, Operation interf); public Either updateInterfaceOperation(String resourceId, String interfaceName, String operationName, Operation interf, boolean inTransaction); public Either deleteInterfaceOperation(String resourceId, String interfaceName, String operationName); public Either deleteInterfaceOperation(String resourceId, String interfaceName, String operationName, boolean inTransaction); public Either, StorageOperationStatus> getAllInterfacesOfResource( String resourceId, boolean recursively, boolean inTransaction); public Either, StorageOperationStatus> getAllInterfacesOfResource( String resourceId, boolean recursively); public Either deleteInterfaceOfResourceOnGraph(String resourceId, InterfaceDefinition interfaceDef, boolean inTransaction); public Either createInterfaceType(InterfaceDefinition interf); public Either createInterfaceType(InterfaceDefinition interf, boolean inTransaction); public Either getInterface(String interfaceId); public StorageOperationStatus associateInterfaceToNode(GraphNode node, InterfaceDefinition interfaceDefinition, TitanVertex metadataVertex); public Either getSpecificOperation(String resourceId, String interfaceType, String operationName); public Either dissociateInterfaceFromNode(GraphNode node, InterfaceDefinition interfaceDefinition); public String getShortInterfaceName(InterfaceDataDefinition interfaceDefinition); }