Author: rwatler
Date: Sun Dec 4 22:17:03 2005
New Revision: 353995
URL: http://svn.apache.org/viewcvs?rev=353995&view=rev
Log:
Extend PageImporter and PageManager copy*() APIs to support Links and Menus
Modified:
portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java
portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/PageImporter.java
portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/impl/DatabasePageManager.java
portals/jetspeed-2/trunk/etc/import/assembly/import-page-manager.xml
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/page/PageManager.java
Modified:
portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java?rev=353995&r1=353994&r2=353995&view=diff
==============================================================================
---
portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java
(original)
+++
portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java
Sun Dec 4 22:17:03 2005
@@ -39,8 +39,8 @@
import org.apache.jetspeed.om.page.PageSecurity;
import org.apache.jetspeed.om.page.SecurityConstraintsDef;
import org.apache.jetspeed.om.preference.FragmentPreference;
+import org.apache.jetspeed.page.document.FailedToUpdateDocumentException;
import org.apache.jetspeed.page.document.Node;
-import org.apache.jetspeed.portalsite.MenuElement;
/**
* AbstractPageManagerService
@@ -53,6 +53,12 @@
{
private final static Log log =
LogFactory.getLog(AbstractPageManager.class);
+ private final static String FOLDER_NODE_TYPE = "folder";
+ private final static String PAGE_NODE_TYPE = "page";
+ private final static String FRAGMENT_NODE_TYPE = "fragment";
+ private final static String LINK_NODE_TYPE = "link";
+ private final static String PAGE_SECURITY_NODE_TYPE = "pageSecurity";
+
protected Class fragmentClass;
protected Class pageClass;
protected Class folderClass;
@@ -750,25 +756,42 @@
}
public Folder copyFolder(Folder source, String path)
- throws JetspeedException, PageNotUpdatedException
+ throws JetspeedException, FolderNotUpdatedException
{
+ // create the new folder and copy attributes
Folder folder = newFolder(path);
folder.setDefaultPage(source.getDefaultPage());
folder.setShortTitle(source.getShortTitle());
folder.setTitle(source.getTitle());
folder.setHidden(source.isHidden());
+
+ // copy locale specific metadata
+ folder.getMetadata().copyFields(source.getMetadata().getFields());
// copy security constraints
SecurityConstraints srcSecurity = source.getSecurityConstraints();
if ((srcSecurity != null) && !srcSecurity.isEmpty())
{
- SecurityConstraints copiedSecurity =
copySecurityConstraints("folder", srcSecurity);
+ SecurityConstraints copiedSecurity =
copySecurityConstraints(FOLDER_NODE_TYPE, srcSecurity);
folder.setSecurityConstraints(copiedSecurity);
}
- // TODO: document orders
-
- // TODO: menu definitions
+ // copy document orders
+ folder.setDocumentOrder(new ArrayList());
+ Iterator documentOrders = source.getDocumentOrder().iterator();
+ while (documentOrders.hasNext())
+ {
+ String name = (String)documentOrders.next();
+ folder.getDocumentOrder().add(name);
+ }
+
+ // copy menu definitions
+ List menus = source.getMenuDefinitions();
+ if (menus != null)
+ {
+ List copiedMenus = copyMenuDefinitions(FOLDER_NODE_TYPE, menus);
+ folder.setMenuDefinitions(copiedMenus);
+ }
return folder;
}
@@ -786,34 +809,35 @@
page.setDefaultSkin(source.getDefaultSkin());
page.setHidden(source.isHidden());
- // metadata
- copyMetadata(source, page);
-
- // fragments
- Fragment root = copyFragment(source.getRootFragment(),
source.getRootFragment().getName());
- page.setRootFragment(root);
+ // copy locale specific metadata
+ page.getMetadata().copyFields(source.getMetadata().getFields());
// copy security constraints
SecurityConstraints srcSecurity = source.getSecurityConstraints();
if ((srcSecurity != null) && !srcSecurity.isEmpty())
{
- SecurityConstraints copiedSecurity =
copySecurityConstraints("page", srcSecurity);
+ SecurityConstraints copiedSecurity =
copySecurityConstraints(PAGE_NODE_TYPE, srcSecurity);
page.setSecurityConstraints(copiedSecurity);
}
- // menus
-// List menus = page.getMenuDefinitions();
-// if (menus != null)
-// {
-// List copiedMenus = copyMenuDefinitions("page",
page.getMenuDefinitions());
-// page.setMenuDefinitions(copiedMenus);
-// }
+ // copy menu definitions
+ List menus = source.getMenuDefinitions();
+ if (menus != null)
+ {
+ List copiedMenus = copyMenuDefinitions(PAGE_NODE_TYPE, menus);
+ page.setMenuDefinitions(copiedMenus);
+ }
+
+ // copy fragments
+ Fragment root = copyFragment(source.getRootFragment(),
source.getRootFragment().getName());
+ page.setRootFragment(root);
return page;
}
public Fragment copyFragment(Fragment source, String name)
{
+ // create the new fragment and copy attributes
Fragment copy = newFragment();
copy.setDecorator(source.getDecorator());
copy.setName(name);
@@ -827,20 +851,10 @@
SecurityConstraints srcSecurity = source.getSecurityConstraints();
if ((srcSecurity != null) && !srcSecurity.isEmpty())
{
- SecurityConstraints copiedSecurity =
copySecurityConstraints("fragment", srcSecurity);
+ SecurityConstraints copiedSecurity =
copySecurityConstraints(FRAGMENT_NODE_TYPE, srcSecurity);
copy.setSecurityConstraints(copiedSecurity);
}
- // recursively copy fragments
- Iterator fragments = source.getFragments().iterator();
- while (fragments.hasNext())
- {
- Fragment fragment = (Fragment)fragments.next();
- Fragment copiedFragment = copyFragment(fragment,
fragment.getName());
- copy.getFragments().add(copiedFragment);
- }
-
-
// copy properties
Iterator props = source.getProperties().entrySet().iterator();
while (props.hasNext())
@@ -850,6 +864,7 @@
}
// copy preferences
+ copy.setPreferences(new ArrayList());
Iterator prefs = source.getPreferences().iterator();
while (prefs.hasNext())
{
@@ -864,18 +879,87 @@
String value = (String)values.next();
newPref.getValueList().add(value);
}
+ copy.getPreferences().add(newPref);
+ }
+
+ // recursively copy fragments
+ Iterator fragments = source.getFragments().iterator();
+ while (fragments.hasNext())
+ {
+ Fragment fragment = (Fragment)fragments.next();
+ Fragment copiedFragment = copyFragment(fragment,
fragment.getName());
+ copy.getFragments().add(copiedFragment);
}
return copy;
}
- public void copyMetadata(Page source, Page dest)
+ public Link copyLink(Link source, String path)
+ throws JetspeedException, LinkNotUpdatedException
{
- if (source.getMetadata() != null)
+ // create the new link and copy attributes
+ Link link = newLink(path);
+ link.setTitle(source.getTitle());
+ link.setShortTitle(source.getShortTitle());
+ link.setVersion(source.getVersion());
+ link.setTarget(source.getTarget());
+ link.setUrl(source.getUrl());
+ link.setHidden(source.isHidden());
+
+ // copy locale specific metadata
+ link.getMetadata().copyFields(source.getMetadata().getFields());
+
+ // copy security constraints
+ SecurityConstraints srcSecurity = source.getSecurityConstraints();
+ if ((srcSecurity != null) && !srcSecurity.isEmpty())
{
- dest.getMetadata().copyFields(source.getMetadata().getFields());
- }
+ SecurityConstraints copiedSecurity =
copySecurityConstraints(LINK_NODE_TYPE, srcSecurity);
+ link.setSecurityConstraints(copiedSecurity);
+ }
+
+ return link;
}
-
+
+ public PageSecurity copyPageSecurity(PageSecurity source)
+ throws JetspeedException, FailedToUpdateDocumentException
+ {
+ // create the new page security document and copy attributes
+ PageSecurity copy = this.newPageSecurity();
+ copy.setPath(source.getPath());
+ copy.setVersion(source.getVersion());
+
+ // copy security constraint defintions
+ copy.setSecurityConstraintsDefs(new ArrayList());
+ Iterator defs = source.getSecurityConstraintsDefs().iterator();
+ while (defs.hasNext())
+ {
+ SecurityConstraintsDef def = (SecurityConstraintsDef)defs.next();
+ SecurityConstraintsDef defCopy = this.newSecurityConstraintsDef();
+ defCopy.setName(def.getName());
+ List copiedConstraints = new ArrayList();
+ Iterator constraints = def.getSecurityConstraints().iterator();
+ while (constraints.hasNext())
+ {
+ SecurityConstraint srcConstraint =
(SecurityConstraint)constraints.next();
+ SecurityConstraint dstConstraint =
newPageSecuritySecurityConstraint();
+ copyConstraint(srcConstraint, dstConstraint);
+ copiedConstraints.add(dstConstraint);
+ }
+ defCopy.setSecurityConstraints(copiedConstraints);
+ copy.getSecurityConstraintsDefs().add(defCopy);
+ }
+
+ // copy global security constraint references
+ copy.setGlobalSecurityConstraintsRefs(new ArrayList());
+ Iterator globals =
source.getGlobalSecurityConstraintsRefs().iterator();
+ while (globals.hasNext())
+ {
+ String global = (String)globals.next();
+ copy.getGlobalSecurityConstraintsRefs().add(global);
+ }
+
+ return copy;
+ }
+
protected List copyMenuDefinitions(String type, List srcMenus)
{
List copiedMenus = new ArrayList(4);
@@ -883,54 +967,142 @@
while (menus.hasNext())
{
MenuDefinition srcMenu = (MenuDefinition)menus.next();
- MenuDefinition copiedMenu = null;
- if (type.equals("page"))
- {
- copiedMenu = newPageMenuDefinition();
- }
- else if (type.equals("folder"))
- {
- copiedMenu = newFolderMenuDefinition();
- }
- copiedMenu.setDepth(srcMenu.getDepth());
- copiedMenu.setName(srcMenu.getName());
- copiedMenu.setOptions(srcMenu.getOptions());
- copiedMenu.setOrder(srcMenu.getOrder());
- copiedMenu.setPaths(srcMenu.isPaths());
- copiedMenu.setProfile(srcMenu.getProfile());
- copiedMenu.setRegexp(srcMenu.isRegexp());
-
- // TODO: how do I copy all localized short titles?
- copiedMenu.setShortTitle(srcMenu.getShortTitle());
-
- copiedMenu.setSkin(srcMenu.getSkin());
-
- // TODO: how do I copy all localized titles?
- copiedMenu.setTitle(srcMenu.getTitle());
-
- // TODO: copy metadata
- copiedMenu.getMetadata();
-
- List srcElements = copiedMenu.getMenuElements();
- if (srcElements != null)
+ MenuDefinition copiedMenu = (MenuDefinition)copyMenuElement(type,
srcMenu);
+ if (copiedMenu != null)
{
- List copiedElements = copyMenuElements(srcElements);
- copiedMenu.setMenuElements(copiedElements);
+ copiedMenus.add(copiedMenu);
}
}
return copiedMenus;
}
- protected List copyMenuElements(List srcElements)
+ protected Object copyMenuElement(String type, Object srcElement)
{
- List copiedElements = new ArrayList(8);
- Iterator elements = srcElements.iterator();
- while (elements.hasNext())
+ if (srcElement instanceof MenuDefinition)
+ {
+ // create the new menu element and copy attributes
+ MenuDefinition source = (MenuDefinition)srcElement;
+ MenuDefinition menu = null;
+ if (type.equals(PAGE_NODE_TYPE))
+ {
+ menu = newPageMenuDefinition();
+ }
+ else if (type.equals(FOLDER_NODE_TYPE))
+ {
+ menu = newFolderMenuDefinition();
+ }
+ menu.setDepth(source.getDepth());
+ menu.setName(source.getName());
+ menu.setOptions(source.getOptions());
+ menu.setOrder(source.getOrder());
+ menu.setPaths(source.isPaths());
+ menu.setProfile(source.getProfile());
+ menu.setRegexp(source.isRegexp());
+ menu.setShortTitle(source.getShortTitle());
+ menu.setSkin(source.getSkin());
+ menu.setTitle(source.getTitle());
+
+ // copy locale specific metadata
+ menu.getMetadata().copyFields(source.getMetadata().getFields());
+
+ // recursively copy menu elements
+ List elements = source.getMenuElements();
+ if (elements != null)
+ {
+ List copiedElements = new ArrayList(4);
+ Iterator elementsIter = elements.iterator();
+ while (elementsIter.hasNext())
+ {
+ Object element = elementsIter.next();
+ Object copiedElement = copyMenuElement(type, element);
+ if (copiedElement != null)
+ {
+ copiedElements.add(copiedElement);
+ }
+ }
+ menu.setMenuElements(copiedElements);
+ }
+
+ return menu;
+ }
+ else if (srcElement instanceof MenuExcludeDefinition)
+ {
+ // create the new menu exclude element and copy attributes
+ MenuExcludeDefinition source = (MenuExcludeDefinition)srcElement;
+ MenuExcludeDefinition menuExclude = null;
+ if (type.equals(PAGE_NODE_TYPE))
+ {
+ menuExclude = newPageMenuExcludeDefinition();
+ }
+ else if (type.equals(FOLDER_NODE_TYPE))
+ {
+ menuExclude = newFolderMenuExcludeDefinition();
+ }
+ menuExclude.setName(source.getName());
+ return menuExclude;
+ }
+ else if (srcElement instanceof MenuIncludeDefinition)
{
- MenuElement srcElement = (MenuElement)elements.next();
- // MenuElement copiedElement = newMenuElement();
+ // create the new menu include element and copy attributes
+ MenuIncludeDefinition source = (MenuIncludeDefinition)srcElement;
+ MenuIncludeDefinition menuInclude = null;
+ if (type.equals(PAGE_NODE_TYPE))
+ {
+ menuInclude = newPageMenuIncludeDefinition();
+ }
+ else if (type.equals(FOLDER_NODE_TYPE))
+ {
+ menuInclude = newFolderMenuIncludeDefinition();
+ }
+ menuInclude.setName(source.getName());
+ menuInclude.setNest(source.isNest());
+ return menuInclude;
+ }
+ else if (srcElement instanceof MenuOptionsDefinition)
+ {
+ // create the new menu options element and copy attributes
+ MenuOptionsDefinition source = (MenuOptionsDefinition)srcElement;
+ MenuOptionsDefinition menuOptions = null;
+ if (type.equals(PAGE_NODE_TYPE))
+ {
+ menuOptions = newPageMenuOptionsDefinition();
+ }
+ else if (type.equals(FOLDER_NODE_TYPE))
+ {
+ menuOptions = newFolderMenuOptionsDefinition();
+ }
+ menuOptions.setDepth(source.getDepth());
+ menuOptions.setOptions(source.getOptions());
+ menuOptions.setOrder(source.getOrder());
+ menuOptions.setPaths(source.isPaths());
+ menuOptions.setProfile(source.getProfile());
+ menuOptions.setRegexp(source.isRegexp());
+ menuOptions.setSkin(source.getSkin());
+ return menuOptions;
+ }
+ else if (srcElement instanceof MenuSeparatorDefinition)
+ {
+ // create the new menu separator element and copy attributes
+ MenuSeparatorDefinition source =
(MenuSeparatorDefinition)srcElement;
+ MenuSeparatorDefinition menuSeparator = null;
+ if (type.equals(PAGE_NODE_TYPE))
+ {
+ menuSeparator = newPageMenuSeparatorDefinition();
+ }
+ else if (type.equals(FOLDER_NODE_TYPE))
+ {
+ menuSeparator = newFolderMenuSeparatorDefinition();
+ }
+ menuSeparator.setSkin(source.getSkin());
+ menuSeparator.setTitle(source.getTitle());
+ menuSeparator.setText(source.getText());
+
+ // copy locale specific metadata
+
menuSeparator.getMetadata().copyFields(source.getMetadata().getFields());
+
+ return menuSeparator;
}
- return copiedElements;
+ return null;
}
protected void copyConstraint(SecurityConstraint srcConstraint,
SecurityConstraint dstConstraint)
@@ -956,15 +1128,19 @@
{
SecurityConstraint srcConstraint =
(SecurityConstraint)constraints.next();
SecurityConstraint dstConstraint = null;
- if (type.equals("page"))
+ if (type.equals(PAGE_NODE_TYPE))
{
dstConstraint = newPageSecurityConstraint();
}
- else if (type.equals("folder"))
+ else if (type.equals(FOLDER_NODE_TYPE))
{
dstConstraint = newFolderSecurityConstraint();
}
- else if (type.equals("fragment"))
+ else if (type.equals(LINK_NODE_TYPE))
+ {
+ dstConstraint = newLinkSecurityConstraint();
+ }
+ else if (type.equals(FRAGMENT_NODE_TYPE))
{
dstConstraint = newFragmentSecurityConstraint();
}
@@ -987,46 +1163,6 @@
return security;
}
- public PageSecurity copyPageSecurity(PageSecurity source)
- throws JetspeedException
- {
- PageSecurity copy = this.newPageSecurity();
- // this is backwards
- copy.setGlobalSecurityConstraintsRefs(new ArrayList());
- copy.setSecurityConstraintsDefs(new ArrayList());
-
- copy.setPath(source.getPath());
- copy.setVersion(source.getVersion());
-
- Iterator defs = source.getSecurityConstraintsDefs().iterator();
- while (defs.hasNext())
- {
- SecurityConstraintsDef def = (SecurityConstraintsDef)defs.next();
- SecurityConstraintsDef defCopy = this.newSecurityConstraintsDef();
- defCopy.setName(def.getName());
- List copiedConstraints = new ArrayList();
- defCopy.setSecurityConstraints(copiedConstraints);
- Iterator constraints = def.getSecurityConstraints().iterator();
- while (constraints.hasNext())
- {
- SecurityConstraint srcConstraint =
(SecurityConstraint)constraints.next();
- SecurityConstraint dstConstraint =
newPageSecuritySecurityConstraint();
- copyConstraint(srcConstraint, dstConstraint);
- copiedConstraints.add(dstConstraint);
- }
- copy.getSecurityConstraintsDefs().add(defCopy);
- }
-
- Iterator globals =
source.getGlobalSecurityConstraintsRefs().iterator();
- while (globals.hasNext())
- {
- String global = (String)globals.next();
- copy.getGlobalSecurityConstraintsRefs().add(global);
- }
-
- return copy;
- }
-
/**
* Deep copy a folder
*
@@ -1071,8 +1207,15 @@
this.updatePage(dstPage);
}
- // TODO: LINKS
-
+ Iterator links = srcFolder.getLinks().iterator();
+ while (links.hasNext())
+ {
+ Link srcLink = (Link)links.next();
+ String path = this.concatenatePaths(destinationPath,
srcLink.getName());
+ Link dstLink = this.copyLink(srcLink, path);
+ this.updateLink(dstLink);
+ }
+
Iterator folders = srcFolder.getFolders().iterator();
while (folders.hasNext())
{
Modified:
portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/PageImporter.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/PageImporter.java?rev=353995&r1=353994&r2=353995&view=diff
==============================================================================
---
portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/PageImporter.java
(original)
+++
portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/PageImporter.java
Sun Dec 4 22:17:03 2005
@@ -20,6 +20,7 @@
import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.jetspeed.exception.JetspeedException;
import org.apache.jetspeed.om.folder.Folder;
+import org.apache.jetspeed.om.page.Link;
import org.apache.jetspeed.om.page.Page;
import org.apache.jetspeed.om.page.PageSecurity;
import org.apache.jetspeed.page.document.DocumentNotFoundException;
@@ -49,6 +50,8 @@
private int folderCount = 0;
/* count of total pages imported */
private int pageCount = 0;
+ /* count of total links imported */
+ private int linkCount = 0;
public static void main(String args[])
{
@@ -191,6 +194,33 @@
pageCount++;
}
}
+
+ Iterator links = srcFolder.getLinks().iterator();
+ while (links.hasNext())
+ {
+ Link srcLink = (Link)links.next();
+ Link dstLink = lookupLink(srcLink.getPath());
+ if (null != dstLink)
+ {
+ if (isOverwritePages())
+ {
+ System.out.println("overwriting link " +
srcLink.getPath());
+ destManager.removeLink(dstLink);
+ dstLink = destManager.copyLink(srcLink, srcLink.getPath());
+ destManager.updateLink(dstLink);
+ linkCount++;
+ }
+ else
+ System.out.println("skipping link " + srcLink.getPath());
+ }
+ else
+ {
+ System.out.println("importing new link " + srcLink.getPath());
+ dstLink = destManager.copyLink(srcLink, srcLink.getPath());
+ destManager.updateLink(dstLink);
+ linkCount++;
+ }
+ }
Iterator folders = srcFolder.getFolders().iterator();
while (folders.hasNext())
@@ -214,6 +244,18 @@
}
}
+ private Link lookupLink(String path)
+ {
+ try
+ {
+ return destManager.getLink(path);
+ }
+ catch (Exception e)
+ {
+ return null;
+ }
+ }
+
private Folder lookupFolder(String path)
{
try
@@ -298,6 +340,20 @@
this.pageCount = pageCount;
}
/**
+ * @return Returns the linkCount.
+ */
+ public int getLinkCount()
+ {
+ return linkCount;
+ }
+ /**
+ * @param linkCount The linkCount to set.
+ */
+ public void setLinkCount(int linkCount)
+ {
+ this.linkCount = linkCount;
+ }
+ /**
* @return Returns the rootFolder.
*/
public String getRootFolder()
@@ -325,4 +381,4 @@
{
this.sourceManager = sourceManager;
}
-}
\ No newline at end of file
+}
Modified:
portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/impl/DatabasePageManager.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/impl/DatabasePageManager.java?rev=353995&r1=353994&r2=353995&view=diff
==============================================================================
---
portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/impl/DatabasePageManager.java
(original)
+++
portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/impl/DatabasePageManager.java
Sun Dec 4 22:17:03 2005
@@ -1138,6 +1138,12 @@
return this.delegator.copyPage(source, path);
}
+ public Link copyLink(Link source, String path)
+ throws JetspeedException, LinkNotUpdatedException
+ {
+ return this.delegator.copyLink(source, path);
+ }
+
public Folder copyFolder(Folder source, String path)
throws JetspeedException, PageNotUpdatedException
{
Modified: portals/jetspeed-2/trunk/etc/import/assembly/import-page-manager.xml
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/etc/import/assembly/import-page-manager.xml?rev=353995&r1=353994&r2=353995&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/etc/import/assembly/import-page-manager.xml
(original)
+++ portals/jetspeed-2/trunk/etc/import/assembly/import-page-manager.xml Sun
Dec 4 22:17:03 2005
@@ -23,12 +23,14 @@
class="org.apache.jetspeed.page.impl.DatabasePageManager">
<!-- OJB configuration file resource path -->
<constructor-arg
index="0"><value>JETSPEED-INF/ojb/page-manager-repository.xml</value></constructor-arg>
- <!-- folder/page/link cache size, default=128 -->
+ <!-- folder/page/link cache size, default=128, min=128 -->
<constructor-arg index="1"><value>128</value></constructor-arg>
+ <!-- folder/page/link cache expires seconds, default=150, infinite=0,
min=30 -->
+ <constructor-arg index="2"><value>0</value></constructor-arg>
<!-- permissions security enabled flag, default=false -->
- <constructor-arg index="2"><value>false</value></constructor-arg>
- <!-- constraints security enabled flag, default=true -->
<constructor-arg index="3"><value>false</value></constructor-arg>
+ <!-- constraints security enabled flag, default=true -->
+ <constructor-arg index="4"><value>false</value></constructor-arg>
</bean>
<!-- Proxying -->
@@ -42,8 +44,9 @@
<property name="transactionAttributes">
<props>
<prop key="*">PROPAGATION_SUPPORTS</prop>
- <prop
key="update*">PROPAGATION_REQUIRED,-org.apache.jetspeed.page.PageNotUpdatedException</prop>
- <prop
key="remove*">PROPAGATION_REQUIRED,-org.apache.jetspeed.page.PageNotRemovedException</prop>
+ <prop
key="get*">PROPAGATION_REQUIRED,-org.apache.jetspeed.page.document.NodeException</prop>
+ <prop
key="update*">PROPAGATION_REQUIRED,-org.apache.jetspeed.page.document.NodeException</prop>
+ <prop
key="remove*">PROPAGATION_REQUIRED,-org.apache.jetspeed.page.document.NodeException</prop>
</props>
</property>
</bean>
Modified:
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/page/PageManager.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/page/PageManager.java?rev=353995&r1=353994&r2=353995&view=diff
==============================================================================
---
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/page/PageManager.java
(original)
+++
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/page/PageManager.java
Sun Dec 4 22:17:03 2005
@@ -392,6 +392,16 @@
throws JetspeedException, PageNotUpdatedException;
/**
+ * Copy the source link creating and returning a new copy of the link
+ *
+ * @param source The source Link object to be copied
+ * @param path a PSML normalized path to the new link to be created
+ * @return a new Link object copied from the source
+ */
+ public Link copyLink(Link source, String path)
+ throws JetspeedException, LinkNotUpdatedException;
+
+ /**
* Copy the source folder creating and returning a new copy of the folder
* with the same content as the source
* All subobjects are created with new ids
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]