Class NeutronSecurityRuleInterface
- java.lang.Object
-
- org.opendaylight.neutron.transcriber.AbstractTranscriberInterface<T,U,K,S,Neutron>
-
- org.opendaylight.neutron.transcriber.AbstractNeutronInterface<SecurityRule,SecurityRules,SecurityRuleKey,NeutronSecurityRule>
-
- org.opendaylight.neutron.transcriber.NeutronSecurityRuleInterface
-
- All Implemented Interfaces:
AutoCloseable
,INeutronCRUD<NeutronSecurityRule>
,INeutronSecurityRuleCRUD
@Singleton public final class NeutronSecurityRuleInterface extends AbstractNeutronInterface<SecurityRule,SecurityRules,SecurityRuleKey,NeutronSecurityRule> implements INeutronSecurityRuleCRUD
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opendaylight.neutron.spi.INeutronCRUD
INeutronCRUD.Result
-
-
Constructor Summary
Constructors Constructor Description NeutronSecurityRuleInterface(org.opendaylight.controller.md.sal.binding.api.DataBroker db, NeutronSecurityGroupInterface securityGroupInterface)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
areAllDependenciesAvailable(org.opendaylight.controller.md.sal.binding.api.ReadTransaction tx, NeutronSecurityRule securityRule)
Check if this particular (subclass) transcriber's dependencies are met.protected NeutronSecurityRule
fromMd(SecurityRule rule)
protected List<SecurityRule>
getDataObjectList(SecurityRules rules)
protected SecurityRule
toMd(NeutronSecurityRule securityRule)
-
Methods inherited from class org.opendaylight.neutron.transcriber.AbstractNeutronInterface
getMdParentClass
-
Methods inherited from class org.opendaylight.neutron.transcriber.AbstractTranscriberInterface
add, close, exists, fromMdAdminAttributes, fromMdBaseAttributes, fromMdIds, get, getAll, getDataBroker, ifNonNull, readMd, remove, toMd, toMdAdminAttributes, toMdBaseAttributes, toMdIds, toMdIds, toUuid, update
-
-
-
-
Constructor Detail
-
NeutronSecurityRuleInterface
@Inject public NeutronSecurityRuleInterface(org.opendaylight.controller.md.sal.binding.api.DataBroker db, NeutronSecurityGroupInterface securityGroupInterface)
-
-
Method Detail
-
getDataObjectList
protected List<SecurityRule> getDataObjectList(SecurityRules rules)
- Specified by:
getDataObjectList
in classAbstractTranscriberInterface<SecurityRule,SecurityRules,SecurityRuleKey,NeutronSecurityRule,Neutron>
-
fromMd
protected NeutronSecurityRule fromMd(SecurityRule rule)
- Specified by:
fromMd
in classAbstractTranscriberInterface<SecurityRule,SecurityRules,SecurityRuleKey,NeutronSecurityRule,Neutron>
-
toMd
protected SecurityRule toMd(NeutronSecurityRule securityRule)
- Specified by:
toMd
in classAbstractTranscriberInterface<SecurityRule,SecurityRules,SecurityRuleKey,NeutronSecurityRule,Neutron>
-
areAllDependenciesAvailable
protected boolean areAllDependenciesAvailable(org.opendaylight.controller.md.sal.binding.api.ReadTransaction tx, NeutronSecurityRule securityRule) throws org.opendaylight.controller.md.sal.common.api.data.ReadFailedException
Description copied from class:AbstractTranscriberInterface
Check 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, ReadTransaction)
method on ANOTHER transcriber with it.Implementations should chain
AbstractTranscriberInterface.ifNonNull(Object, CheckedFunction)
, or perform null safe comparisons otherwise, for both optional non-mandatoryNeutronObject
as 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:
areAllDependenciesAvailable
in classAbstractTranscriberInterface<SecurityRule,SecurityRules,SecurityRuleKey,NeutronSecurityRule,Neutron>
- Parameters:
tx
- the transaction within which to perform reads to check for dependenciessecurityRule
- 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.controller.md.sal.common.api.data.ReadFailedException
- in case of a data store problem
-
-