use of org.omg.CORBA.InterfaceDef in project ACS by ACS-Community.
the class ComponentsManager method getComponentProperties.
/**
* Gets a list of properties name from a given component.
* @param componentName string with the component name.
* @return array of strings.
* FIXME: does it have to be case sensitive??
* FIXME: Must handle the exception.
**/
public List<String> getComponentProperties(String componentName) {
List<String> tmp = new ArrayList<String>();
if (componentExists(componentName)) {
try {
ComponentDescriptor desc = cServices.getComponentDescriptor(componentName);
InterfaceDef ifdef = InterfaceDefHelper.narrow(rep.lookup_id(desc.getType()));
if (ifdef == null)
return null;
// begin
/*
FullInterfaceDescription ifdes = ifdef.describe_interface();
for(int i = 0 ; i < ifdes.attributes.length ; i++){
TypeCode tc = ifdes.attributes[i].type;
if(tc.kind() != TCKind.tk_objref)
continue;
InterfaceDef tcdef = InterfaceDefHelper.narrow(rep.lookup_id(tc.id()));
if(tc.kind() == TCKind.tk_objref && tcdef.is_a(IDL_PROPERTY))
tmp.add(ifdes.attributes[i].name);
}
//end
*/
tmp = getComponentProperties(ifdef);
} catch (Exception e) {
e.printStackTrace();
}
}
return tmp;
}
use of org.omg.CORBA.InterfaceDef in project wildfly by wildfly.
the class ValueDefImpl method allDone.
public void allDone() throws IRConstructionException {
getReference();
delegate.allDone();
if (baseValueTypeCode != null && baseValueTypeCode.kind() != TCKind.tk_null) {
try {
baseValue = baseValueTypeCode.id();
} catch (BadKind ex) {
throw IIOPLogger.ROOT_LOGGER.badKindForSuperValueType(id());
}
Contained c = repository.lookup_id(baseValue);
base_value_ref = ValueDefHelper.narrow(c);
} else
// TODO: is this right?
baseValue = "IDL:omg.org/CORBA/ValueBase:1.0";
// Resolve supported interfaces
supported_interfaces_ref = new InterfaceDef[supported_interfaces.length];
for (int i = 0; i < supported_interfaces.length; ++i) {
InterfaceDef iDef = InterfaceDefHelper.narrow(repository.lookup_id(supported_interfaces[i]));
if (iDef == null)
throw IIOPLogger.ROOT_LOGGER.errorResolvingRefToImplementedInterface(id(), supported_interfaces[i]);
supported_interfaces_ref[i] = iDef;
}
// Resolve abstract base valuetypes
abstract_base_valuetypes_ref = new ValueDef[abstract_base_valuetypes.length];
for (int i = 0; i < abstract_base_valuetypes.length; ++i) {
ValueDef vDef = ValueDefHelper.narrow(repository.lookup_id(abstract_base_valuetypes[i]));
if (vDef == null)
throw IIOPLogger.ROOT_LOGGER.errorResolvingRefToAbstractValuetype(id(), abstract_base_valuetypes[i]);
abstract_base_valuetypes_ref[i] = vDef;
}
}
Aggregations