Class NeutronNetworkInterface
- java.lang.Object
-
- org.opendaylight.neutron.transcriber.AbstractTranscriberInterface<T,U,K,S,Neutron>
-
- org.opendaylight.neutron.transcriber.AbstractNeutronInterface<Network,Networks,NetworkKey,NeutronNetwork>
-
- org.opendaylight.neutron.transcriber.NeutronNetworkInterface
-
- All Implemented Interfaces:
AutoCloseable,INeutronCRUD<NeutronNetwork>,INeutronNetworkCRUD
@Singleton public final class NeutronNetworkInterface extends AbstractNeutronInterface<Network,Networks,NetworkKey,NeutronNetwork> implements INeutronNetworkCRUD
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opendaylight.neutron.spi.INeutronCRUD
INeutronCRUD.Result
-
-
Constructor Summary
Constructors Constructor Description NeutronNetworkInterface(org.opendaylight.mdsal.binding.api.DataBroker db, NeutronQosPolicyInterface qosPolicyInterface)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanareAllDependenciesAvailable(org.opendaylight.mdsal.binding.api.ReadOperations tx, NeutronNetwork network)Check if this particular (subclass) transcriber's dependencies are met.protected NeutronNetworkfromMd(Network network)protected Collection<Network>getDataObjectList(Networks networks)protected NetworktoMd(NeutronNetwork network)-
Methods inherited from class org.opendaylight.neutron.transcriber.AbstractNeutronInterface
getMdParentClass
-
Methods inherited from class org.opendaylight.neutron.transcriber.AbstractTranscriberInterface
add, checkedCommit, close, exists, fromMdAdminAttributes, fromMdBaseAttributes, fromMdIds, get, getAll, getDataBroker, ifNonNull, readMd, remove, toMd, toMdAdminAttributes, toMdBaseAttributes, toMdIds, toMdIds, toUuid, update
-
-
-
-
Constructor Detail
-
NeutronNetworkInterface
@Inject public NeutronNetworkInterface(org.opendaylight.mdsal.binding.api.DataBroker db, NeutronQosPolicyInterface qosPolicyInterface)
-
-
Method Detail
-
getDataObjectList
protected Collection<Network> getDataObjectList(Networks networks)
- Specified by:
getDataObjectListin classAbstractTranscriberInterface<Network,Networks,NetworkKey,NeutronNetwork,Neutron>
-
fromMd
protected NeutronNetwork fromMd(Network network)
- Specified by:
fromMdin classAbstractTranscriberInterface<Network,Networks,NetworkKey,NeutronNetwork,Neutron>
-
toMd
protected Network toMd(NeutronNetwork network)
- Specified by:
toMdin classAbstractTranscriberInterface<Network,Networks,NetworkKey,NeutronNetwork,Neutron>
-
areAllDependenciesAvailable
protected boolean areAllDependenciesAvailable(org.opendaylight.mdsal.binding.api.ReadOperations tx, NeutronNetwork network) throws org.opendaylight.mdsal.common.api.ReadFailedExceptionDescription copied from class:AbstractTranscriberInterfaceCheck if this particular (subclass) transcriber's dependencies are met. Default implementation just returns true. Some but not all transcribers will customize this.Implementations *MUST* use the passed in transaction. They will typically call the
AbstractTranscriberInterface.exists(String, ReadOperations)method on ANOTHER transcriber with it.Implementations should chain
AbstractTranscriberInterface.ifNonNull(Object, CheckedFunction), or perform null safe comparisons otherwise, for both optional non-mandatoryNeutronObjectas well as mandatory properties which may well be null. Both must mandatory and non-mandatory must be guarded, because modify (update) operation are allowed to contain partial neutron objects with missing fields.- Overrides:
areAllDependenciesAvailablein classAbstractTranscriberInterface<Network,Networks,NetworkKey,NeutronNetwork,Neutron>- Parameters:
tx- the transaction within which to perform reads to check for dependenciesnetwork- the incoming main neutron object in which there may be references to dependencies- Returns:
- true if all dependencies are available and the
AbstractTranscriberInterface.add(INeutronObject)(orAbstractTranscriberInterface.update(String, INeutronObject)operation can proceed; false if there are unmet dependencies, which will cause the add to abort, and a respective error code returned to the caller. - Throws:
org.opendaylight.mdsal.common.api.ReadFailedException- in case of a data store problem
-
-