org.jboss.dna.graph.connectors
Class RepositorySourceCapabilities

java.lang.Object
  extended by org.jboss.dna.graph.connectors.RepositorySourceCapabilities

@Immutable
public class RepositorySourceCapabilities
extends Object

The capabilities of a RepositorySource. This class can be used as is, or subclassed to define more complex behavior.

Author:
Randall Hauch
See Also:
RepositorySource.getCapabilities()

Field Summary
static boolean DEFAULT_SUPPORT_EVENTS
          The default support for updates is false .
static boolean DEFAULT_SUPPORT_SAME_NAME_SIBLINGS
          The default support for same-name-siblings is true .
static boolean DEFAULT_SUPPORT_UPDATES
          The default support for updates is false .
 
Constructor Summary
RepositorySourceCapabilities()
          Create a capabilities object using the defaults, .
RepositorySourceCapabilities(boolean supportsSameNameSiblings, boolean supportsUpdates)
           
RepositorySourceCapabilities(boolean supportsSameNameSiblings, boolean supportsUpdates, boolean supportsEvents)
           
 
Method Summary
 boolean supportsEvents()
          Return whether the source supports events through RepositorySourceListeners.
 boolean supportsSameNameSiblings()
          Return whether the source supports same name siblings.
 boolean supportsUpdates()
          Return whether the source supports updates.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SUPPORT_SAME_NAME_SIBLINGS

public static final boolean DEFAULT_SUPPORT_SAME_NAME_SIBLINGS
The default support for same-name-siblings is true .

See Also:
Constant Field Values

DEFAULT_SUPPORT_UPDATES

public static final boolean DEFAULT_SUPPORT_UPDATES
The default support for updates is false .

See Also:
Constant Field Values

DEFAULT_SUPPORT_EVENTS

public static final boolean DEFAULT_SUPPORT_EVENTS
The default support for updates is false .

See Also:
Constant Field Values
Constructor Detail

RepositorySourceCapabilities

public RepositorySourceCapabilities()
Create a capabilities object using the defaults, .


RepositorySourceCapabilities

public RepositorySourceCapabilities(boolean supportsSameNameSiblings,
                                    boolean supportsUpdates)

RepositorySourceCapabilities

public RepositorySourceCapabilities(boolean supportsSameNameSiblings,
                                    boolean supportsUpdates,
                                    boolean supportsEvents)
Method Detail

supportsSameNameSiblings

public boolean supportsSameNameSiblings()
Return whether the source supports same name siblings. If not, then no two siblings may share the same name.

Returns:
true if same name siblings are supported, or false otherwise

supportsUpdates

public boolean supportsUpdates()
Return whether the source supports updates. This may be true, even though a particular connection made on behalf of a user may not have any update privileges. In other words, returning false implies that no connections would allow updates to the content.

Returns:
true if updates are supported, or false if the source only supports reads.

supportsEvents

public boolean supportsEvents()
Return whether the source supports events through RepositorySourceListeners.

Returns:
true if events are supported, or false if the source is not capable of generating events


Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.