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 booleanareAllDependenciesAvailable(org.opendaylight.controller.md.sal.binding.api.ReadTransaction tx, NeutronSecurityRule securityRule)Check if this particular (subclass) transcriber's dependencies are met.protected NeutronSecurityRulefromMd(SecurityRule rule)protected List<SecurityRule>getDataObjectList(SecurityRules rules)protected SecurityRuletoMd(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:
getDataObjectListin classAbstractTranscriberInterface<SecurityRule,SecurityRules,SecurityRuleKey,NeutronSecurityRule,Neutron>
-
fromMd
protected NeutronSecurityRule fromMd(SecurityRule rule)
- Specified by:
fromMdin classAbstractTranscriberInterface<SecurityRule,SecurityRules,SecurityRuleKey,NeutronSecurityRule,Neutron>
-
toMd
protected SecurityRule toMd(NeutronSecurityRule securityRule)
- Specified by:
toMdin 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.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, ReadTransaction)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<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
-
-