Search in sources :

Example 1 with SchedBlockEntityT

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
    }
}
Also used : SchedBlockEntityT(alma.xmljbind.test.schedblock.SchedBlockEntityT) SchedBlock(alma.xmljbind.test.schedblock.SchedBlock) SchedBlockControlT(alma.xmljbind.test.schedblock.SchedBlockControlT) AcsJContainerServicesEx(alma.JavaContainerError.wrappers.AcsJContainerServicesEx)

Aggregations

AcsJContainerServicesEx (alma.JavaContainerError.wrappers.AcsJContainerServicesEx)1 SchedBlock (alma.xmljbind.test.schedblock.SchedBlock)1 SchedBlockControlT (alma.xmljbind.test.schedblock.SchedBlockControlT)1 SchedBlockEntityT (alma.xmljbind.test.schedblock.SchedBlockEntityT)1