use of alma.xmljbind.test.schedblock.SchedBlockEntityT in project ACS by ACS-Community.
the class XmlComponentImpl method initialize.
/////////////////////////////////////////////////////////////
// Implementation of ComponentLifecycle
// (only the parts we don't take from the default impl in ComponentImplBase)
/////////////////////////////////////////////////////////////
/**
* @see alma.acs.component.ComponentLifecycle#initialize(ContainerServices)
*/
public void initialize(ContainerServices contServices) throws ComponentLifecycleException {
super.initialize(contServices);
m_schedBlockList = new ArrayList<SchedBlock>();
try {
// create a few (incomplete) SchedBlocks
for (int sbCount = 0; sbCount < 10; sbCount++) {
SchedBlock sb = new SchedBlock();
SchedBlockEntityT entity = new SchedBlockEntityT();
m_containerServices.assignUniqueEntityId(entity);
sb.setSchedBlockEntity(entity);
SchedBlockControlT sbCtrl = new SchedBlockControlT();
sb.setSchedBlockControl(sbCtrl);
sbCtrl.setRepeatCount(sbCount % 3);
// sbCtrl.setEntityPartId("X00000008"); // set this on an ObsUnitSet instead...
m_schedBlockList.add(sb);
}
} catch (AcsJContainerServicesEx e) {
m_logger.log(Level.WARNING, "failed to initialize list of SchedBlocks. ", e);
m_schedBlockList.clear();
// throw new ComponentLifecycleException(e); // not required
}
}
Aggregations