/**
* This file was auto-generated by mofcomp -j version 1.0.0 on Wed Jan 12
* 09:21:06 CET 2011.
*/
package org.opennaas.extensions.router.model;
import java.io.Serializable;
import java.util.List;
/**
* This Class contains accessor and mutator methods for all properties defined in the CIM class OSPFArea as well as methods comparable to the
* invokeMethods defined for this class. This Class implements the OSPFAreaBean Interface. The CIM class OSPFArea is described as follows:
*
* This class represents an OSPF area. The definition of an OSPF area from RFC2328, is 'OSPF allows sets of networks to be grouped together. Such a
* grouping is called an area. The topology of an area is hidden from the rest of the Autonomous System. This information hiding enables a significant
* reduction in routing traffic. Also, routing within the area is determined only by the area's own topology, lending the area protection from bad
* routing data.' This class has a 'Type' propery, which distinguishes between the different area types. This approach was chosen, because it provides
* a simpler way to indicate the type of an area, and additional subclassing is not needed at this time.
*/
public class OSPFArea extends RoutingProtocolDomain implements Serializable
{
/* AreaOfConfiguration */
/**
*
* @return OSPFAreaConfiguration assigned to this OSPFArea through AreaOfConfiguration dependency.
*/
public OSPFAreaConfiguration getConfiguration() {
return (OSPFAreaConfiguration) this.getFisrtsToAssociatedElementByType(AreaOfConfiguration.class);
}
/**
* Assigns config to this OSPFArea through AreaOfConfiguration dependency.
*
* @param config
*/
public void setConfiguration(OSPFAreaConfiguration config) {
if (config != null)
AreaOfConfiguration.link(this, config);
}
/* EndpointInArea */
/**
*
* @return List of OSPFProtocolEndpointBase associated to this OSPFArea through EndpointInArea aggregation.
*/
@SuppressWarnings("unchecked")
public List<OSPFProtocolEndpointBase> getEndpointsInArea() {
return (List<OSPFProtocolEndpointBase>) this.getToAssociatedElementsByType(EndpointInArea.class);
}
/**
* Associates ospfProtocolEndpointBase to this OSPFArea through EndpointInArea aggregation.
*
* @param ospfProtocolEndpointBase
* @return
*/
public boolean addEndpointInArea(OSPFProtocolEndpointBase ospfProtocolEndpointBase) {
if (ospfProtocolEndpointBase == null)
return false;
EndpointInArea.link(this, ospfProtocolEndpointBase);
return true;
}
/**
* Removes EndpointInArea aggregation between this OSPFArea and ospfProtocolEndpointBase, if any.
*
* @param ospfProtocolEndpointBase
* @return
*/
public boolean removeEndpointInArea(OSPFProtocolEndpointBase ospfProtocolEndpointBase) {
if (ospfProtocolEndpointBase == null)
return false;
Association a = this.getFirstToAssociationByTypeAndElement(EndpointInArea.class, ospfProtocolEndpointBase);
if (a == null)
return false;
a.unlink();
return true;
}
/**
* This constructor creates a OSPFAreaBeanImpl Class which implements the OSPFAreaBean Interface, and encapsulates the CIM class OSPFArea in a
* Java Bean. The CIM class OSPFArea is described as follows:
*
* This class represents an OSPF area. The definition of an OSPF area from RFC2328, is 'OSPF allows sets of networks to be grouped together. Such
* a grouping is called an area. The topology of an area is hidden from the rest of the Autonomous System. This information hiding enables a
* significant reduction in routing traffic. Also, routing within the area is determined only by the area's own topology, lending the area
* protection from bad routing data.' This class has a 'Type' propery, which distinguishes between the different area types. This approach was
* chosen, because it provides a simpler way to indicate the type of an area, and additional subclassing is not needed at this time.
*/
public OSPFArea() {
};
/**
* The following constants are defined for use with the ValueMap/Values qualified property areaID.
*/
private long areaID;
/**
* This method returns the OSPFArea.areaID property value. This property is described as follows:
*
* The area ID of this OSPF area, see C.2 in RFC 2328.
*
* @return long current areaID property value
* @exception Exception
*/
public long getAreaID() {
return this.areaID;
} // getAreaID
/**
* This method sets the OSPFArea.areaID property value. This property is described as follows:
*
* The area ID of this OSPF area, see C.2 in RFC 2328.
*
* @param long new areaID property value
* @exception Exception
*/
public void setAreaID(long areaID) {
this.areaID = areaID;
} // setAreaID
/**
* The following constants are defined for use with the ValueMap/Values qualified property AreaType.
*/
public enum AreaType {
PLAIN {
@Override
public String toString() {
return "PLAIN";
}
},
STUB {
@Override
public String toString() {
return "STUB";
}
},
NSSA {
@Override
public String toString() {
return "NSSA";
}
}
}
private AreaType areaType;
/**
* This method returns the OSPFArea.areaType property value. This property is described as follows:
*
* The type of the OSPF area.
*
* @return int current areaType property value
* @exception Exception
*/
public AreaType getAreaType() {
return this.areaType;
} // getAreaType
/**
* This method sets the OSPFArea.areaType property value. This property is described as follows:
*
* The type of the OSPF area.
*
* @param int new areaType property value
* @exception Exception
*/
public void setAreaType(AreaType areaType) {
this.areaType = areaType;
} // setAreaType
/**
* The following constants are defined for use with the ValueMap/Values qualified property extLsdbLimit.
*/
private long extLsdbLimit;
/**
* This method returns the OSPFArea.extLsdbLimit property value. This property is described as follows:
*
* When the number of non-default AS-external-LSAs in a router's link-state database reaches this limit, the router enters OverflowState, see 2.1
* in RFC 1765.
*
* @return long current extLsdbLimit property value
* @exception Exception
*/
public long getExtLsdbLimit() {
return this.extLsdbLimit;
} // getExtLsdbLimit
/**
* This method sets the OSPFArea.extLsdbLimit property value. This property is described as follows:
*
* When the number of non-default AS-external-LSAs in a router's link-state database reaches this limit, the router enters OverflowState, see 2.1
* in RFC 1765.
*
* @param long new extLsdbLimit property value
* @exception Exception
*/
public void setExtLsdbLimit(long extLsdbLimit) {
this.extLsdbLimit = extLsdbLimit;
} // setExtLsdbLimit
} // Class OSPFArea