org.apache.jetspeed.om.folder.proxy
Class FolderProxy

java.lang.Object
  extended by org.apache.jetspeed.portalsite.view.SiteViewProxy
      extended by org.apache.jetspeed.page.document.proxy.NodeProxy
          extended by org.apache.jetspeed.om.folder.proxy.FolderProxy
All Implemented Interfaces:
java.lang.reflect.InvocationHandler

public class FolderProxy
extends NodeProxy
implements java.lang.reflect.InvocationHandler

This class proxies PSML Folder instances to create a logical view of site content using the Dynamic Proxy pattern.

Version:
$Id: FolderProxy.java 553375 2007-07-05 05:37:00Z taylor $
Author:
Randy Watler

Field Summary
protected static java.lang.reflect.Method GET_ALL_METHOD
          *_METHOD - Folder method constants
protected static java.lang.reflect.Method GET_DEFAULT_PAGE_METHOD
           
protected static java.lang.reflect.Method GET_FOLDER_METHOD
           
protected static java.lang.reflect.Method GET_FOLDERS_METHOD
           
protected static java.lang.reflect.Method GET_LINK_METHOD
           
protected static java.lang.reflect.Method GET_LINKS_METHOD
           
protected static java.lang.reflect.Method GET_MENU_DEFINITIONS_METHOD
           
protected static java.lang.reflect.Method GET_METADATA_METHOD
           
protected static java.lang.reflect.Method GET_NAME_METHOD
           
protected static java.lang.reflect.Method GET_PAGE_METHOD
           
protected static java.lang.reflect.Method GET_PAGE_SECURITY_METHOD
           
protected static java.lang.reflect.Method GET_PAGES_METHOD
           
protected static java.lang.reflect.Method GET_SHORT_TITLE_LOCALE_METHOD
           
protected static java.lang.reflect.Method GET_SHORT_TITLE_METHOD
           
protected static java.lang.reflect.Method GET_TITLE_LOCALE_METHOD
           
protected static java.lang.reflect.Method GET_TITLE_METHOD
           
 
Fields inherited from class org.apache.jetspeed.page.document.proxy.NodeProxy
EQUALS_METHOD, GET_PARENT_METHOD, GET_PATH_METHOD, GET_URL_METHOD, HASH_CODE_METHOD, IS_HIDDEN_METHOD, TO_STRING_METHOD
 
Method Summary
protected  void aggregateMenuDefinitionLocators()
          aggregateMenuDefinitionLocators - aggregate all menu definition locators in site view for this folder or page
 NodeSet getAll(java.lang.Object proxy)
          getAll - proxy implementation of Folder.getAll()
 Folder getDefaultFolder()
          getDefaultFolder - get default proxy delegate folder instance
 java.lang.String getDefaultPage(java.lang.Object proxy)
          getDefaultPage - proxy implementation of Folder.getDefaultPage()
 Folder getFolder(java.lang.Object proxy, java.lang.String name)
          getFolder - proxy implementation of Folder.getFolder()
 NodeSet getFolders(java.lang.Object proxy)
          getFolders - proxy implementation of Folder.getFolders()
 Link getLink(java.lang.Object proxy, java.lang.String name)
          getLink - proxy implementation of Folder.getLink()
 NodeSet getLinks(java.lang.Object proxy)
          getLinks - proxy implementation of Folder.getLinks()
 GenericMetadata getMetadata()
          getMetadata - proxy implementation of Folder.getMetadata()
 java.lang.String getName()
          getName - proxy implementation of Node.getName()
 Page getPage(java.lang.Object proxy, java.lang.String name)
          getPage - proxy implementation of Folder.getPage()
 NodeSet getPages(java.lang.Object proxy)
          getPages - proxy implementation of Folder.getPages()
 java.lang.String getShortTitle()
          getShortTitle - proxy implementation of Folder.getShortTitle()
 java.lang.String getShortTitle(java.util.Locale locale)
          getShortTitle - proxy implementation of Folder.getShortTitle()
 java.lang.String getTitle()
          getTitle - proxy implementation of Folder.getTitle()
 java.lang.String getTitle(java.util.Locale locale)
          getTitle - proxy implementation of Folder.getTitle()
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method m, java.lang.Object[] args)
          invoke - method invocation dispatch for this proxy, (defaults to invocation of delegate unless method is implemented in this proxy handler or should be hidden/stubbed)
static Folder newInstance(SiteView view, java.lang.String locatorName, Folder parentFolder, Folder folder)
          newInstance - creates a new proxy instance that implements the Folder interface
 
Methods inherited from class org.apache.jetspeed.page.document.proxy.NodeProxy
equals, getMenuDefinitionLocator, getMenuDefinitionLocators, getMenuDefinitions, getNodeProxy, getParent, getPath, getUrl, hashCode, isHidden, mergeMenuDefinitionLocators, mergeMenuDefinitionLocators, toString
 
Methods inherited from class org.apache.jetspeed.portalsite.view.SiteViewProxy
getLocatorName, getSiteViewProxy, getView, reflectMethod
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

GET_ALL_METHOD

protected static final java.lang.reflect.Method GET_ALL_METHOD
*_METHOD - Folder method constants


GET_DEFAULT_PAGE_METHOD

protected static final java.lang.reflect.Method GET_DEFAULT_PAGE_METHOD

GET_FOLDERS_METHOD

protected static final java.lang.reflect.Method GET_FOLDERS_METHOD

GET_FOLDER_METHOD

protected static final java.lang.reflect.Method GET_FOLDER_METHOD

GET_LINKS_METHOD

protected static final java.lang.reflect.Method GET_LINKS_METHOD

