use of alma.demo.XmlComponentJ in project ACS by ACS-Community.
the class XmlComponentHelper method _getInterfaceTranslator.
/**
* @see alma.acs.container.ComponentHelper#_getInterfaceTranslator(java.lang.Object)
*/
protected Object _getInterfaceTranslator(Object defaultInterfaceTranslator) throws AcsJJavaComponentHelperEx {
XmlComponentJ impl = null;
XmlComponentOperations opDelegate = null;
try {
impl = (XmlComponentJ) getComponentImpl();
} catch (AcsJComponentCreationEx e) {
throw new AcsJJavaComponentHelperEx(e);
}
opDelegate = (XmlComponentOperations) defaultInterfaceTranslator;
return new IFTranslator(impl, opDelegate, getComponentLogger());
}
use of alma.demo.XmlComponentJ in project ACS by ACS-Community.
the class XmlComponentClientTest method testOffshootJFromXmlComponentJ.
public void testOffshootJFromXmlComponentJ() throws Exception {
XmlComponentJ xmlComponentJ = getContainerServices().getTransparentXmlWrapper(XmlComponentJ.class, xmlComponent, XmlComponentOperations.class);
assertNotNull(xmlComponentJ);
// The code below is commented since getting the offshootJ from the
// componentJ is not yet supported.
// Once supported, this code should work fine, and the test should pass
/*
XmlOffshootJ shootJ = xmlComponentJ.getOffshoot();
assertNotNull(shootJ);
assertNotNull(shootJ.getObsProposal());
assertNotNull(shootJ.getSchedBlock());
// these values are hardcoded in the m_offshoot implementation
ObsProposal obsProposal = shootJ.getObsProposal();
assertEquals("rtobar", obsProposal.getPI());
assertEquals("2010.0045.34S", obsProposal.getCode());
assertEquals("just for fun", obsProposal.getScientificJustification());
SchedBlock sb = shootJ.getSchedBlock();
assertEquals("holography", sb.getName());
assertEquals("DONE", sb.getStatus());
assertEquals(true, sb.getStandardMode());
// deactivate the m_offshoot on the server-side
xmlComponentJ.deactivateOffshoot();
try {
shootJ.getObsProposal();
fail("m_offshoot should be deactivated, I shouldn't be able to use it");
} catch(org.omg.CORBA.OBJECT_NOT_EXIST e) {}
*/
}
Aggregations