@Override public String getFileName(final Property context) { String _name = context.getName(); String _plus = ("GetThingShadowLambda_" + _name); return (_plus + ".js"); }
public static boolean isEventable(Property property, FunctionBlock fb) { if (findEventByName(property.getName(), fb) != null) { return true; } return false; }
public static boolean isReadable(Property property, FunctionBlock fb) { String getterName = GETTER_PREFIX + property.getName(); if (findOperationByName(getterName, fb) != null) { return true; } return false; }
public static boolean isWritable(Property property, FunctionBlock fb) { String setterName = SETTER_PREFIX + property.getName(); if (findOperationByName(setterName, fb) != null) { return true; } return false; }
public static boolean isWritable(Property property, FunctionBlock fb) { String setterName = SETTER_PREFIX + property.getName(); if (findOperationByName(setterName,fb) != null) { return true; } return false; }
public static boolean isEventable(Property property, FunctionBlock fb) { if (findEventByName(property.getName(), fb) !=null) { return true; } return false; }
public void checkDuplicatedProperty(final List<Property> props) { HashSet<String> set = new HashSet<String>(); for (final Property pp : props) { String _name = pp.getName(); boolean _add = set.add(_name); boolean _not = (!_add); if (_not) { this.error(DatatypeSystemMessage.ERROR_DUPLICATED_PROPERTY_NAME, pp, DatatypePackage.Literals.PROPERTY__NAME); } } }
public static boolean isReadable(Property property, FunctionBlock fb) { String getterName = GETTER_PREFIX + property.getName(); if (findOperationByName(getterName,fb) != null) { return true; } return false; }
public static boolean isWritable(Property property, FunctionBlock fb) { String setterName = SETTER_PREFIX + property.getName(); return findOperationByName(setterName, fb) != null; }
public static boolean isReadable(Property property, FunctionBlock fb) { String getterName = GETTER_PREFIX + property.getName(); return findOperationByName(getterName, fb) != null; }
public static boolean isWritable(Property property, FunctionBlock fb) { String setterName = SETTER_PREFIX + property.getName(); return findOperationByName(setterName, fb) != null; }
public static boolean isReadable(Property property, FunctionBlock fb) { String getterName = GETTER_PREFIX + property.getName(); return findOperationByName(getterName, fb) != null; }
@Check public void checkPropertyName(final Property property) { String name = property.getName(); boolean _endsWith = name.endsWith("TS"); if (_endsWith) { this.error(DatatypeSystemMessage.ERROR_PROPNAME_SUFFIX_TS, property, DatatypePackage.Literals.PROPERTY__NAME); } } }
protected CharSequence getDefaultCommand(final Property property) { StringConcatenation _builder = new StringConcatenation(); _builder.append("get "); String _name = property.getName(); _builder.append(_name, ""); _builder.append(" status"); return _builder; } }
private void generateForProperty(Property property, IGeneratedWriter outputter) { if(property.getType() != null && property.getType() instanceof PrimitivePropertyType){ new JavaFBPropertyPrimitiveParamWrapperGeneratorTask( property.getName() + COAP_PRIM_TYPE_WRAPPER_SUFFIX, JAVA_FILE_EXTENSION, primitiveTypeWrapperTargetPath, PRIMITIVE_TYPE_WRAPPER_PACKAGE) .generate(property, null, outputter); } }
private void generateForProperty(Property property, IGeneratedWriter outputter) { if(property.getType() != null && property.getType() instanceof PrimitivePropertyType){ new JavaFBPropertyPrimitiveParamWrapperGeneratorTask( property.getName() + COAP_PRIM_TYPE_WRAPPER_SUFFIX, JAVA_FILE_EXTENSION, primitiveTypeWrapperTargetPath, PRIMITIVE_TYPE_WRAPPER_PACKAGE) .generate(property, null, outputter); } }
private void generateFault(InvocationContext context, String jsonFileExt, IGeneratedWriter outputter, String stateTargetPath, Fault fault) { if (fault != null) { generateTask(fault, context, outputter, ValidationTaskFactory.getPropertiesFaultValidationTask(jsonFileExt, stateTargetPath)); for (Property property : fault.getProperties()) { generateTask(property, context, outputter, ValidationTaskFactory.getPropertiesSinglePropertyValidationTask( "-fault-" + property.getName() + jsonFileExt, stateTargetPath)); } } }
protected CharSequence getDefaultCommand(final String functionblockPropertyName, final Property property) { StringConcatenation _builder = new StringConcatenation(); _builder.append("get "); _builder.append(functionblockPropertyName, ""); _builder.append(" "); String _name = property.getName(); _builder.append(_name, ""); return _builder; } }
private void generateConfiguration(InvocationContext context, String jsonFileExt, IGeneratedWriter outputter, String stateTargetPath, Configuration configuration) { if (configuration != null) { generateTask(configuration, context, outputter, ValidationTaskFactory.getPropertiesConfigValidationTask(jsonFileExt, stateTargetPath)); for (Property property : configuration.getProperties()) { generateTask(property, context, outputter, ValidationTaskFactory.getPropertiesSinglePropertyValidationTask( "-configuration-" + property.getName() + jsonFileExt, stateTargetPath)); } } }
private void generateStatus(InvocationContext context, String jsonFileExt, IGeneratedWriter outputter, String stateTargetPath, Status status) { if (status != null) { generateTask(status, context, outputter, ValidationTaskFactory.getPropertiesStatusValidationTask(jsonFileExt, stateTargetPath)); for (Property property : status.getProperties()) { generateTask(property, context, outputter, ValidationTaskFactory.getPropertiesSinglePropertyValidationTask( "-status-" + property.getName() + jsonFileExt, stateTargetPath)); } } }