com.ail.core.configure
Class CmsUploader

java.lang.Object
  extended by com.ail.core.configure.CmsUploader

public class CmsUploader
extends java.lang.Object

NAME
  CmsUploader - upload content into a jackrabbit repository

SYNOPSIS
  CmsUpload <repository config file> <repository directory> <source directory>

DESCRIPTION
The directory scructure under <source directory> is traversed and it's contents are compared with the CMS repository. Files and folders in the repository are create and updated based on what is found. Files and folders that don't exist are created. CMS file nodes that are older then the corresponding source file are updated.

All file nodes are created in CMS for the system's default locale.

When file nodes are created, the 'mixin:versionable' property is set. Any subsequent update creates a new version. All nodes that are updated or created are labeled as "LIVE".


Constructor Summary
CmsUploader(java.lang.String username, java.lang.String password)
          Constructor.
 
Method Summary
 org.alfresco.webservice.types.Node cmsCreateSpace(java.lang.String spacePath, java.lang.String folderPath)
          Create a new folder in CMS.
static void cmsMakeVersionable(org.alfresco.webservice.repository.RepositoryServiceSoapBindingStub respositoryService, org.alfresco.webservice.types.Reference reference)
          Helper method to make apply the versionable aspect to a given reference
 void cmsUploadContent(java.lang.String filePath, java.lang.String cmsPath)
          Upload a file from the file system into a specified file in cms.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsUploader

public CmsUploader(java.lang.String username,
                   java.lang.String password)
            throws java.lang.Exception
Constructor. Logs into CMS using the credentials supplied.

Parameters:
username - CMS username - all operation will be carried out using this user.
password - User's password in cleartext.
Throws:
java.lang.Exception
Method Detail

cmsMakeVersionable

public static void cmsMakeVersionable(org.alfresco.webservice.repository.RepositoryServiceSoapBindingStub respositoryService,
                                      org.alfresco.webservice.types.Reference reference)
                               throws java.lang.Exception
Helper method to make apply the versionable aspect to a given reference

See sample 4 for more CML examples

Parameters:
respositoryService - the respository service
reference - the reference
Throws:
java.lang.Exception

cmsUploadContent

public void cmsUploadContent(java.lang.String filePath,
                             java.lang.String cmsPath)
                      throws java.lang.Exception
Upload a file from the file system into a specified file in cms.

Parameters:
filePath - Absolute path to file to be uploaded
cmsPath - CMS space path to upload the content into (e.g. /app:company_home/cm:guest_home).
Throws:
java.lang.Exception

cmsCreateSpace

public org.alfresco.webservice.types.Node cmsCreateSpace(java.lang.String spacePath,
                                                         java.lang.String folderPath)
                                                  throws java.lang.Exception
Create a new folder in CMS. If the folder already exists this method will have no effect.

Parameters:
parent - The parent folder's qname to create the new folder.
child - The new folder's name.
Returns:
results of the create call, or null if the folder already existed.
Throws:
org.alfresco.webservice.repository.RepositoryFault
java.rmi.RemoteException
java.lang.Exception