org.apache.lenya.cms.ant
Class CopyPoliciesTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.lenya.cms.ant.PublicationTask
              extended by org.apache.lenya.cms.ant.DocumentOperationTask
                  extended by org.apache.lenya.cms.ant.TwoDocumentsOperationTask
                      extended by org.apache.lenya.cms.ant.CopyPoliciesTask
All Implemented Interfaces:
SiteTreeNodeVisitor

public class CopyPoliciesTask
extends TwoDocumentsOperationTask

Ant task to copy the policies of a document


Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
CopyPoliciesTask()
           
 
Method Summary
 void copyPolicies(java.io.File srcDir, java.io.File destDir)
          Copies the policies file
 java.io.File[] getFiles(java.io.File directory)
          Get all files in a given directory, that are not directories.
 java.lang.String getPoliciesDir()
           
 void setPoliciesDir(java.lang.String string)
           
 void visitSiteTreeNode(SiteTreeNode node)
          (non-Javadoc)
 
Methods inherited from class org.apache.lenya.cms.ant.TwoDocumentsOperationTask
execute, getSecarea, getSecdocumentid, setSecarea, setSecdocumentid
 
Methods inherited from class org.apache.lenya.cms.ant.DocumentOperationTask
getFirstarea, getFirstdocumentid, setFirstarea, setFirstdocumentid
 
Methods inherited from class org.apache.lenya.cms.ant.PublicationTask
assertString, getContextPrefix, getPublication, getPublicationDirectory, getPublicationId, getServletContext
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopyPoliciesTask

public CopyPoliciesTask()
Method Detail

getPoliciesDir

public java.lang.String getPoliciesDir()
Returns:
string The policies directory.

setPoliciesDir

public void setPoliciesDir(java.lang.String string)
Parameters:
string - The policies directory

getFiles

public java.io.File[] getFiles(java.io.File directory)
Get all files in a given directory, that are not directories. If the given directory doesn't exist, return null.

Parameters:
directory - The directory
Returns:
List of files

copyPolicies

public void copyPolicies(java.io.File srcDir,
                         java.io.File destDir)
Copies the policies file

Parameters:
srcDir - The source directory of the policies files.
destDir - The destination directory of the policies files.

visitSiteTreeNode

public void visitSiteTreeNode(SiteTreeNode node)
(non-Javadoc)

Specified by:
visitSiteTreeNode in interface SiteTreeNodeVisitor
Specified by:
visitSiteTreeNode in class DocumentOperationTask
Parameters:
node - The SiteTreeNode.
See Also:
DocumentOperationTask.visitSiteTreeNode(org.apache.lenya.cms.publication.SiteTreeNode)


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