protected V valueOf(String s) throws InvalidValueException { return (V)getDatatype().valueOf(s); }
protected List parseString(String s) throws InvalidValueException { String[] strings = ModelUtil.fromCommaSeparatedList(s); List values = new ArrayList<>(); for (String string : strings) { values.add(datatype.getDatatype().valueOf(string)); } return values; }
protected Container createContainer(Attributes attributes) { Container container = new Container(); container.setId(attributes.getValue("id")); container.setParentID(attributes.getValue("parentID")); if ((attributes.getValue("childCount") != null)) container.setChildCount(Integer.valueOf(attributes.getValue("childCount"))); try { Boolean value = (Boolean) Datatype.Builtin.BOOLEAN.getDatatype().valueOf( attributes.getValue("restricted") ); if (value != null) container.setRestricted(value); value = (Boolean) Datatype.Builtin.BOOLEAN.getDatatype().valueOf( attributes.getValue("searchable") ); if (value != null) container.setSearchable(value); } catch (Exception ex) { // Ignore } return container; }
protected Item createItem(Attributes attributes) { Item item = new Item(); item.setId(attributes.getValue("id")); item.setParentID(attributes.getValue("parentID")); try { Boolean value = (Boolean)Datatype.Builtin.BOOLEAN.getDatatype().valueOf( attributes.getValue("restricted") ); if (value != null) item.setRestricted(value); } catch (Exception ex) { // Ignore } if ((attributes.getValue("refID") != null)) item.setRefID(attributes.getValue("refID")); return item; }
protected String createDefaultValue(Datatype datatype) throws LocalServiceBindingException { // Next, the default value of the state variable, first the declared one if (getAnnotation().defaultValue().length() != 0) { // The declared default value needs to match the datatype try { datatype.valueOf(getAnnotation().defaultValue()); log.finer("Found state variable default value: " + getAnnotation().defaultValue()); return getAnnotation().defaultValue(); } catch (Exception ex) { throw new LocalServiceBindingException( "Default value doesn't match datatype of state variable '" + getName() + "': " + ex.getMessage() ); } } return null; }
this.value = value instanceof String ? datatype.valueOf((String) value) : value;
protected V valueOf(String s) throws InvalidValueException { return (V)getDatatype().valueOf(s); }
protected List parseString(String s) throws InvalidValueException { String[] strings = ModelUtil.fromCommaSeparatedList(s); List values = new ArrayList(); for (String string : strings) { values.add(datatype.getDatatype().valueOf(string)); } return values; }
protected Container createContainer(Attributes attributes) { Container container = new Container(); container.setId(attributes.getValue("id")); container.setParentID(attributes.getValue("parentID")); if ((attributes.getValue("childCount") != null)) container.setChildCount(Integer.valueOf(attributes.getValue("childCount"))); try { Boolean value = (Boolean)Datatype.Builtin.BOOLEAN.getDatatype().valueOf( attributes.getValue("restricted") ); if (value != null) container.setRestricted(value); value = (Boolean)Datatype.Builtin.BOOLEAN.getDatatype().valueOf( attributes.getValue("searchable") ); if (value != null) container.setSearchable(value); } catch (Exception ex) { // Ignore } return container; }
protected Item createItem(Attributes attributes) { Item item = new Item(); item.setId(attributes.getValue("id")); item.setParentID(attributes.getValue("parentID")); try { Boolean value = (Boolean)Datatype.Builtin.BOOLEAN.getDatatype().valueOf( attributes.getValue("restricted") ); if (value != null) item.setRestricted(value); } catch (Exception ex) { // Ignore } if ((attributes.getValue("refID") != null)) item.setRefID(attributes.getValue("refID")); return item; }
protected String createDefaultValue(Datatype datatype) throws LocalServiceBindingException { // Next, the default value of the state variable, first the declared one if (getAnnotation().defaultValue().length() != 0) { // The declared default value needs to match the datatype try { datatype.valueOf(getAnnotation().defaultValue()); log.finer("Found state variable default value: " + getAnnotation().defaultValue()); return getAnnotation().defaultValue(); } catch (Exception ex) { throw new LocalServiceBindingException( "Default value doesn't match datatype of state variable '" + getName() + "': " + ex.getMessage() ); } } return null; }
this.value = value instanceof String ? datatype.valueOf((String) value) : value;
protected V valueOf(String s) throws InvalidValueException { return (V)getDatatype().valueOf(s); }
protected List parseString(String s) throws InvalidValueException { String[] strings = ModelUtil.fromCommaSeparatedList(s); List values = new ArrayList<>(); for (String string : strings) { values.add(datatype.getDatatype().valueOf(string)); } return values; }
protected Container createContainer(Attributes attributes) { Container container = new Container(); container.setId(attributes.getValue("id")); container.setParentID(attributes.getValue("parentID")); if ((attributes.getValue("childCount") != null)) container.setChildCount(Integer.valueOf(attributes.getValue("childCount"))); try { Boolean value = (Boolean) Datatype.Builtin.BOOLEAN.getDatatype().valueOf( attributes.getValue("restricted") ); if (value != null) container.setRestricted(value); value = (Boolean) Datatype.Builtin.BOOLEAN.getDatatype().valueOf( attributes.getValue("searchable") ); if (value != null) container.setSearchable(value); } catch (Exception ex) { // Ignore } return container; }
protected Item createItem(Attributes attributes) { Item item = new Item(); item.setId(attributes.getValue("id")); item.setParentID(attributes.getValue("parentID")); try { Boolean value = (Boolean)Datatype.Builtin.BOOLEAN.getDatatype().valueOf( attributes.getValue("restricted") ); if (value != null) item.setRestricted(value); } catch (Exception ex) { // Ignore } if ((attributes.getValue("refID") != null)) item.setRefID(attributes.getValue("refID")); return item; }
protected String createDefaultValue(Datatype datatype) throws LocalServiceBindingException { // Next, the default value of the state variable, first the declared one if (getAnnotation().defaultValue().length() != 0) { // The declared default value needs to match the datatype try { datatype.valueOf(getAnnotation().defaultValue()); log.finer("Found state variable default value: " + getAnnotation().defaultValue()); return getAnnotation().defaultValue(); } catch (Exception ex) { throw new LocalServiceBindingException( "Default value doesn't match datatype of state variable '" + getName() + "': " + ex.getMessage() ); } } return null; }
this.value = value instanceof String ? datatype.valueOf((String) value) : value;