|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.smackx.Form org.jivesoftware.smackx.pubsub.ConfigureForm
public class ConfigureForm
A decorator for a Form
to easily enable reading and updating
of node configuration. All operations read or update the underlying DataForm
.
Unlike the Form
.setAnswer(XXX)} methods, which throw an exception if the field does not
exist, all ConfigureForm.setXXX methods will create the field in the wrapped form
if it does not already exist.
Field Summary |
---|
Fields inherited from class org.jivesoftware.smackx.Form |
---|
ELEMENT, NAMESPACE, TYPE_CANCEL, TYPE_FORM, TYPE_RESULT, TYPE_SUBMIT |
Constructor Summary | |
---|---|
ConfigureForm(DataForm configDataForm)
Create a decorator from an existing DataForm that has been
retrieved from parsing a node configuration request. |
|
ConfigureForm(Form nodeConfigForm)
Create a decorator from an existing Form for node configuration. |
|
ConfigureForm(FormType formType)
Create a new form for configuring a node. |
Method Summary | |
---|---|
AccessModel |
getAccessModel()
Get the currently configured AccessModel , null if it is not set. |
java.lang.String |
getBodyXSLT()
Returns the URL of an XSL transformation which can be applied to payloads in order to generate an appropriate message body element. |
java.util.Iterator<java.lang.String> |
getChildren()
The id's of the child nodes associated with a collection node (both leaf and collection). |
ChildrenAssociationPolicy |
getChildrenAssociationPolicy()
Returns the policy that determines who may associate children with the node. |
java.util.Iterator<java.lang.String> |
getChildrenAssociationWhitelist()
Iterator of JID's that are on the whitelist that determines who can associate child nodes with the collection node. |
int |
getChildrenMax()
Gets the maximum number of child nodes that can be associated with the collection node. |
java.lang.String |
getCollection()
Gets the collection node which the node is affiliated with. |
java.lang.String |
getDataformXSLT()
Gets 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. |
java.lang.String |
getDataType()
The type of node data, usually specified by the namespace of the payload (if any). |
ItemReply |
getItemReply()
Determines who should get replies to items |
int |
getMaxItems()
Gets the maximum number of items to persisted to this node if isPersistItems() is
true. |
int |
getMaxPayloadSize()
Gets the maximum payload size in bytes. |
NodeType |
getNodeType()
Gets the node type |
PublishModel |
getPublishModel()
Gets the publishing model for the node, which determines who may publish to it. |
java.util.Iterator<java.lang.String> |
getReplyRoom()
Iterator over the multi user chat rooms that are specified as reply rooms. |
java.util.Iterator<java.lang.String> |
getReplyTo()
Gets the specific JID's for reply to. |
java.util.Iterator<java.lang.String> |
getRosterGroupsAllowed()
Gets the roster groups that are allowed to subscribe and retrieve items. |
java.lang.String |
getTitle()
Gets the human readable node title. |
boolean |
isDeliverPayloads()
Does the node deliver payloads with event notifications. |
boolean |
isNotifyConfig()
Determines if subscribers should be notified when the configuration changes. |
boolean |
isNotifyDelete()
Determines whether subscribers should be notified when the node is deleted. |
boolean |
isNotifyRetract()
Determines whether subscribers should be notified when items are deleted from the node. |
boolean |
isPersistItems()
Determines whether items should be persisted in the node. |
boolean |
isPresenceBasedDelivery()
Determines whether to deliver notifications to available users only. |
boolean |
isSubscibe()
Determines if subscriptions are allowed. |
void |
setAccessModel(AccessModel accessModel)
Sets the value of access model. |
void |
setBodyXSLT(java.lang.String bodyXslt)
Set the URL of an XSL transformation which can be applied to payloads in order to generate an appropriate message body element. |
void |
setChildren(java.util.List<java.lang.String> children)
Set the list of child node ids that are associated with a collection node. |
void |
setChildrenAssociationPolicy(ChildrenAssociationPolicy policy)
Sets the policy that determines who may associate children with the node. |
void |
setChildrenAssociationWhitelist(java.util.List<java.lang.String> whitelist)
Set the JID's in the whitelist of users that can associate child nodes with the collection node. |
void |
setChildrenMax(int max)
Set the maximum number of child nodes that can be associated with a collection node. |
void |
setCollection(java.lang.String collection)
Sets the collection node which the node is affiliated with. |
void |
setDataformXSLT(java.lang.String url)
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. |
void |
setDataType(java.lang.String type)
Sets the type of node data, usually specified by the namespace of the payload (if any). |
void |
setDeliverPayloads(boolean deliver)
Sets whether the node will deliver payloads with event notifications. |
void |
setItemReply(ItemReply reply)
Sets who should get the replies to items |
void |
setMaxItems(int max)
Set the maximum number of items to persisted to this node if isPersistItems() is
true. |
void |
setMaxPayloadSize(int max)
Sets the maximum payload size in bytes |
void |
setNodeType(NodeType type)
Sets the node type |
void |
setNotifyConfig(boolean notify)
Sets whether subscribers should be notified when the configuration changes. |
void |
setNotifyDelete(boolean notify)
Sets whether subscribers should be notified when the node is deleted. |
void |
setNotifyRetract(boolean notify)
Sets whether subscribers should be notified when items are deleted from the node. |
void |
setPersistentItems(boolean persist)
Sets whether items should be persisted in the node. |
void |
setPresenceBasedDelivery(boolean presenceBased)
Sets whether to deliver notifications to available users only. |
void |
setPublishModel(PublishModel publish)
Sets the publishing model for the node, which determines who may publish to it. |
void |
setReplyRoom(java.util.List<java.lang.String> replyRooms)
Sets the multi user chat rooms that are specified as reply rooms. |
void |
setReplyTo(java.util.List<java.lang.String> replyTos)
Sets the specific JID's for reply to. |
void |
setRosterGroupsAllowed(java.util.List<java.lang.String> groups)
Sets the roster groups that are allowed to subscribe and retrieve items. |
void |
setSubscribe(boolean subscribe)
Sets whether subscriptions are allowed. |
void |
setTitle(java.lang.String title)
Sets a human readable title for the node. |
java.lang.String |
toString()
|
Methods inherited from class org.jivesoftware.smackx.Form |
---|
addField, createAnswerForm, getDataFormToSend, getField, getFields, getFormFrom, getInstructions, getType, setAnswer, setAnswer, setAnswer, setAnswer, setAnswer, setAnswer, setAnswer, setDefaultAnswer, setInstructions |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ConfigureForm(DataForm configDataForm)
DataForm
that has been
retrieved from parsing a node configuration request.
configDataForm
- public ConfigureForm(Form nodeConfigForm)
Form
for node configuration.
Typically, this can be used to create a decorator for an answer form
by using the result of Form.createAnswerForm()
as the input parameter.
nodeConfigForm
- public ConfigureForm(FormType formType)
PubSubManager.createNode(String, Form)
, since
configuration of an existing node is typically accomplished by calling Node.getNodeConfiguration()
and
using the resulting form to create a answer form. See ConfigureForm(Form)
.
formType
- Method Detail |
---|
public AccessModel getAccessModel()
AccessModel
, null if it is not set.
AccessModel
public void setAccessModel(AccessModel accessModel)
accessModel
- public java.lang.String getBodyXSLT()
public void setBodyXSLT(java.lang.String bodyXslt)
bodyXslt
- The URL of an XSLpublic java.util.Iterator<java.lang.String> getChildren()
public void setChildren(java.util.List<java.lang.String> children)
children
- public ChildrenAssociationPolicy getChildrenAssociationPolicy()
public void setChildrenAssociationPolicy(ChildrenAssociationPolicy policy)
policy
- The policy being setpublic java.util.Iterator<java.lang.String> getChildrenAssociationWhitelist()
getChildrenAssociationPolicy()
is set to
ChildrenAssociationPolicy.whitelist
.
public void setChildrenAssociationWhitelist(java.util.List<java.lang.String> whitelist)
getChildrenAssociationPolicy()
is set to
ChildrenAssociationPolicy.whitelist
.
whitelist
- The list of JID'spublic int getChildrenMax()
public void setChildrenMax(int max)
max
- The maximum number of child nodes.public java.lang.String getCollection()
public void setCollection(java.lang.String collection)
collection
- The node id of the collection nodepublic java.lang.String getDataformXSLT()
public void setDataformXSLT(java.lang.String url)
url
- The URL of an XSL transformationpublic boolean isDeliverPayloads()
public void setDeliverPayloads(boolean deliver)
deliver
- true if the payload will be delivered, false otherwisepublic ItemReply getItemReply()
public void setItemReply(ItemReply reply)
reply
- Defines who should get the replypublic int getMaxItems()
isPersistItems()
is
true.
public void setMaxItems(int max)
isPersistItems()
is
true.
max
- The maximum number of items to persistpublic int getMaxPayloadSize()
public void setMaxPayloadSize(int max)
max
- The maximum payload sizepublic NodeType getNodeType()
public void setNodeType(NodeType type)
type
- The node typepublic boolean isNotifyConfig()
public void setNotifyConfig(boolean notify)
notify
- true if subscribers should be notified, false otherwisepublic boolean isNotifyDelete()
public void setNotifyDelete(boolean notify)
notify
- true if subscribers should be notified, false otherwisepublic boolean isNotifyRetract()
public void setNotifyRetract(boolean notify)
notify
- true if subscribers should be notified, false otherwisepublic boolean isPersistItems()
public void setPersistentItems(boolean persist)
persist
- true if items should be persisted, false otherwisepublic boolean isPresenceBasedDelivery()
public void setPresenceBasedDelivery(boolean presenceBased)
presenceBased
- true if user must be available, false otherwisepublic PublishModel getPublishModel()
public void setPublishModel(PublishModel publish)
publish
- The enum representing the possible options for the publishing modelpublic java.util.Iterator<java.lang.String> getReplyRoom()
public void setReplyRoom(java.util.List<java.lang.String> replyRooms)
replyRooms
- The multi user chat room to use as reply roomspublic java.util.Iterator<java.lang.String> getReplyTo()
public void setReplyTo(java.util.List<java.lang.String> replyTos)
replyTos
- The JID's to reply topublic java.util.Iterator<java.lang.String> getRosterGroupsAllowed()
public void setRosterGroupsAllowed(java.util.List<java.lang.String> groups)
groups
- The roster groupspublic boolean isSubscibe()
public void setSubscribe(boolean subscribe)
subscribe
- true if they are, false otherwisepublic java.lang.String getTitle()
getTitle
in class Form
public void setTitle(java.lang.String title)
setTitle
in class Form
title
- The node titlepublic java.lang.String getDataType()
public void setDataType(java.lang.String type)
type
- The type of node datapublic java.lang.String toString()
toString
in class java.lang.Object
|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |