pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.component.core.site
Class LocaleCopy

java.lang.Object
  extended by org.torweg.pulse.bundle.Controller
      extended by org.torweg.pulse.component.core.site.LocaleCopy

public class LocaleCopy
extends Controller

is a Controller which creates a copy of the content registry and the sitemap of a given <em>sourceLocale</em> to the given <em>targetLocale</em>.

Version:
$Revision: 1454 $
Author:
Thomas Weber, Daniel Dietz

Nested Class Summary
 
Nested classes/interfaces inherited from class org.torweg.pulse.bundle.Controller
Controller.AlwaysRun
 
Constructor Summary
LocaleCopy()
           
 
Method Summary
 java.lang.Object copyLocale(Bundle bundle, ServiceRequest request)
          Creates a copy of the content registry and the sitemap of a given <em>sourceLocale</em> to the given <em>targetLocale</em>.
 java.lang.Object copySitemap(Bundle bundle, ServiceRequest request)
          Creates a copy of the sitemap (including copying the attached Contents) of a given sourceNode to the given targetNode The request-parameter sourceNode is the id of the SitemapNode to be recursively copied and the request-parameter targetNode is the id of the parent- SitemapNode where the copy is to be created.
 
Methods inherited from class org.torweg.pulse.bundle.Controller
getAlwaysRun, isAlwaysRun, setAlwaysRun
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocaleCopy

public LocaleCopy()
Method Detail

copyLocale

@Action(value="copyLocale")
@Permission(value="copyLocale")
@Groups(values="CoreAdministrator")
public final java.lang.Object copyLocale(Bundle bundle, ServiceRequest request)
Creates a copy of the content registry and the sitemap of a given <em>sourceLocale</em> to the given <em>targetLocale</em>.

Parameters:
bundle - the current Bundle
request - the current ServiceRequest
Returns:
null

copySitemap

@Action(value="copySitemap")
@Permission(value="copySitemap")
@Groups(values="CoreAdministrator")
public final java.lang.Object copySitemap(Bundle bundle, ServiceRequest request)
Creates a copy of the sitemap (including copying the attached Contents) of a given sourceNode to the given targetNode

The request-parameter sourceNode is the id of the SitemapNode to be recursively copied and the request-parameter targetNode is the id of the parent- SitemapNode where the copy is to be created.

If request-parameter rebuildFolders is true, the folders where the copied Contents will be placed, are build up similar to the folders of the source-Content.
Otherwise a folder named "COPY the date of the copy" at the root-RegistryLocaleNode will be created for the copied Contents.

If request-parameter forceInvisible is true, all newly created SitemapNodes will be set to invisible. Otherwise the visiblity will be copied from the source node.

Parameters:
bundle - the Bundle
request - the ServiceRequest
Returns:
null