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

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

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

Direct Known Subclasses:
  AuthorizeAccess, OpenAccess, PresenceAccess, RosterAccess, WhitelistAccess

    public abstract class AccessModel

extends Object

Policy that defines who is allowed to subscribe and retrieve items.

Author:
  Matt Tucker

Field Summary
`static AccessModel` | `authorize`
`static AccessModel` | `open`
`static AccessModel` | `presence`
`static AccessModel` | `roster`
`static AccessModel` | `whitelist`

Constructor Summary
`AccessModel()`

Method Summary
`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.

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

Field Detail

### whitelist

    public static final AccessModel whitelist

### open

    public static final AccessModel open

### authorize

    public static final AccessModel authorize

### presence

    public static final AccessModel presence

### roster

    public static final AccessModel roster

Constructor Detail

### AccessModel

    public AccessModel()

Method Detail

### valueOf

    public static AccessModel valueOf(String name)

  Returns the specific subclass of AccessModel as specified by the access model name. If an unknown name is specified then an IllegalArgumentException is going to be thrown.

  Parameters:
    `name` - the name of the subsclass.
  Returns:
    the specific subclass of AccessModel as specified by the access model name.

### getName

    public abstract String getName()

  Returns the name as defined by the JEP-60 spec.

  Returns:
    the name as defined by the JEP-60 spec.

### canSubscribe

    public 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.

  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 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.

  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.

### getSubsriptionError

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

  Returns the error condition that should be returned to the subscriber when subscription is not allowed.

  Returns:
    the error condition that should be returned to the subscriber when subscription is not allowed.

### getSubsriptionErrorDetail

    public abstract org.dom4j.Element getSubsriptionErrorDetail()

  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.

  Returns:
    the error element that should be returned to the subscriber as error detail when subscription is not allowed.

### isAuthorizationRequired

    public abstract boolean isAuthorizationRequired()

  Returns true if the new subscription should be authorized by a node owner.

  Returns:
    true if the new subscription should be authorized by a node owner.

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

Copyright © 2003-2008 Jive Software.