public abstract class AccessModel extends Object
Modifier and Type | Field and Description |
---|---|
static AccessModel |
authorize |
static AccessModel |
open |
static AccessModel |
presence |
static AccessModel |
roster |
static AccessModel |
whitelist |
Constructor and Description |
---|
AccessModel() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
canAccessItems(Node node,
org.xmpp.packet.JID owner,
org.xmpp.packet.JID subscriber)
Returns true if the entity is allowed to get the node published items.
|
abstract boolean |
canSubscribe(Node node,
org.xmpp.packet.JID owner,
org.xmpp.packet.JID subscriber)
Returns true if the entity is allowed to subscribe to the specified node.
|
abstract String |
getName()
Returns the name as defined by the JEP-60 spec.
|
abstract org.xmpp.packet.PacketError.Condition |
getSubsriptionError()
Returns the error condition that should be returned to the subscriber when
subscription is not allowed.
|
abstract org.dom4j.Element |
getSubsriptionErrorDetail()
Returns the error element that should be returned to the subscriber as
error detail when subscription is not allowed.
|
abstract boolean |
isAuthorizationRequired()
Returns true if the new subscription should be authorized by a node owner.
|
static AccessModel |
valueOf(String name)
Returns the specific subclass of AccessModel as specified by the access
model name.
|
public static final AccessModel whitelist
public static final AccessModel open
public static final AccessModel authorize
public static final AccessModel presence
public static final AccessModel roster
public static AccessModel valueOf(String name)
name
- the name of the subsclass.public abstract String getName()
public abstract boolean canSubscribe(Node node, org.xmpp.packet.JID owner, org.xmpp.packet.JID subscriber)
node
- the node that the subscriber is trying to subscribe to.owner
- the JID of the owner of the subscription.subscriber
- the JID of the subscriber.public abstract boolean canAccessItems(Node node, org.xmpp.packet.JID owner, org.xmpp.packet.JID subscriber)
node
- the node that the entity is trying to get the node's items.owner
- the JID of the owner of the subscription.subscriber
- the JID of the subscriber.public abstract org.xmpp.packet.PacketError.Condition getSubsriptionError()
public abstract org.dom4j.Element getSubsriptionErrorDetail()
public abstract boolean isAuthorizationRequired()
Copyright © 2003-2008 Jive Software.