Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.8.2 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jivesoftware.openfire.pubsub.models
Class WhitelistAccess

    java.lang.Object
      org.jivesoftware.openfire.pubsub.models.AccessModel
          org.jivesoftware.openfire.pubsub.models.WhitelistAccess

    public class WhitelistAccess

extends AccessModel

Only those on a whitelist may subscribe and retrieve items.

Author:
  Matt Tucker

Field Summary

Fields inherited from class org.jivesoftware.openfire.pubsub.models.AccessModel
`authorize, open, presence, roster, whitelist`

Method Summary
`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.
`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.
`String` | `getName()` Returns the name as defined by the JEP-60 spec.
`org.xmpp.packet.PacketError.Condition` | `getSubsriptionError()` Returns the error condition that should be returned to the subscriber when subscription is not allowed.
`org.dom4j.Element` | `getSubsriptionErrorDetail()` Returns the error element that should be returned to the subscriber as error detail when subscription is not allowed.
`boolean` | `isAuthorizationRequired()` Returns true if the new subscription should be authorized by a node owner.

Methods inherited from class org.jivesoftware.openfire.pubsub.models.AccessModel
`valueOf`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### canSubscribe

    public boolean canSubscribe(Node node,
                                org.xmpp.packet.JID owner,
                                org.xmpp.packet.JID subscriber)

  Description copied from class: `AccessModel`
  Returns true if the entity is allowed to subscribe to the specified node.

  Specified by:
    `canSubscribe` in class `AccessModel`
  Parameters:
    `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.
  Returns:
    true if the subscriber is allowed to subscribe to the specified node.

### canAccessItems

    public boolean canAccessItems(Node node,
                                  org.xmpp.packet.JID owner,
                                  org.xmpp.packet.JID subscriber)

  Description copied from class: `AccessModel`
  Returns true if the entity is allowed to get the node published items.

  Specified by:
    `canAccessItems` in class `AccessModel`
  Parameters:
    `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.
  Returns:
    true if the subscriber is allowed to get the node's published items.

### getName

    public String getName()

  Description copied from class: `AccessModel`
  Returns the name as defined by the JEP-60 spec.

  Specified by:
    `getName` in class `AccessModel`
  Returns:
    the name as defined by the JEP-60 spec.

### getSubsriptionError

    public org.xmpp.packet.PacketError.Condition getSubsriptionError()

  Description copied from class: `AccessModel`
  Returns the error condition that should be returned to the subscriber when subscription is not allowed.

  Specified by:
    `getSubsriptionError` in class `AccessModel`
  Returns:
    the error condition that should be returned to the subscriber when subscription is not allowed.

### getSubsriptionErrorDetail

    public org.dom4j.Element getSubsriptionErrorDetail()

  Description copied from class: `AccessModel`
  Returns the error element that should be returned to the subscriber as error detail when subscription is not allowed. The returned element is created each time this message is sent so it is safe to include the returned element in the parent element.

  Specified by:
    `getSubsriptionErrorDetail` in class `AccessModel`
  Returns:
    the error element that should be returned to the subscriber as error detail when subscription is not allowed.

### isAuthorizationRequired

    public boolean isAuthorizationRequired()

  Description copied from class: `AccessModel`
  Returns true if the new subscription should be authorized by a node owner.

  Specified by:
    `isAuthorizationRequired` in class `AccessModel`
  Returns:
    true if the new subscription should be authorized by a node owner.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.8.2 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2008 Jive Software.