Search in sources :

Example 1 with PropertyOperations

use of alma.ACS.PropertyOperations in project ACS by ACS-Community.

the class CharacteristicComponentImpl method initialize.

/**
	 * @see alma.acs.component.ComponentLifecycle#initialize(alma.acs.container.ContainerServices)
	 */
public void initialize(ContainerServices containerServices) throws ComponentLifecycleException {
    super.initialize(containerServices);
    try {
        DAL dal = m_containerServices.getCDB();
        // create characteristic model
        // TODO think of error handling; why creating model per instance...
        characteristicModelImpl = new CharacteristicModelImpl("alma/" + m_instanceName, dal);
    } catch (AcsJContainerServicesEx ce) {
        throw new ComponentLifecycleException("Failed to create characteristic model.", ce);
    }
    // create properties list
    properties = new HashMap<PropertyOperations, Servant>();
}
Also used : ComponentLifecycleException(alma.acs.component.ComponentLifecycleException) PropertyOperations(alma.ACS.PropertyOperations) AcsJContainerServicesEx(alma.JavaContainerError.wrappers.AcsJContainerServicesEx) Servant(org.omg.PortableServer.Servant) DAL(com.cosylab.CDB.DAL)

Example 2 with PropertyOperations

use of alma.ACS.PropertyOperations in project ACS by ACS-Community.

the class CharacteristicComponentImpl method descriptor.

/*********************** [ CharacteristicComponent ] ***********************/
/**
	 * NOTE: <code>characteristic_component_ref</code> member of <code>CharacteristicComponentDesc</code> is always set to <code>null</code>.
	 * @see alma.ACS.CharacteristicComponentOperations#descriptor()
	 */
public CharacteristicComponentDesc descriptor() {
    if (characteristicComponentDesc == null) {
        PropertyDesc[] propertyDescriptors = null;
        synchronized (properties) {
            int i = 0;
            propertyDescriptors = new PropertyDesc[properties.size()];
            Iterator<PropertyOperations> iter = properties.keySet().iterator();
            while (iter.hasNext()) propertyDescriptors[i++] = ((PropertyImpl) iter.next()).getPropertyDescriptor();
        }
        // TODO CORBA reference to this component to be set
        characteristicComponentDesc = new CharacteristicComponentDesc(null, m_instanceName, propertyDescriptors, get_all_characteristics());
    }
    return characteristicComponentDesc;
}
Also used : PropertyDesc(alma.ACS.PropertyDesc) PropertyOperations(alma.ACS.PropertyOperations) CharacteristicComponentDesc(alma.ACS.CharacteristicComponentDesc)

Aggregations

PropertyOperations (alma.ACS.PropertyOperations)2 CharacteristicComponentDesc (alma.ACS.CharacteristicComponentDesc)1 PropertyDesc (alma.ACS.PropertyDesc)1 AcsJContainerServicesEx (alma.JavaContainerError.wrappers.AcsJContainerServicesEx)1 ComponentLifecycleException (alma.acs.component.ComponentLifecycleException)1 DAL (com.cosylab.CDB.DAL)1 Servant (org.omg.PortableServer.Servant)1