/** @since 1.8M1 */ public boolean addStaticListField( String fieldName, String fieldPrettyName, int size, boolean multiSelect, boolean relationalStorage, String values, String displayType, String separators) { if (get(fieldName) == null) { StaticListClass list_class = new StaticListClass(); list_class.setName(fieldName); list_class.setPrettyName(fieldPrettyName); list_class.setSize(size); list_class.setMultiSelect(multiSelect); list_class.setRelationalStorage(relationalStorage); list_class.setValues(values); if (displayType != null) { list_class.setDisplayType(displayType); } if (separators != null) { list_class.setSeparators(separators); list_class.setSeparator(separators.substring(0, 1)); } list_class.setObject(this); put(fieldName, list_class); return true; } return false; }
public boolean addBooleanField(String fieldName, String fieldPrettyName, String displayType) { if (get(fieldName) == null) { BooleanClass boolean_class = new BooleanClass(); boolean_class.setName(fieldName); boolean_class.setPrettyName(fieldPrettyName); boolean_class.setDisplayType(displayType); boolean_class.setObject(this); put(fieldName, boolean_class); return true; } return false; }
public boolean addEmailField(String fieldName, String fieldPrettyName, int size) { if (get(fieldName) == null) { EmailClass emailClass = new EmailClass(); emailClass.setName(fieldName); emailClass.setPrettyName(fieldPrettyName); emailClass.setSize(size); emailClass.setObject(this); put(fieldName, emailClass); return true; } return false; }
public boolean addPasswordField(String fieldName, String fieldPrettyName, int size) { if (get(fieldName) == null) { PasswordClass text_class = new PasswordClass(); text_class.setName(fieldName); text_class.setPrettyName(fieldPrettyName); text_class.setSize(size); text_class.setObject(this); put(fieldName, text_class); return true; } return false; }
public boolean addNumberField(String fieldName, String fieldPrettyName, int size, String type) { if (get(fieldName) == null) { NumberClass number_class = new NumberClass(); number_class.setName(fieldName); number_class.setPrettyName(fieldPrettyName); number_class.setSize(size); number_class.setNumberType(type); number_class.setObject(this); put(fieldName, number_class); return true; } return false; }
public boolean addTextAreaField(String fieldName, String fieldPrettyName, int cols, int rows) { if (get(fieldName) == null) { TextAreaClass template_class = new TextAreaClass(); template_class.setName(fieldName); template_class.setPrettyName(fieldPrettyName); template_class.setSize(cols); template_class.setRows(rows); template_class.setObject(this); put(fieldName, template_class); return true; } return false; }
public boolean addGroupsField(String fieldName, String fieldPrettyName, int size) { if (get(fieldName) == null) { GroupsClass groups_class = new GroupsClass(); groups_class.setName(fieldName); groups_class.setPrettyName(fieldPrettyName); groups_class.setSize(size); groups_class.setMultiSelect(true); groups_class.setObject(this); put(fieldName, groups_class); return true; } return false; }
public boolean addLevelsField(String fieldName, String fieldPrettyName, int size) { if (get(fieldName) == null) { LevelsClass levels_class = new LevelsClass(); levels_class.setName(fieldName); levels_class.setPrettyName(fieldPrettyName); levels_class.setSize(size); levels_class.setMultiSelect(true); levels_class.setObject(this); put(fieldName, levels_class); return true; } return false; }
/** @since XWiki Core 1.1.2, XWiki Core 1.2M2 */ public boolean addUsersField( String fieldName, String fieldPrettyName, int size, boolean multiSelect) { if (get(fieldName) == null) { UsersClass users_class = new UsersClass(); users_class.setName(fieldName); users_class.setPrettyName(fieldPrettyName); users_class.setSize(size); users_class.setMultiSelect(multiSelect); users_class.setObject(this); put(fieldName, users_class); return true; } return false; }
public boolean addDateField( String fieldName, String fieldPrettyName, String dformat, int emptyIsToday) { if (get(fieldName) == null) { DateClass date_class = new DateClass(); date_class.setName(fieldName); date_class.setPrettyName(fieldPrettyName); if (dformat != null) { date_class.setDateFormat(dformat); } date_class.setObject(this); date_class.setEmptyIsToday(emptyIsToday); put(fieldName, date_class); return true; } return false; }
/** @since 1.8M1 */ public boolean addDBTreeListField( String fieldName, String fieldPrettyName, int size, boolean multiSelect, boolean relationalStorage, String sql) { if (get(fieldName) == null) { DBTreeListClass list_class = new DBTreeListClass(); list_class.setName(fieldName); list_class.setPrettyName(fieldPrettyName); list_class.setSize(size); list_class.setMultiSelect(multiSelect); list_class.setRelationalStorage(relationalStorage); list_class.setSql(sql); list_class.setObject(this); put(fieldName, list_class); return true; } return false; }