org.apache.jetspeed.layout.impl
Class NestedFragmentContext

java.lang.Object
  extended by org.apache.jetspeed.layout.impl.NestedFragmentContext

public class NestedFragmentContext
extends Object

NestedFragmentContext This object captures the nested position of a fragment within a page. Given a target fragment and a page, the target fragment col/row within its parent is recorded, followed by the target fragment's parent col/row within its parent, etc. The purpose of this object is to support the create-new-page-on-edit feature. For example, when a fragment is moved, causing the creation of a new page, the information captured by this object allows the copy of the fragment in the new page to be located.

Version:
$Id: $
Author:
Steve Milek, Steve Milek

Nested Class Summary
(package private)  class NestedFragmentContext.NestedFragmentLevel
           
 
Field Summary
protected static String eol
           
private  List fragmentLevels
           
protected static org.apache.commons.logging.Log log
           
private  org.apache.jetspeed.om.page.Page page
           
private  org.apache.jetspeed.om.page.Fragment rootFragment
           
private  org.apache.jetspeed.om.page.Fragment targetFragment
           
 
Constructor Summary
NestedFragmentContext(org.apache.jetspeed.om.page.Fragment targetFragment, org.apache.jetspeed.om.page.Page page, org.apache.jetspeed.components.portletregistry.PortletRegistry registry)
           
 
Method Summary
 org.apache.jetspeed.om.page.Fragment getFragmentOnNewPage(org.apache.jetspeed.om.page.Page newPage, org.apache.jetspeed.components.portletregistry.PortletRegistry registry)
           
static org.apache.jetspeed.om.page.Fragment getParentFragmentById(String id, org.apache.jetspeed.om.page.Fragment parent)
           
protected  void init(org.apache.jetspeed.components.portletregistry.PortletRegistry registry)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static final org.apache.commons.logging.Log log

eol

protected static final String eol

targetFragment

private org.apache.jetspeed.om.page.Fragment targetFragment

rootFragment

private org.apache.jetspeed.om.page.Fragment rootFragment

page

private org.apache.jetspeed.om.page.Page page

fragmentLevels

private List fragmentLevels
Constructor Detail

NestedFragmentContext

public NestedFragmentContext(org.apache.jetspeed.om.page.Fragment targetFragment,
                             org.apache.jetspeed.om.page.Page page,
                             org.apache.jetspeed.components.portletregistry.PortletRegistry registry)
                      throws org.apache.jetspeed.layout.PortletPlacementException
Throws:
org.apache.jetspeed.layout.PortletPlacementException
Method Detail

init

protected void init(org.apache.jetspeed.components.portletregistry.PortletRegistry registry)
             throws org.apache.jetspeed.layout.PortletPlacementException
Throws:
org.apache.jetspeed.layout.PortletPlacementException

getFragmentOnNewPage

public org.apache.jetspeed.om.page.Fragment getFragmentOnNewPage(org.apache.jetspeed.om.page.Page newPage,
                                                                 org.apache.jetspeed.components.portletregistry.PortletRegistry registry)
                                                          throws org.apache.jetspeed.layout.PortletPlacementException
Throws:
org.apache.jetspeed.layout.PortletPlacementException

toString

public String toString()
Overrides:
toString in class Object

getParentFragmentById

public static org.apache.jetspeed.om.page.Fragment getParentFragmentById(String id,
                                                                         org.apache.jetspeed.om.page.Fragment parent)


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