/** * Sets the value of access model. * * @param accessModel */ public void setAccessModel(AccessModel accessModel) { addField(ConfigureNodeFields.access_model, FormField.Type.list_single); setAnswer(ConfigureNodeFields.access_model.getFieldName(), getListSingle(accessModel.toString())); }
/** * Sets the NotificationType for the node. * * @param notificationType The enum representing the possible options * @since 4.3 */ public void setNotificationType(NotificationType notificationType) { addField(ConfigureNodeFields.notification_type, FormField.Type.list_single); setAnswer(ConfigureNodeFields.notification_type.getFieldName(), getListSingle(notificationType.toString())); }
/** * Sets the node type. * * @param type The node type */ public void setNodeType(NodeType type) { addField(ConfigureNodeFields.node_type, FormField.Type.list_single); setAnswer(ConfigureNodeFields.node_type.getFieldName(), getListSingle(type.toString())); }
/** * Sets the URL of an XSL transformation which can be applied to the payload * format in order to generate a valid Data Forms result that the client could * display using a generic Data Forms rendering engine. * * @param url The URL of an XSL transformation */ public void setDataformXSLT(String url) { addField(ConfigureNodeFields.dataform_xslt, FormField.Type.text_single); setAnswer(ConfigureNodeFields.dataform_xslt.getFieldName(), url); }
/** * Sets who should get the replies to items. * * @param reply Defines who should get the reply */ public void setItemReply(ItemReply reply) { addField(ConfigureNodeFields.itemreply, FormField.Type.list_single); setAnswer(ConfigureNodeFields.itemreply.getFieldName(), getListSingle(reply.toString())); }
/** * Sets the publishing model for the node, which determines who may publish to it. * * @param publish The enum representing the possible options for the publishing model */ public void setPublishModel(PublishModel publish) { addField(ConfigureNodeFields.publish_model, FormField.Type.list_single); setAnswer(ConfigureNodeFields.publish_model.getFieldName(), getListSingle(publish.toString())); }
/** * Get the currently configured {@link AccessModel}, null if it is not set. * * @return The current {@link AccessModel} */ public AccessModel getAccessModel() { String value = getFieldValue(ConfigureNodeFields.access_model); if (value == null) return null; else return AccessModel.valueOf(value); }
/** * Returns the policy that determines who may associate children with the node. * * @return The current policy */ public ChildrenAssociationPolicy getChildrenAssociationPolicy() { String value = getFieldValue(ConfigureNodeFields.children_association_policy); if (value == null) return null; else return ChildrenAssociationPolicy.valueOf(value); }
/** * Gets the publishing model for the node, which determines who may publish to it. * * @return The publishing model */ public PublishModel getPublishModel() { String value = getFieldValue(ConfigureNodeFields.publish_model); if (value == null) return null; else return PublishModel.valueOf(value); }
/** * Determines who should get replies to items. * * @return Who should get the reply */ public ItemReply getItemReply() { String value = getFieldValue(ConfigureNodeFields.itemreply); if (value == null) return null; else return ItemReply.valueOf(value); }
/** * Gets the node type. * * @return The node type */ public NodeType getNodeType() { String value = getFieldValue(ConfigureNodeFields.node_type); if (value == null) return null; else return NodeType.valueOf(value); }
/** * Set the maximum number of items to persisted to this node if {@link #isPersistItems()} is * true. * * @param max The maximum number of items to persist */ public void setMaxItems(int max) { addField(ConfigureNodeFields.max_items, FormField.Type.text_single); setAnswer(ConfigureNodeFields.max_items.getFieldName(), max); }
/** * Sets the maximum payload size in bytes. * * @param max The maximum payload size */ public void setMaxPayloadSize(int max) { addField(ConfigureNodeFields.max_payload_size, FormField.Type.text_single); setAnswer(ConfigureNodeFields.max_payload_size.getFieldName(), max); }
/** * Sets the type of node data, usually specified by the namespace of the payload (if any). * * @param type The type of node data */ public void setDataType(String type) { addField(ConfigureNodeFields.type, FormField.Type.text_single); setAnswer(ConfigureNodeFields.type.getFieldName(), type); }
/** * Set the JID's in the whitelist of users that can associate child nodes with the collection * node. This is only relevant if {@link #getChildrenAssociationPolicy()} is set to * {@link ChildrenAssociationPolicy#whitelist}. * * @param whitelist The list of JID's */ public void setChildrenAssociationWhitelist(List<String> whitelist) { addField(ConfigureNodeFields.children_association_whitelist, FormField.Type.jid_multi); setAnswer(ConfigureNodeFields.children_association_whitelist.getFieldName(), whitelist); }
/** * Set the maximum number of child nodes that can be associated with a collection node. * * @param max The maximum number of child nodes. */ public void setChildrenMax(int max) { addField(ConfigureNodeFields.children_max, FormField.Type.text_single); setAnswer(ConfigureNodeFields.children_max.getFieldName(), max); }
/** * Sets whether subscribers should be notified when the node is deleted. * * @param notify true if subscribers should be notified, false otherwise */ public void setNotifyDelete(boolean notify) { addField(ConfigureNodeFields.notify_delete, FormField.Type.bool); setAnswer(ConfigureNodeFields.notify_delete.getFieldName(), notify); }
/** * Sets whether subscribers should be notified when items are deleted * from the node. * * @param notify true if subscribers should be notified, false otherwise */ public void setNotifyRetract(boolean notify) { addField(ConfigureNodeFields.notify_retract, FormField.Type.bool); setAnswer(ConfigureNodeFields.notify_retract.getFieldName(), notify); }
/** * Sets the roster groups that are allowed to subscribe and retrieve items. * * @param groups The roster groups */ public void setRosterGroupsAllowed(List<String> groups) { addField(ConfigureNodeFields.roster_groups_allowed, FormField.Type.list_multi); setAnswer(ConfigureNodeFields.roster_groups_allowed.getFieldName(), groups); }
/** * Sets a human readable title for the node. * * @param title The node title */ @Override public void setTitle(String title) { addField(ConfigureNodeFields.title, FormField.Type.text_single); setAnswer(ConfigureNodeFields.title.getFieldName(), title); }