public List<ValidationError> validate() { List<ValidationError> errors = new ArrayList<>(); if (getName() == null || getName().length() == 0) { errors.add(new ValidationError( getClass(), "name", "StateVariable without name of: " + getService() )); } else if (!ModelUtil.isValidUDAName(getName())) { log.warning("UPnP specification violation of: " + getService().getDevice()); log.warning("Invalid state variable name: " + this); } errors.addAll(getTypeDetails().validate()); return errors; }
@Override public void onQueryStateVariable(StateVariable stateVar) { Action action = stateVar.getService().getQueryStateVariableAction(); actionInvocationRequestEvent.fire(new InvokeAction( action, new ActionArgumentValue( action.getInputArgument(QueryStateVariableAction.INPUT_ARG_VAR_NAME), stateVar.getName() // The literal variable name is the argument ) )); }
stateVariable.getService().getManager().execute(cmd); return new StateVariableValue(stateVariable, cmd.result);
public List<ValidationError> validate() { List<ValidationError> errors = new ArrayList(); if (getName() == null || getName().length() == 0) { errors.add(new ValidationError( getClass(), "name", "StateVariable without name of: " + getService() )); } else if (!ModelUtil.isValidUDAName(getName())) { log.warning("UPnP specification violation of: " + getService().getDevice()); log.warning("Invalid state variable name: " + this); } errors.addAll(getTypeDetails().validate()); return errors; }
stateVariable.getService().getManager().execute(cmd); return new StateVariableValue(stateVariable, cmd.result);
public List<ValidationError> validate() { List<ValidationError> errors = new ArrayList<>(); if (getName() == null || getName().length() == 0) { errors.add(new ValidationError( getClass(), "name", "StateVariable without name of: " + getService() )); } else if (!ModelUtil.isValidUDAName(getName())) { log.warning("UPnP specification violation of: " + getService().getDevice()); log.warning("Invalid state variable name: " + this); } errors.addAll(getTypeDetails().validate()); return errors; }
stateVariable.getService().getManager().execute(cmd); return new StateVariableValue(stateVariable, cmd.result);