com.xpn.xwiki.criteria.impl
Class ScopeFactory

java.lang.Object
  extended by com.xpn.xwiki.criteria.impl.ScopeFactory

public class ScopeFactory
extends Object

Helper factory class for creating Scope objects in velocity


Field Summary
static Scope ALL
          A scope that matches the entire application as a unit
static Scope ALL_PAGES
          A scope that matches all pages within any space and any wiki
static Scope ALL_SPACES
          A scope that matches all spaces within any wiki
static Scope ALL_WIKIS
          A scope that matches all wikis within the application
 
Constructor Summary
ScopeFactory()
           
 
Method Summary
static Scope createPageScope(String pageName)
          Creates a new scope associated with the specified page.
static Scope createScope(int type, String name, boolean deep)
           
static Scope createSpaceScope(String spaceName)
          Creates a new scope associated with the specified space and matching all its pages.
static Scope createSpaceScope(String spaceName, boolean deep)
          Creates a new scope associated with the specified space.
static Scope createWikiScope(String wikiName)
          Creates a new scope associated with the specified wiki and matching all its spaces.
static Scope createWikiScope(String wikiName, boolean deep)
          Creates a new scope associated with the specified wiki.
static Scope getALL_PAGES()
          Helper method for accessing ALL_PAGES static field in velocity
static Scope getALL_SPACES()
          Helper method for accessing ALL_SPACES static field in velocity
static Scope getALL_WIKIS()
          Helper method for accessing ALL_WIKIS static field in velocity
static Scope getALL()
          Helper method for accessing ALL static field in velocity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL_PAGES

public static final Scope ALL_PAGES
A scope that matches all pages within any space and any wiki


ALL_SPACES

public static final Scope ALL_SPACES
A scope that matches all spaces within any wiki


ALL_WIKIS

public static final Scope ALL_WIKIS
A scope that matches all wikis within the application


ALL

public static final Scope ALL
A scope that matches the entire application as a unit

Constructor Detail

ScopeFactory

public ScopeFactory()
Method Detail

createScope

public static Scope createScope(int type,
                                String name,
                                boolean deep)
See Also:
Scope.Scope(int, String, boolean)

createPageScope

public static Scope createPageScope(String pageName)
Creates a new scope associated with the specified page.

Parameters:
pageName - A page name
Returns:
A new Scope instance

createSpaceScope

public static Scope createSpaceScope(String spaceName)
Creates a new scope associated with the specified space and matching all its pages.

Parameters:
spaceName - A space name
Returns:
A new Scope instance

createSpaceScope

public static Scope createSpaceScope(String spaceName,
                                     boolean deep)
Creates a new scope associated with the specified space.

Parameters:
spaceName - A space name
deep - true for matching all its pages; false for matching this space as a unit
Returns:
A new Scope instance

createWikiScope

public static Scope createWikiScope(String wikiName)
Creates a new scope associated with the specified wiki and matching all its spaces.

Parameters:
wikiName - A wiki name
Returns:
A new Scope instance

createWikiScope

public static Scope createWikiScope(String wikiName,
                                    boolean deep)
Creates a new scope associated with the specified wiki.

Parameters:
wikiName - A wiki name
deep - true for matching all its spaces; false for matching this wiki as a unit
Returns:
A new Scope instance

getALL_PAGES

public static Scope getALL_PAGES()
Helper method for accessing ALL_PAGES static field in velocity


getALL_SPACES

public static Scope getALL_SPACES()
Helper method for accessing ALL_SPACES static field in velocity


getALL_WIKIS

public static Scope getALL_WIKIS()
Helper method for accessing ALL_WIKIS static field in velocity


getALL

public static Scope getALL()
Helper method for accessing ALL static field in velocity



Copyright © 2004–2014 XWiki. All rights reserved.