public boolean hasArguments() { return getArguments() != null && getArguments().length > 0; }
@Override public String toString() { return "(" + getClass().getSimpleName() + ", Arguments: " + (getArguments() != null ? getArguments().length : "NO ARGS") + ") " + getName(); }
public Action<S> deepCopy() { ActionArgument<S>[] actionArgumentsDupe = new ActionArgument[getArguments().length]; for (int i = 0; i < getArguments().length; i++) { ActionArgument arg = getArguments()[i]; actionArgumentsDupe[i] = arg.deepCopy(); } return new Action<>( getName(), actionArgumentsDupe ); }
setPreferredSize(new Dimension(450, (action.getArguments().length *40) + 120)); pack(); setVisible(true);
private void generateAction(Action action, Document descriptor, Element actionListElement) { Element actionElement = appendNewElement(descriptor, actionListElement, ELEMENT.action); appendNewElementIfNotNull(descriptor, actionElement, ELEMENT.name, action.getName()); if (action.hasArguments()) { Element argumentListElement = appendNewElement(descriptor, actionElement, ELEMENT.argumentList); for (ActionArgument actionArgument : action.getArguments()) { generateActionArgument(actionArgument, descriptor, argumentListElement); } } }
for (ActionArgument actionArgument : getArguments()) { int retValueArgumentIndex = 0; int i = 0; for (ActionArgument actionArgument : getArguments()) { ActionArgument a = getArguments()[j]; if (a.getDirection() == ActionArgument.Direction.OUT) { log.warning("UPnP specification violation of: " + getService().getDevice());
public boolean hasArguments() { return getArguments() != null && getArguments().length > 0; }
int numOfArguments = nodeAction.getArguments().length; setToolTipText(numOfArguments + " argument" + (numOfArguments > 1 ? "s" : "")); setText(nodeAction.getName());
@Override public String toString() { return "(" + getClass().getSimpleName() + ", Arguments: " + (getArguments() != null ? getArguments().length : "NO ARGS") + ") " + getName(); }
public Action<S> deepCopy() { ActionArgument<S>[] actionArgumentsDupe = new ActionArgument[getArguments().length]; for (int i = 0; i < getArguments().length; i++) { ActionArgument arg = getArguments()[i]; actionArgumentsDupe[i] = arg.deepCopy(); } return new Action<S>( getName(), actionArgumentsDupe ); }
for (ActionArgument actionArgument : action.getArguments()) { DefaultMutableTreeNode actionArgumentNode = new DefaultMutableTreeNode(actionArgument); actionNode.add(actionArgumentNode);
for (ActionArgument actionArgument : getArguments()) { int retValueArgumentIndex = 0; int i = 0; for (ActionArgument actionArgument : getArguments()) { ActionArgument a = getArguments()[j]; if (a.getDirection() == ActionArgument.Direction.OUT) { log.warning("UPnP specification violation of: " + getService().getDevice());
private void generateAction(Action action, Document descriptor, Element actionListElement) { Element actionElement = appendNewElement(descriptor, actionListElement, ELEMENT.action); appendNewElementIfNotNull(descriptor, actionElement, ELEMENT.name, action.getName()); if (action.hasArguments()) { Element argumentListElement = appendNewElement(descriptor, actionElement, ELEMENT.argumentList); for (ActionArgument actionArgument : action.getArguments()) { generateActionArgument(actionArgument, descriptor, argumentListElement); } } }
public boolean hasArguments() { return getArguments() != null && getArguments().length > 0; }
@Override public String toString() { return "(" + getClass().getSimpleName() + ", Arguments: " + (getArguments() != null ? getArguments().length : "NO ARGS") + ") " + getName(); }
public Action<S> deepCopy() { ActionArgument<S>[] actionArgumentsDupe = new ActionArgument[getArguments().length]; for (int i = 0; i < getArguments().length; i++) { ActionArgument arg = getArguments()[i]; actionArgumentsDupe[i] = arg.deepCopy(); } return new Action<>( getName(), actionArgumentsDupe ); }
private ActionArgumentValue<RemoteService>[] getArguments(final Action<RemoteService> action) { @SuppressWarnings("unchecked") final ActionArgument<RemoteService>[] actionArguments = action.getArguments(); final Map<String, Object> argumentValues = getArgumentValues(); final List<ActionArgumentValue<RemoteService>> actionArgumentValues = new ArrayList<>(actionArguments.length); for (final ActionArgument<RemoteService> actionArgument : actionArguments) { if (actionArgument.getDirection() == Direction.IN) { final Object value = argumentValues.get(actionArgument.getName()); logger.trace("Action {}: add arg value for {}: {} (expected datatype: {})", action.getName(), actionArgument, value, actionArgument.getDatatype().getDisplayString()); actionArgumentValues.add(new ActionArgumentValue<>(actionArgument, value)); } } @SuppressWarnings("unchecked") final ActionArgumentValue<RemoteService>[] array = actionArgumentValues.toArray(new ActionArgumentValue[0]); return array; } }
private void generateAction(Action action, Document descriptor, Element actionListElement) { Element actionElement = appendNewElement(descriptor, actionListElement, ELEMENT.action); appendNewElementIfNotNull(descriptor, actionElement, ELEMENT.name, action.getName()); if (action.hasArguments()) { Element argumentListElement = appendNewElement(descriptor, actionElement, ELEMENT.argumentList); for (ActionArgument actionArgument : action.getArguments()) { generateActionArgument(actionArgument, descriptor, argumentListElement); } } }
for (ActionArgument actionArgument : getArguments()) { int retValueArgumentIndex = 0; int i = 0; for (ActionArgument actionArgument : getArguments()) { ActionArgument a = getArguments()[j]; if (a.getDirection() == ActionArgument.Direction.OUT) { log.warning("UPnP specification violation of: " + getService().getDevice());