GET_LINK_METHOD

protected static final java.lang.reflect.Method GET_LINK_METHOD

GET_MENU_DEFINITIONS_METHOD

protected static final java.lang.reflect.Method GET_MENU_DEFINITIONS_METHOD

GET_METADATA_METHOD

protected static final java.lang.reflect.Method GET_METADATA_METHOD

GET_NAME_METHOD

protected static final java.lang.reflect.Method GET_NAME_METHOD

GET_PAGES_METHOD

protected static final java.lang.reflect.Method GET_PAGES_METHOD

GET_PAGE_METHOD

protected static final java.lang.reflect.Method GET_PAGE_METHOD

GET_PAGE_SECURITY_METHOD

protected static final java.lang.reflect.Method GET_PAGE_SECURITY_METHOD

GET_SHORT_TITLE_LOCALE_METHOD

protected static final java.lang.reflect.Method GET_SHORT_TITLE_LOCALE_METHOD

GET_SHORT_TITLE_METHOD

protected static final java.lang.reflect.Method GET_SHORT_TITLE_METHOD

GET_TITLE_LOCALE_METHOD

protected static final java.lang.reflect.Method GET_TITLE_LOCALE_METHOD

GET_TITLE_METHOD

protected static final java.lang.reflect.Method GET_TITLE_METHOD
Method Detail

newInstance

public static Folder newInstance(SiteView view,
                                 java.lang.String locatorName,
                                 Folder parentFolder,
                                 Folder folder)
newInstance - creates a new proxy instance that implements the Folder interface

Parameters:
view - site view owner of this proxy
locatorName - name of profile locator associated with the proxy delegate
parentFolder - view parent proxy folder
folder - proxy delegate

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method m,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
invoke - method invocation dispatch for this proxy, (defaults to invocation of delegate unless method is implemented in this proxy handler or should be hidden/stubbed)

Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Parameters:
proxy - instance invoked against
method - Folder interface method invoked
args - method arguments
Throws:
java.lang.Throwable

getAll

public NodeSet getAll(java.lang.Object proxy)
               throws DocumentException
getAll - proxy implementation of Folder.getAll()

Parameters:
proxy - this folder proxy
Returns:
list containing sub-folders and documents in folder
Throws:
DocumentException

getDefaultPage

public java.lang.String getDefaultPage(java.lang.Object proxy)
getDefaultPage - proxy implementation of Folder.getDefaultPage()

Parameters:
proxy - this folder proxy
Returns:
default page name

getFolders

public NodeSet getFolders(java.lang.Object proxy)
                   throws DocumentException
getFolders - proxy implementation of Folder.getFolders()

Parameters:
proxy - this folder proxy
Returns:
list containing all sub-folders in folder
Throws:
DocumentException

getFolder

public Folder getFolder(java.lang.Object proxy,
                        java.lang.String name)
                 throws FolderNotFoundException,
                        DocumentException
getFolder - proxy implementation of Folder.getFolder()

Parameters:
proxy - this folder proxy
name - sub-folder name
Returns:
sub-folder
Throws:
FolderNotFoundException
DocumentException

getLinks

public NodeSet getLinks(java.lang.Object proxy)
                 throws NodeException
getLinks - proxy implementation of Folder.getLinks()

Parameters:
proxy - this folder proxy
Returns:
list containing all links in folder
Throws:
NodeException

getLink

public Link getLink(java.lang.Object proxy,
                    java.lang.String name)
             throws DocumentNotFoundException,
                    NodeException
getLink - proxy implementation of Folder.getLink()

Parameters:
proxy - this folder proxy
name - link name including extension
Returns:
link
Throws:
DocumentNotFoundException
NodeException

getName

public java.lang.String getName()
getName - proxy implementation of Node.getName()

Returns:
name of folder

getPages

public NodeSet getPages(java.lang.Object proxy)
                 throws NodeException
getPages - proxy implementation of Folder.getPages()

Parameters:
proxy - this folder proxy
Returns:
list containing all pages in folder
Throws:
NodeException

getPage

public Page getPage(java.lang.Object proxy,
                    java.lang.String name)
             throws PageNotFoundException,
                    NodeException
getPage - proxy implementation of Folder.getPage()

Parameters:
proxy - this folder proxy
name - page name including extension
Returns:
page
Throws:
PageNotFoundException
NodeException

getMetadata

public GenericMetadata getMetadata()
getMetadata - proxy implementation of Folder.getMetadata()

Returns:
metadata

getTitle

public java.lang.String getTitle()
getTitle - proxy implementation of Folder.getTitle()

Returns:
default title

getShortTitle

public java.lang.String getShortTitle()
getShortTitle - proxy implementation of Folder.getShortTitle()

Returns:
default short title

getTitle

public java.lang.String getTitle(java.util.Locale locale)
getTitle - proxy implementation of Folder.getTitle()

Parameters:
locale - preferred locale
Returns:
title

getShortTitle

public java.lang.String getShortTitle(java.util.Locale locale)
getShortTitle - proxy implementation of Folder.getShortTitle()

Parameters:
locale - preferred locale
Returns:
short title

getDefaultFolder

public Folder getDefaultFolder()
getDefaultFolder - get default proxy delegate folder instance

Returns:
default delegate folder

aggregateMenuDefinitionLocators

protected void aggregateMenuDefinitionLocators()
aggregateMenuDefinitionLocators - aggregate all menu definition locators in site view for this folder or page

Overrides:
aggregateMenuDefinitionLocators in class NodeProxy


Copyright © 1999-2009 Apache Software Foundation. All Rights Reserved.