use of si.ijs.acs.objectexplorer.engine.Operation in project ACS by ACS-Community.
the class BACIIntrospector method destroyInvocation.
/**
* Insert the method's description here.
* Creation date: (7.11.2000 21:47:04)
* @param invoc si.ijs.acs.objectexplorer.engine.Invocation[]
*/
public static void destroyInvocation(BACIInvocation invoc) {
if (invoc == null)
throw new NullPointerException("invoc");
if (invoc.isDestroyed())
return;
Operation[] ops = invoc.getOperations();
Operation dest = null;
for (int i = 0; i < ops.length; i++) {
if (METHOD_DESTROY.equals(ops[i].getName())) {
dest = ops[i];
if (dest.getParameterTypes().length != 0)
throw new IntrospectionInconsistentException("Operation " + METHOD_DESTROY + "' on a 'Subscription' instance '" + invoc + "' must take exactly 0 parameters.");
break;
}
}
if (dest == null)
throw new IntrospectionInconsistentException("'Subscription' instance for invocation '" + invoc + "' does not declare a 'destroy()' method.");
invoc.ra.invoke(invoc, (BACIOperation) dest, new java.lang.Object[0], null);
}
use of si.ijs.acs.objectexplorer.engine.Operation in project ACS by ACS-Community.
the class RemoteResponseWindow method remoteResponseWindow_Initialize.
/**
* Comment
*/
public void remoteResponseWindow_Initialize() {
getReportArea().getPopup().add(getJCheckBoxMenuItem1());
getJTextField1().setText(Integer.toString(maxLines));
if (rr != null && rr.getInvocation().isControllable()) {
DefaultListModel model = new DefaultListModel();
Operation[] ops = rr.getInvocation().getOperations();
for (int i = 0; i < ops.length; i++) {
model.addElement(ops[i]);
}
getoperationsList().setModel(model);
getoperationsList().revalidate();
}
// allow window to be closed, since it is not controllable
if (rr != null && !rr.getInvocation().isControllable()) {
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
}
return;
}
use of si.ijs.acs.objectexplorer.engine.Operation in project ACS by ACS-Community.
the class ListsHandlerBean method clickedItem.
/**
* Insert the method's description here.
* Creation date: (11/14/00 6:51:28 PM)
*/
synchronized void clickedItem(Object item) {
if (item == null)
return;
try {
if (item instanceof Operation) {
Operation op = (Operation) item;
notifier.reportDebug("ListsHandlerBean::clickItem", "Operation '" + op + "' clicked.");
boolean[] mask = op.getMask();
boolean isUserInput = false;
for (int i = 0; i < mask.length; i++) if (mask[i])
isUserInput = true;
if (isUserInput || !isConfirmed()) {
CallMethodDialog cmd = new CallMethodDialog(op, (JFrame) panel.getTopLevelAncestor(), true, notifier, this);
cmd.show();
} else {
invokeOperation(op, new Object[mask.length]);
}
} else if (item instanceof Attribute) {
Attribute attr = (Attribute) item;
notifier.reportDebug("ListsHandlerBean::clickItem", "Attribute '" + attr + "' accessor clicked.");
if (attr.isReadOnly()) {
invokeOperation(attr, null);
} else {
notifier.reportMessage("Read only attributes supported only");
invokeOperation(attr, null);
}
}
} catch (Exception e) {
handleException("ListsHandler clickItem", e);
}
}
use of si.ijs.acs.objectexplorer.engine.Operation in project ACS by ACS-Community.
the class RemoteResponseWindow method jList2_MouseClicked.
/**
* Comment
*/
public void jList2_MouseClicked(java.awt.event.MouseEvent mouseEvent) {
//if ((mouseEvent.getClickCount() == 2)
if ((mouseEvent.getClickCount() == 1) && (mouseEvent.getModifiers() == InputEvent.BUTTON1_MASK)) {
if (getoperationsList().locationToIndex(new java.awt.Point(10, mouseEvent.getY())) == -1)
return;
Operation op = (Operation) getoperationsList().getSelectedValue();
boolean doParams = false;
boolean[] mask = op.getMask();
if (op.getParameterTypes().length != 0) {
for (int i = 0; i < mask.length; i++) {
if (mask[i]) {
doParams = true;
break;
}
}
}
if (doParams)
new CallMethodDialog(op, this, true, notifier, this).setVisible(true);
else
invokeOperation(op, new Object[op.getParameterTypes().length]);
}
return;
}
Aggregations